]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[libc] Add stdbool.h standard header
authorMichael Brown <mcb30@ipxe.org>
Mon, 10 Apr 2017 15:11:50 +0000 (16:11 +0100)
committerMichael Brown <mcb30@ipxe.org>
Mon, 10 Apr 2017 15:12:53 +0000 (16:12 +0100)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/include/curses.h
src/include/stdbool.h [new file with mode: 0644]

index 1f6fe029b5b3c1dba3f9ba5fb2db20e5e251105e..cf8cc53c994323350ece63923ea7c5df5f791595 100644 (file)
@@ -2,6 +2,7 @@
 #define CURSES_H
 
 #include <stdint.h>
+#include <stdbool.h>
 #include <stdarg.h>
 #include <ipxe/console.h>
 
@@ -25,7 +26,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
 #undef  TRUE
 #define TRUE   (1)
 
-typedef int bool;
 typedef uint32_t chtype;
 typedef uint32_t attr_t;
 
diff --git a/src/include/stdbool.h b/src/include/stdbool.h
new file mode 100644 (file)
index 0000000..c49a7f1
--- /dev/null
@@ -0,0 +1,10 @@
+#ifndef _STDBOOL_H
+#define _STDBOOL_H
+
+FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
+
+#define bool _Bool
+#define true 1
+#define false 0
+
+#endif /* _STDBOOL_H */