Browse Source

[libc] Add stdbool.h standard header

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 7 years ago
parent
commit
ffb5fe4ced
2 changed files with 11 additions and 1 deletions
  1. 1
    1
      src/include/curses.h
  2. 10
    0
      src/include/stdbool.h

+ 1
- 1
src/include/curses.h View File

@@ -2,6 +2,7 @@
2 2
 #define CURSES_H
3 3
 
4 4
 #include <stdint.h>
5
+#include <stdbool.h>
5 6
 #include <stdarg.h>
6 7
 #include <ipxe/console.h>
7 8
 
@@ -25,7 +26,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
25 26
 #undef  TRUE
26 27
 #define TRUE	(1)
27 28
 
28
-typedef int bool;
29 29
 typedef uint32_t chtype;
30 30
 typedef uint32_t attr_t;
31 31
 

+ 10
- 0
src/include/stdbool.h View File

@@ -0,0 +1,10 @@
1
+#ifndef _STDBOOL_H
2
+#define _STDBOOL_H
3
+
4
+FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
5
+
6
+#define bool _Bool
7
+#define true 1
8
+#define false 0
9
+
10
+#endif /* _STDBOOL_H */

Loading…
Cancel
Save