浏览代码

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

+ 10
- 0
src/include/stdbool.h 查看文件

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 */

正在加载...
取消
保存