Skip to content

Commit fe08974

Browse files
authored
Merge pull request #330 from davidgiven/dtrg-fixes
bool is a keyword in C23, so don't try to typedef it.
2 parents 02408f9 + 3ea1f6a commit fe08974

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

mach/proto/top/top.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*/
66
/* Tunable constants; may be overruled by machine descriptor table */
77

8+
#include <stdbool.h>
9+
810
#ifndef OP_SEPARATOR
911
#define OP_SEPARATOR ','
1012
#endif
@@ -82,8 +84,6 @@ struct instr_descr {
8284
struct templat templates[MAXOP];
8385
};
8486

85-
typedef int bool;
86-
8787
#define TRUE 1
8888
#define FALSE 0
8989

util/ego/share/types.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
/* This file contains the definitions of the global data types.
99
*/
1010

11+
#include <stdint.h>
12+
#include <stdbool.h>
13+
1114
/* TEMPORARY: */
1215
#define LONGOFF
1316

@@ -18,7 +21,6 @@
1821

1922
typedef struct argbytes argb_t;
2023
typedef char byte;
21-
typedef byte bool;
2224
typedef long offset;
2325
typedef short obj_id;
2426
typedef short proc_id;

util/opt/types.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
#ifndef TYPES_H_
66
#define TYPES_H_
77

8+
#include <stdbool.h>
9+
810
typedef unsigned char byte;
9-
typedef char bool;
1011
typedef struct line line_t;
1112
typedef struct line *line_p;
1213
typedef struct sym sym_t;

0 commit comments

Comments
 (0)