File tree Expand file tree Collapse file tree 2 files changed +15
-12
lines changed Expand file tree Collapse file tree 2 files changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ CFLAGS+=-DNORMALUNIX -DLINUX
15
15
OUTPUT =$(BINDIR ) /doom_ascii
16
16
endif
17
17
18
- CFLAGS+ =-Os -flto -Wall -D_DEFAULT_SOURCE # -DSNDSERV -DUSEASM
18
+ CFLAGS+ =-Os -flto -Wall -D_DEFAULT_SOURCE -std=c99 # -DSNDSERV -DUSEASM
19
19
LDFLAGS+=-flto
20
20
LIBS+ =-lm
21
21
Original file line number Diff line number Diff line change 65
65
66
66
#include <inttypes.h>
67
67
68
- #if (defined(__STDC_VERSION__ ) && __STDC_VERSION__ >= 199901L ) || defined(__cplusplus )
69
- // For C99+ and C++, use the standard boolean type
70
- #include <stdbool.h>
68
+ #ifdef __cplusplus
69
+
70
+ // Use builtin bool type with C++.
71
+
72
+ typedef bool bool ;
73
+
71
74
#else
72
- // For older C standards, use the original custom enum
73
- typedef enum { false = 0 , true = 1 } bool ;
74
- #endif
75
75
76
- // The original enum also defined an 'undef' state.
77
- // left for compatibility
78
- enum {
79
- undef = 0xFFFFFFFF
80
- };
76
+ typedef enum
77
+ {
78
+ false = 0 ,
79
+ true = 1 ,
80
+ undef = 0xFFFFFFFF
81
+ } bool ;
82
+
83
+ #endif
81
84
82
85
typedef uint8_t byte ;
83
86
You can’t perform that action at this time.
0 commit comments