1.1 --- a/core/metamod_oslink.h Fri May 14 00:34:36 2010 -0500
1.2 +++ b/core/metamod_oslink.h Fri May 14 00:34:56 2010 -0500
1.3 @@ -51,11 +51,15 @@
1.4 #define PATH_SEP_CHAR '\\'
1.5 #define ALT_SEP_CHAR '/'
1.6 #define PATH_SIZE MAX_PATH
1.7 - #define SERVER_DLL "server.dll"
1.8 #define strcasecmp stricmp
1.9 inline bool _IsPathSepChar(char c) { return (c == '/' || c == '\\'); }
1.10 -#elif defined __linux__
1.11 - #define OS_LINUX
1.12 +#elif defined __linux__ || defined __APPLE__
1.13 + #if defined __linux__
1.14 + #define OS_LINUX
1.15 + #elif defined __APPLE__
1.16 + #define OS_DARWIN
1.17 + #include <sys/syslimits.h>
1.18 + #endif
1.19 #include <dlfcn.h>
1.20 #include <unistd.h>
1.21 #include <sys/types.h>
1.22 @@ -69,11 +73,10 @@
1.23 #define PATH_SIZE PATH_MAX
1.24 #define stricmp strcasecmp
1.25 #define strnicmp strncasecmp
1.26 - #define SERVER_DLL "server_i486.so"
1.27 inline bool _IsPathSepChar(char c) { return (c == '/'); }
1.28 #endif
1.29
1.30 -#if defined __linux__
1.31 +#if defined __linux__ || defined __APPLE__
1.32 #include <errno.h>
1.33 int GetLastError();
1.34 #endif
1.35 @@ -103,7 +106,7 @@
1.36 #endif
1.37 #endif
1.38
1.39 -#ifndef __linux__
1.40 +#if !defined __linux__ && !defined __APPLE__
1.41 #define snprintf _snprintf
1.42 #if defined _MSC_VER && _MSC_VER < 1500
1.43 #define vsnprintf _vsnprintf