Skip to content

bool is a keyword in C23, so don't try to typedef it. #330

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mach/proto/top/top.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
*/
/* Tunable constants; may be overruled by machine descriptor table */

#include <stdbool.h>

#ifndef OP_SEPARATOR
#define OP_SEPARATOR ','
#endif
Expand Down Expand Up @@ -82,8 +84,6 @@ struct instr_descr {
struct templat templates[MAXOP];
};

typedef int bool;

#define TRUE 1
#define FALSE 0

Expand Down
4 changes: 3 additions & 1 deletion util/ego/share/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
/* This file contains the definitions of the global data types.
*/

#include <stdint.h>
#include <stdbool.h>

/* TEMPORARY: */
#define LONGOFF

Expand All @@ -18,7 +21,6 @@

typedef struct argbytes argb_t;
typedef char byte;
typedef byte bool;
typedef long offset;
typedef short obj_id;
typedef short proc_id;
Expand Down
3 changes: 2 additions & 1 deletion util/opt/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
#ifndef TYPES_H_
#define TYPES_H_

#include <stdbool.h>

typedef unsigned char byte;
typedef char bool;
typedef struct line line_t;
typedef struct line *line_p;
typedef struct sym sym_t;
Expand Down
Loading