From 957e9b494cf19d4c7310bc4a760eaf3516493d0b Mon Sep 17 00:00:00 2001 From: Spoike Date: Tue, 24 Jun 2014 03:04:30 +0000 Subject: [PATCH] more correct types. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4698 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- plugins/plugin.h | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/plugins/plugin.h b/plugins/plugin.h index d18ab3442..621ecd5ec 100644 --- a/plugins/plugin.h +++ b/plugins/plugin.h @@ -74,13 +74,24 @@ void BadBuiltin(void); #include #ifndef _VM_H -#ifdef _WIN64 -typedef long long qintptr_t; -typedef unsigned long long quintptr_t; -#else -typedef long qintptr_t; -typedef unsigned long quintptr_t; -#endif + #if __STDC_VERSION__ >= 199901L + //C99 has a stdint header which hopefully contains an intptr_t + //its optional... but if its not in there then its unlikely you'll actually be able to get the engine to a stage where it *can* load anything + #include + #define qintptr_t intptr_t + #define quintptr_t uintptr_t + #else + #ifdef _WIN64 + typedef long long qintptr_t; + typedef unsigned long long quintptr_t; + #else + #ifndef _MSC_VER + #define __w64 + #endif + typedef long __w64 qintptr_t; + typedef unsigned long __w64 quintptr_t; + #endif + #endif #endif #ifndef _WIN32