]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
merged dll handling code into sys_shared.c because the code in sys_linux.c was for...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 25 May 2003 22:33:03 +0000 (22:33 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 25 May 2003 22:33:03 +0000 (22:33 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3034 d7cf8633-e32d-0410-b094-e92efae38249

sys_linux.c
sys_shared.c
sys_win.c

index e63d6a7a8df3db2305e2b241cdfefcf5bd3e7d7c..2cda90728f61eadae4da357b02def3587523f343 100644 (file)
@@ -5,7 +5,6 @@
 #include <unistd.h>
 #include <fcntl.h>
 #include <sys/time.h>
-#include <dlfcn.h>
 #endif
 
 #include <signal.h>
 cvar_t sys_usetimegettime = {CVAR_SAVE, "sys_usetimegettime", "1"};
 #endif
 
-/*
-===============================================================================
-
-DLL MANAGEMENT
-
-===============================================================================
-*/
-
-dllhandle_t Sys_LoadLibrary (const char* name)
-{
-#ifdef WIN32
-       return LoadLibrary (name);
-#else
-       return dlopen (name, RTLD_LAZY);
-#endif
-}
-
-void Sys_UnloadLibrary (dllhandle_t handle)
-{
-#ifdef WIN32
-       FreeLibrary (handle);
-#else
-       dlclose (handle);
-#endif
-}
-
-void* Sys_GetProcAddress (dllhandle_t handle, const char* name)
-{
-#ifdef WIN32
-       return (void *)GetProcAddress (handle, name);
-#else
-       return (void *)dlsym (handle, name);
-#endif
-}
 
 
 // =======================================================================
index 3d666e922ae258c5772a61b29e5e665689abd179..465b322ef71a5b9e82f0810967112051f27fb023 100644 (file)
@@ -118,3 +118,42 @@ void Sys_Shared_LateInit(void)
 {
 }
 
+/*
+===============================================================================
+
+DLL MANAGEMENT
+
+===============================================================================
+*/
+
+#ifndef WIN32
+#include <dlfcn.h>
+#endif
+
+dllhandle_t Sys_LoadLibrary (const char* name)
+{
+#ifdef WIN32
+       return LoadLibrary (name);
+#else
+       return dlopen (name, RTLD_LAZY);
+#endif
+}
+
+void Sys_UnloadLibrary (dllhandle_t handle)
+{
+#ifdef WIN32
+       FreeLibrary (handle);
+#else
+       dlclose (handle);
+#endif
+}
+
+void* Sys_GetProcAddress (dllhandle_t handle, const char* name)
+{
+#ifdef WIN32
+       return (void *)GetProcAddress (handle, name);
+#else
+       return (void *)dlsym (handle, name);
+#endif
+}
+
index ae3f7cd4aad5357772cff78e670515f44e38ea8e..d9b013b0bd8471ac2c9d6e882776ae4010c48cbf 100644 (file)
--- a/sys_win.c
+++ b/sys_win.c
@@ -35,8 +35,6 @@ cvar_t sys_usetimegettime = {CVAR_SAVE, "sys_usetimegettime", "1"};
 // sleep time when not focus
 #define NOT_FOCUS_SLEEP        20
 
-int                    starttime;
-
 static qboolean                sc_return_on_enter = false;
 HANDLE                         hinput, houtput;
 
@@ -46,30 +44,6 @@ static HANDLE        heventParent;
 static HANDLE  heventChild;
 
 
-/*
-===============================================================================
-
-DLL MANAGEMENT
-
-===============================================================================
-*/
-
-dllhandle_t Sys_LoadLibrary (const char* name)
-{
-       return LoadLibrary (name);
-}
-
-void Sys_UnloadLibrary (dllhandle_t handle)
-{
-       FreeLibrary (handle);
-}
-
-void* Sys_GetProcAddress (dllhandle_t handle, const char* name)
-{
-       return (void *)GetProcAddress (handle, name);
-}
-
-
 /*
 ===============================================================================