summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorb'Nigel Croxon <allura@localhost>2023-04-17 11:37:07 +0000
committerb'Nigel Croxon <allura@localhost>2023-04-17 11:37:07 +0000
commit362ef3db041573f7a83e118525a649d0f56518a5 (patch)
treea336e42a523090ae4d8617a5504e3ffb208c62ff
parente0e1f53ce2056f4149f617993c8ef93cb2a5bb4c (diff)
parentd0900861c2508c47e16b254d4ecb8002b9d95096 (diff)
downloadgnu-efi-362ef3db041573f7a83e118525a649d0f56518a5.tar.gz
Merge /u/gmbr3/gnu-efi/ branch nullptr into master
https://sourceforge.net/p/gnu-efi/code/merge-requests/46/
-rw-r--r--inc/efidef.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/inc/efidef.h b/inc/efidef.h
index 3816331..5825771 100644
--- a/inc/efidef.h
+++ b/inc/efidef.h
@@ -39,7 +39,15 @@ typedef bool BOOLEAN;
#endif
#ifndef NULL
+#if (defined(__cplusplus) && __cplusplus >= 201103L) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L)
+ #define NULL nullptr
+#else
+#if !defined(__cplusplus)
#define NULL ((VOID *) 0)
+#else
+ #define NULL 0
+#endif
+#endif
#endif
typedef UINTN EFI_STATUS;