mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-03-23 03:01:30 +00:00
Applying the actual 'Fix FTFBS stuff' part
This commit is contained in:
parent
57aaf57dfc
commit
afaa162aa1
3 changed files with 2 additions and 12 deletions
10
gmqcc.h
10
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 ================================*/
|
||||
|
|
2
ir.c
2
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
|
||||
|
||||
|
|
2
util.c
2
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;
|
||||
|
|
Loading…
Reference in a new issue