initial import of linux support

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40356
This commit is contained in:
David Anderson
2007-01-25 09:19:38 +00:00
parent 25ed99ac60
commit 3e936bbd88
26 changed files with 203 additions and 83 deletions
+2 -2
View File
@@ -106,7 +106,7 @@ namespace SourceMod
*
* The SMC file format is defined as:
* WHITESPACE: 0x20, \n, \t, \r
* IDENTIFIER: Any ASCII character EXCLUDING ", {, }, ;, //, /*, or WHITESPACE.
* IDENTIFIER: Any ASCII character EXCLUDING ", {, }, ;, //, / *, or WHITESPACE.
* STRING: Any set of symbols enclosed in quotes.
* Note: if a STRING does not have quotes, it is parsed as an IDENTIFIER.
*
@@ -138,7 +138,7 @@ namespace SourceMod
* unless they are inside literal strings:
* ;<TEXT>
* //<TEXT>
* /*<TEXT> */
* / *<TEXT> */
enum SMCParseResult
{
+8 -1
View File
@@ -24,11 +24,14 @@
#define PLATFORM_SEP_CHAR '\\'
#define PLATFORM_SEP_ALTCHAR '/'
#define PLATFORM_EXTERN_C extern "C" __declspec(dllexport)
#else if defined __linux__
#elif defined __linux__
#define PLATFORM_LINUX
#define PLATFORM_POSIX
#include <unistd.h>
#include <dirent.h>
#include <errno.h>
#include <dlfcn.h>
#include <sys/stat.h>
#define PLATFORM_MAX_PATH PATH_MAX
#define PLATFORM_LIB_EXT "so"
#define PLATFORM_SEP_CHAR '/'
@@ -36,4 +39,8 @@
#define PLATFORM_EXTERN_C extern "C" __attribute__((visibility("default")))
#endif
#if !defined SOURCEMOD_BUILD
#define SOURCEMOD_BUILD
#endif
#endif //_INCLUDE_SOURCEMOD_PLATFORM_H_
+2 -1
View File
@@ -12,4 +12,5 @@ inline float sp_ctof(cell_t val)
return *(float *)&val;
}
#endif //_INCLUDE_SOURCEPAWN_VM_TYPEUTIL_H_
#endif //_INCLUDE_SOURCEPAWN_VM_TYPEUTIL_H_
+2 -1
View File
@@ -7,10 +7,11 @@
#if defined WIN32
#define EXPORT_LINK extern "C" __declspec(dllexport)
#else if defined __GNUC__
#elif defined __GNUC__
#define EXPORT_LINK extern "C" __attribute__((visibility("default")))
#endif
typedef SourcePawn::IVirtualMachine *(*SP_GETVM_FUNC)(SourcePawn::ISourcePawnEngine *);
#endif //_INCLUDE_SOURCEPAWN_VM_BASE_H_