Make TRUE/FALSE compatible with C23/C++
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
This commit is contained in:
parent
b6a6472874
commit
2a599ea133
@ -34,9 +34,14 @@ typedef bool BOOLEAN;
|
|||||||
#define CONST const
|
#define CONST const
|
||||||
#endif
|
#endif
|
||||||
#ifndef TRUE
|
#ifndef TRUE
|
||||||
|
#if defined(__cplusplus) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L)
|
||||||
|
#define TRUE true
|
||||||
|
#define FALSE false
|
||||||
|
#else
|
||||||
#define TRUE ((BOOLEAN) 1)
|
#define TRUE ((BOOLEAN) 1)
|
||||||
#define FALSE ((BOOLEAN) 0)
|
#define FALSE ((BOOLEAN) 0)
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef NULL
|
#ifndef NULL
|
||||||
#define NULL ((VOID *) 0)
|
#define NULL ((VOID *) 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user