mirror of
https://github.com/yquake2/rogue.git
synced 2025-04-08 19:11:16 +00:00
Fix build with C23 by reusing the predefined bool type.
This commit is contained in:
parent
6cb21cfe13
commit
358b497d16
1 changed files with 14 additions and 1 deletions
|
@ -18,8 +18,21 @@
|
|||
#include <stdlib.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;
|
||||
#endif
|
||||
|
||||
typedef unsigned char byte;
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL ((void *)0)
|
||||
|
|
Loading…
Reference in a new issue