Redesigned how server commands work. The "plugins" command will be back soon.
1 #ifndef _INCLUDE_SOURCEMOD_PLATFORM_H_
2 #define _INCLUDE_SOURCEMOD_PLATFORM_H_
5 * @file Contains platform-specific macros for abstraction.
8 #if defined WIN32 || defined WIN64
9 #define PLATFORM_WINDOWS
10 #if !defined WIN32_LEAN_AND_MEAN
11 #define WIN32_LEAN_AND_MEAN
14 #define snprintf _snprintf
19 #define strcasecmp strcmpi
22 #define PLATFORM_LIB_EXT "dll"
23 #define PLATFORM_MAX_PATH MAX_PATH
24 #define PLATFORM_SEP_CHAR '\\'
25 #define PLATFORM_SEP_ALTCHAR '/'
26 #define PLATFORM_EXTERN_C extern "C" __declspec(dllexport)
27 #else if defined __linux__
28 #define PLATFORM_LINUX
29 #define PLATFORM_POSIX
32 #define PLATFORM_MAX_PATH PATH_MAX
33 #define PLATFORM_LIB_EXT "so"
34 #define PLATFORM_SEP_CHAR '/'
35 #define PLATFORM_SEP_ALTCHAR '\\'
36 #define PLATFORM_EXTERN_C extern "C" __attribute__((visibility("default")))
39 #endif //_INCLUDE_SOURCEMOD_PLATFORM_H_