Fix build with C23 by reusing the predefined bool type.

This commit is contained in:
Yamagi 2025-03-01 12:48:49 +01:00
parent dcc5a1f616
commit 8878216828

View file

@ -36,8 +36,21 @@
#include <stdlib.h> #include <stdlib.h>
#include <time.h> #include <time.h>
typedef unsigned char byte; #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202000L // C23 or newer
typedef bool qboolean;
#else
#ifdef true
#undef true
#endif
#ifdef false
#undef false
#endif
typedef enum {false, true} qboolean; typedef enum {false, true} qboolean;
#endif
typedef unsigned char byte;
#ifndef NULL #ifndef NULL
#define NULL ((void *)0) #define NULL ((void *)0)