diff options
author | Callum Farmer <gmbr3@opensuse.org> | 2023-04-15 14:31:38 +0100 |
---|---|---|
committer | Callum Farmer <gmbr3@opensuse.org> | 2023-04-15 14:45:19 +0100 |
commit | 2a599ea13337d1fb2f9e4402b67f8a88db6a8502 (patch) | |
tree | eef98602d6c0ada97eb795dd397798d71868b39f | |
parent | b6a647287486cb50542ecdfe1027af8b0fc50bbd (diff) | |
download | gnu-efi-2a599ea13337d1fb2f9e4402b67f8a88db6a8502.tar.gz |
Make TRUE/FALSE compatible with C23/C++
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
-rw-r--r-- | inc/efidef.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/inc/efidef.h b/inc/efidef.h index 3816331..d9fd8b3 100644 --- a/inc/efidef.h +++ b/inc/efidef.h @@ -34,9 +34,14 @@ typedef bool BOOLEAN; #define CONST const #endif #ifndef TRUE +#if defined(__cplusplus) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L) + #define TRUE true + #define FALSE false +#else #define TRUE ((BOOLEAN) 1) #define FALSE ((BOOLEAN) 0) #endif +#endif #ifndef NULL #define NULL ((VOID *) 0) |