]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Applying the actual 'Fix FTFBS stuff' part
authorWolfgang (Blub) Bumiller <blub@speed.at>
Wed, 19 Dec 2012 21:17:22 +0000 (22:17 +0100)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Wed, 19 Dec 2012 21:17:22 +0000 (22:17 +0100)
gmqcc.h
ir.c
util.c

diff --git a/gmqcc.h b/gmqcc.h
index b1e0cdef1709ca37e977e8f4a152f8f7ea0d6f98..53a5460bf9718b6cac970e734a9549673db84f45 100644 (file)
--- a/gmqcc.h
+++ b/gmqcc.h
     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 48cc067d29b9b89d60c08681fa42cc800bb8e177..ee3ea2381361c72c1b6a5828242f845660244768 100644 (file)
--- 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 15db97cfd9a1dbac5f044abba347004a466d1c55..2ad288029880019dd070c9904e8a87c2eb9c8789 100644 (file)
--- 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;