diff options
author | blacksirius <blacksirius@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-06-10 02:27:07 +0000 |
---|---|---|
committer | blacksirius <blacksirius@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-06-10 02:27:07 +0000 |
commit | caa66e7c20a26859912c1efc3c5a00b8dafc0661 (patch) | |
tree | dcd528c3ec6c27c014fdb8e635e590cd2c4b5d6d /src/common/cbasetypes.h | |
parent | ffaaae67cf0ce0569c894433c4ff213af707ea5a (diff) | |
download | hercules-caa66e7c20a26859912c1efc3c5a00b8dafc0661.tar.gz hercules-caa66e7c20a26859912c1efc3c5a00b8dafc0661.tar.bz2 hercules-caa66e7c20a26859912c1efc3c5a00b8dafc0661.tar.xz hercules-caa66e7c20a26859912c1efc3c5a00b8dafc0661.zip |
added mutex && cond var abstraction ( for pthread / winapi )
added type 'sysint' to cbasetypes, which's the width of the platform the release gets compiled for.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16256 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common/cbasetypes.h')
-rw-r--r-- | src/common/cbasetypes.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h index 5ed4a3974..62cb8fe21 100644 --- a/src/common/cbasetypes.h +++ b/src/common/cbasetypes.h @@ -198,6 +198,30 @@ typedef uintptr_t uintptr; ////////////////////////////////////////////////////////////////////////// +// Add a 'sysint' Type which has the width of the platform we're compiled for. +////////////////////////////////////////////////////////////////////////// +#if defined(__GNUC__) + #if defined(__x86_64__) + typedef int64 sysint; + typedef uint64 usysint; + #else + typedef int32 sysint; + typedef uint32 usysint; + #endif +#elif defined(_MSC_VER) + #if defined(_M_X64) + typedef int64 sysint; + typedef uint64 usysint; + #else + typedef int32 sysint; + typedef uint32 usysint; + #endif +#else + #error Compiler / Platform is unsupported. +#endif + + +////////////////////////////////////////////////////////////////////////// // some redefine of function redefines for some Compilers ////////////////////////////////////////////////////////////////////////// #if defined(_MSC_VER) || defined(__BORLANDC__) |