blob: 09ae9838f20bf8a5f47c847d86c57d5692b1c901 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
Only in src/doom-ascii/src: build
diff -ur src_orig/doom-ascii/src/doomtype.h src/doom-ascii/src/doomtype.h
--- src_orig/doom-ascii/src/doomtype.h 2025-06-10 13:10:03.729100712 -0400
+++ src/doom-ascii/src/doomtype.h 2025-06-10 13:23:43.464449216 -0400
@@ -65,23 +65,20 @@
#include <inttypes.h>
-#ifdef __cplusplus
-
-// Use builtin bool type with C++.
-
-typedef bool bool;
-
+#if (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) || defined __cplusplus
+// For C99+ and C++, use the standard boolean type
+# include <stdbool.h>
#else
-
-typedef enum
-{
- false = 0,
- true = 1,
- undef = 0xFFFFFFFF
-} bool;
-
+// For older C standards, use the original custom enum
+typedef enum { false = 0, true = 1 } bool;
#endif
+// The original enum also defined an 'undef' state.
+// left for compatibility
+enum {
+ undef = 0xFFFFFFFF
+};
+
typedef uint8_t byte;
#include <limits.h>
Only in src/doom-ascii/src: doomtype.h.rej
|