90d1f4495e
Finalized basics of plugin loading Began redoing how dependencies will be tracked Renamed some bad names Finished some stuff in ForwardSys --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40216
38 lines
906 B
C
38 lines
906 B
C
#ifndef _INCLUDE_SOURCEMOD_PLATFORM_H_
|
|
#define _INCLUDE_SOURCEMOD_PLATFORM_H_
|
|
|
|
/**
|
|
* @file Contains platform-specific macros for abstraction.
|
|
*/
|
|
|
|
#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
|
|
#if !defined stat
|
|
#define stat _stat
|
|
#endif
|
|
#define strcasecmp strcmpi
|
|
#include <windows.h>
|
|
#include <direct.h>
|
|
#define PLATFORM_LIB_EXT "dll"
|
|
#define PLATFORM_MAX_PATH MAX_PATH
|
|
#define PLATFORM_SEP_CHAR '\\'
|
|
#define PLATFORM_SEP_ALTCHAR '/'
|
|
#else if defined __linux__
|
|
#define PLATFORM_LINUX
|
|
#define PLATFORM_POSIX
|
|
#include <dirent.h>
|
|
#include <errno.h>
|
|
#define PLATFORM_MAX_PATH PATH_MAX
|
|
#define PLATFORM_LIB_EXT "so"
|
|
#define PLATFORM_SEP_CHAR '/'
|
|
#define PLATFORM_SEP_ALTCHAR '\\'
|
|
#endif
|
|
|
|
#endif //_INCLUDE_SOURCEMOD_PLATFORM_H_
|