瀏覽代碼

[libc] Add stdbool.h standard header

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 7 年之前
父節點
當前提交
ffb5fe4ced
共有 2 個檔案被更改,包括 11 行新增1 行删除
  1. 1
    1
      src/include/curses.h
  2. 10
    0
      src/include/stdbool.h

+ 1
- 1
src/include/curses.h 查看文件

@@ -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 查看文件

@@ -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…
取消
儲存