#include <errno.h>
#include <time.h>
+#include <dlfcn.h>
+
#include "quakedef.h"
+/*
+===============================================================================
+
+DLL MANAGEMENT
+
+===============================================================================
+*/
+
+dllhandle_t Sys_LoadLibrary (const char* name)
+{
+ return dlopen (name, RTLD_LAZY);
+}
+
+void Sys_UnloadLibrary (dllhandle_t handle)
+{
+ dlclose (handle);
+}
+
+void* Sys_GetProcAddress (dllhandle_t handle, const char* name)
+{
+ return (void *)dlsym (handle, name);
+}
+
+
// =======================================================================
// General routines
// =======================================================================
usleep(1);
}
-int main (int argc, char **argv)
+int main (int argc, const char **argv)
{
double frameoldtime, framenewtime;
signal(SIGFPE, SIG_IGN);
- memset(&host_parms, 0, sizeof(host_parms));
-
com_argc = argc;
com_argv = argv;
- host_parms.basedir = ".";
-#if CACHEENABLE
- host_parms.cachedir = "/tmp";
-#endif
fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | FNDELAY);