From: Wolfgang (Blub) Bumiller Date: Wed, 19 Dec 2012 21:17:22 +0000 (+0100) Subject: Applying the actual 'Fix FTFBS stuff' part X-Git-Tag: 0.1.9~34 X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fgmqcc.git;a=commitdiff_plain;h=afaa162aa1bcbe410e3d06f6cb5f1cb32029fc13 Applying the actual 'Fix FTFBS stuff' part --- diff --git a/gmqcc.h b/gmqcc.h index b1e0cde..53a5460 100644 --- a/gmqcc.h +++ b/gmqcc.h @@ -175,13 +175,6 @@ typedef struct { char _fail : 0; } int64_t; typedef struct { char _fail : 0; } uint64_t; #endif -#ifdef _LP64 /* long pointer == 64 */ - typedef unsigned long uintptr_t; - typedef long intptr_t; -#else - typedef unsigned int uintptr_t; - typedef int intptr_t; -#endif /* Ensure type sizes are correct: */ typedef char uint8_size_is_correct [sizeof(uint8_t) == 1?1:-1]; typedef char uint16_size_is_correct [sizeof(uint16_t) == 2?1:-1]; @@ -190,9 +183,6 @@ typedef char uint64_size_is_correct [sizeof(uint64_t) == 8?1:-1]; typedef char int16_size_if_correct [sizeof(int16_t) == 2?1:-1]; typedef char int32_size_is_correct [sizeof(int32_t) == 4?1:-1]; typedef char int64_size_is_correct [sizeof(int64_t) >= 8?1:-1]; -/* intptr_t / uintptr_t correct size check */ -typedef char uintptr_size_is_correct[sizeof(intptr_t) == sizeof(int*)?1:-1]; -typedef char intptr_size_is_correct [sizeof(uintptr_t)== sizeof(int*)?1:-1]; /*===================================================================*/ /*=========================== util.c ================================*/ diff --git a/ir.c b/ir.c index 48cc067..ee3ea23 100644 --- a/ir.c +++ b/ir.c @@ -3542,7 +3542,7 @@ bool ir_builder_generate(ir_builder *self, const char *filename) #define IND_BUFSZ 1024 -#ifdef WIN32 +#ifdef _MSC_VER # define strncat(dst, src, sz) strncat_s(dst, sz, src, _TRUNCATE) #endif diff --git a/util.c b/util.c index 15db97c..2ad2880 100644 --- a/util.c +++ b/util.c @@ -495,7 +495,7 @@ size_t util_strtononcmd(const char *in, char *out, size_t outsz) { FILE *util_fopen(const char *filename, const char *mode) { -#ifdef WIN32 +#ifdef _MSC_VER FILE *out; if (fopen_s(&out, filename, mode) != 0) return NULL;