]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sys_linux.c
refactored NET_SendToAll, it is debatable whether it is more readable or not, but...
[xonotic/darkplaces.git] / sys_linux.c
index abe5a45476c168fbf986f30001ca8860439bd844..1e675e4799a5865f88cba7deb9421d6d4f0d5d4e 100644 (file)
 #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
 // =======================================================================