diff --git a/src/doomtype.h b/src/doomtype.h index b7f8a73e5..7d6017e27 100644 --- a/src/doomtype.h +++ b/src/doomtype.h @@ -71,11 +71,15 @@ extern "C" { // glibc 2.43 made alot of standard lib functions propagate the constness of its input pointers // to not cause warnings or compile issues on older glibc versions we do this silly thing // to not have a gazillion glibc version checks +#if defined(__GLIBC_PREREQ) #if __GLIBC_PREREQ(2, 43) #define gconst const #else #define gconst #endif +#else + #define gconst +#endif #ifndef _GNU_SOURCE char *nongnu_strcasestr(const char *in, const char *what); @@ -136,9 +140,9 @@ size_t strlcpy(char *dst, const char *src, size_t dsize); #define STRBUFCPY(dst,src) strlcpy(dst, src, sizeof dst) /* Boolean type definition */ +#include #ifndef _WIN32 -#include // dont use stdbools _BOOL type // its smaller (1 byte) than the old interger bool (4 bytes) // which results in packed struct sizes being mismatched between vanilla and this @@ -146,9 +150,7 @@ size_t strlcpy(char *dst, const char *src, size_t dsize); // which we cant use as enumeration constants typedef int32_t boolean; #else -#define false FALSE -#define true TRUE -#define boolean BOOL +#define boolean int32_t #endif /* 7.18.2.1 Limits of exact-width integer types */