소스 검색

Merge /u/gmbr3/gnu-efi/ branch nullptr into master

https://sourceforge.net/p/gnu-efi/code/merge-requests/46/
b'Nigel Croxon 2 년 전
부모
커밋
362ef3db04
1개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 8 0
      inc/efidef.h

+ 8 - 0
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;