2006-11-05 03:47:13 +01:00
|
|
|
#ifndef _INCLUDE_SOURCEMOD_PLATFORM_H_
|
|
|
|
#define _INCLUDE_SOURCEMOD_PLATFORM_H_
|
|
|
|
|
2006-11-08 08:44:26 +01:00
|
|
|
/**
|
|
|
|
* @file Contains platform-specific macros for abstraction.
|
|
|
|
*/
|
|
|
|
|
2006-11-05 03:47:13 +01:00
|
|
|
#if defined WIN32 || defined WIN64
|
|
|
|
#define PLATFORM_WINDOWS
|
|
|
|
#if !defined WIN32_LEAN_AND_MEAN
|
|
|
|
#define WIN32_LEAN_AND_MEAN
|
|
|
|
#endif
|
|
|
|
#if !defined snprintf
|
|
|
|
#define snprintf _snprintf
|
|
|
|
#endif
|
2006-12-10 10:19:59 +01:00
|
|
|
#define strcasecmp strcmpi
|
2006-11-05 03:47:13 +01:00
|
|
|
#include <windows.h>
|
|
|
|
#include <direct.h>
|
2006-11-08 08:32:44 +01:00
|
|
|
#define PLATFORM_LIB_EXT "dll"
|
2006-11-05 03:47:13 +01:00
|
|
|
#define PLATFORM_MAX_PATH MAX_PATH
|
|
|
|
#else if defined __linux__
|
|
|
|
#define PLATFORM_LINUX
|
|
|
|
#define PLATFORM_POSIX
|
|
|
|
#include <dirent.h>
|
|
|
|
#include <errno.h>
|
|
|
|
#define PLATFORM_MAX_PATH PATH_MAX
|
2006-11-08 08:32:44 +01:00
|
|
|
#define PLATFORM_LIB_EXT "so"
|
2006-11-05 03:47:13 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif //_INCLUDE_SOURCEMOD_PLATFORM_H_
|