dynamic loading they could alter this define
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9620
d7cf8633-e32d-0410-b094-
e92efae38249
# include <time.h>
#ifndef WIN32
# include <unistd.h>
# include <fcntl.h>
# include <time.h>
#ifndef WIN32
# include <unistd.h>
# include <fcntl.h>
# include <dlfcn.h>
#endif
# include <dlfcn.h>
#endif
static char sys_timestring[128];
char *Sys_TimeString(const char *timeformat)
static char sys_timestring[128];
char *Sys_TimeString(const char *timeformat)
qboolean Sys_LoadLibrary (const char** dllnames, dllhandle_t* handle, const dllfunction_t *fcts)
{
qboolean Sys_LoadLibrary (const char** dllnames, dllhandle_t* handle, const dllfunction_t *fcts)
{
const dllfunction_t *func;
dllhandle_t dllhandle = 0;
unsigned int i;
const dllfunction_t *func;
dllhandle_t dllhandle = 0;
unsigned int i;
*handle = dllhandle;
return true;
*handle = dllhandle;
return true;
+#else
+ return false;
+#endif
}
void Sys_UnloadLibrary (dllhandle_t* handle)
{
}
void Sys_UnloadLibrary (dllhandle_t* handle)
{
if (handle == NULL || *handle == NULL)
return;
if (handle == NULL || *handle == NULL)
return;
}
void* Sys_GetProcAddress (dllhandle_t handle, const char* name)
{
}
void* Sys_GetProcAddress (dllhandle_t handle, const char* name)
{
#ifdef WIN32
return (void *)GetProcAddress (handle, name);
#else
return (void *)dlsym (handle, name);
#endif
#ifdef WIN32
return (void *)GetProcAddress (handle, name);
#else
return (void *)dlsym (handle, name);
#endif
+#else
+ return NULL;
+#endif