浏览代码

Use C/C++ boolean when available

Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
Callum Farmer 2 年之前
父节点
当前提交
8efd8cde75
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      inc/efidef.h

+ 8 - 0
inc/efidef.h

@@ -20,7 +20,15 @@ Revision History
 
 --*/
 
+#if !defined(__cplusplus)
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+typedef _Bool BOOLEAN;
+#else
 typedef unsigned char BOOLEAN;
+#endif
+#else
+typedef bool BOOLEAN;
+#endif
 
 #ifndef CONST
    #define CONST const