core/sm_platform.h
author David Anderson <dvander@alliedmods.net>
Wed Nov 08 07:44:26 2006 +0000 (2006-11-08)
changeset 162 eb6818c69d47
parent 160 c056af9b4aaf
child 203 c7f86f9e6f60
permissions -rw-r--r--
added some trivial comments
     1 #ifndef _INCLUDE_SOURCEMOD_PLATFORM_H_
     2 #define _INCLUDE_SOURCEMOD_PLATFORM_H_
     3 
     4 /**
     5  * @file Contains platform-specific macros for abstraction.
     6  */
     7 
     8 #if defined WIN32 || defined WIN64
     9 #define PLATFORM_WINDOWS
    10 #if !defined WIN32_LEAN_AND_MEAN
    11 #define WIN32_LEAN_AND_MEAN
    12 #endif
    13 #if !defined snprintf
    14 #define snprintf _snprintf
    15 #endif
    16 #include <windows.h>
    17 #include <direct.h>
    18 #define PLATFORM_LIB_EXT		"dll"
    19 #define PLATFORM_MAX_PATH		MAX_PATH
    20 #else if defined __linux__
    21 #define PLATFORM_LINUX
    22 #define PLATFORM_POSIX
    23 #include <dirent.h>
    24 #include <errno.h>
    25 #define PLATFORM_MAX_PATH		PATH_MAX
    26 #define PLATFORM_LIB_EXT		"so"
    27 #endif
    28 
    29 #endif //_INCLUDE_SOURCEMOD_PLATFORM_H_