aboutsummaryrefslogtreecommitdiffstats
path: root/code/sys/sys_loadlib.h
diff options
context:
space:
mode:
authortma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2007-09-06 20:31:30 +0000
committertma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2007-09-06 20:31:30 +0000
commit4d72acef0743f75a260b22a41f4d474f064d15e5 (patch)
tree01c192dfa1a1efc2137285935845e7f475e3ecd9 /code/sys/sys_loadlib.h
parent4e64b0a1b82badbf25bb32bd96290f96668c2290 (diff)
downloadioquake3-aero-4d72acef0743f75a260b22a41f4d474f064d15e5.tar.gz
ioquake3-aero-4d72acef0743f75a260b22a41f4d474f064d15e5.zip
* Build dedicated server binary on Windows
git-svn-id: svn://svn.icculus.org/quake3/trunk@1169 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/sys/sys_loadlib.h')
-rw-r--r--code/sys/sys_loadlib.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/code/sys/sys_loadlib.h b/code/sys/sys_loadlib.h
index 29b21c7..a7e854c 100644
--- a/code/sys/sys_loadlib.h
+++ b/code/sys/sys_loadlib.h
@@ -21,11 +21,19 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifdef DEDICATED
+# ifdef _WIN32
+# include <windows.h>
+# define Sys_LoadLibrary(f) (void*)LoadLibrary(f)
+# define Sys_UnloadLibrary(h) FreeLibrary((HMODULE)h)
+# define Sys_LoadFunction(h,fn) (void*)GetProcAddress((HMODULE)h,fn)
+# define Sys_LibraryError() "unknown"
+# else
# include <dlfcn.h>
-# define Sys_LoadLibrary(f) dlopen(f,RTLD_NOW)
-# define Sys_UnloadLibrary(h) dlclose(h)
-# define Sys_LoadFunction(h,fn) dlsym(h,fn)
-# define Sys_LibraryError() dlerror()
+# define Sys_LoadLibrary(f) dlopen(f,RTLD_NOW)
+# define Sys_UnloadLibrary(h) dlclose(h)
+# define Sys_LoadFunction(h,fn) dlsym(h,fn)
+# define Sys_LibraryError() dlerror()
+#endif
#else
# include "SDL.h"
# include "SDL_loadso.h"