mirror of
https://github.com/yquake2/ctf.git
synced 2025-05-31 00:51:44 +00:00
Fix build with C23 by reusing the predefined bool type.
This commit is contained in:
parent
dcc5a1f616
commit
8878216828
1 changed files with 14 additions and 1 deletions
|
@ -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)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue