#include "quakedef.h"
+
+#define SUPPORTDLL
+
# include <time.h>
#ifndef WIN32
# include <unistd.h>
# include <fcntl.h>
+#ifdef SUPPORTDLL
# include <dlfcn.h>
#endif
+#endif
static char sys_timestring[128];
char *Sys_TimeString(const char *timeformat)
qboolean Sys_LoadLibrary (const char** dllnames, dllhandle_t* handle, const dllfunction_t *fcts)
{
+#ifdef SUPPORTDLL
const dllfunction_t *func;
dllhandle_t dllhandle = 0;
unsigned int i;
*handle = dllhandle;
return true;
+#else
+ return false;
+#endif
}
void Sys_UnloadLibrary (dllhandle_t* handle)
{
+#ifdef SUPPORTDLL
if (handle == NULL || *handle == NULL)
return;
#endif
*handle = NULL;
+#endif
}
void* Sys_GetProcAddress (dllhandle_t handle, const char* name)
{
+#ifdef SUPPORTDLL
#ifdef WIN32
return (void *)GetProcAddress (handle, name);
#else
return (void *)dlsym (handle, name);
#endif
+#else
+ return NULL;
+#endif
}