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 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154
|
From: Victor Seva <vseva@debian.org>
Date: Wed, 17 Sep 2025 08:37:30 +0200
Subject: fix gcc15 build
---
conv.c | 4 ++++
getcode.c | 4 ++++
sjis_doti.c | 4 ++++
sjis_imode1.c | 4 ++++
sjis_imode2.c | 4 ++++
sjis_jsky1.c | 4 ++++
sjis_jsky2.c | 4 ++++
7 files changed, 28 insertions(+)
diff --git a/conv.c b/conv.c
index 7e61d4e..f1927b4 100644
--- a/conv.c
+++ b/conv.c
@@ -31,11 +31,15 @@
#endif
#ifndef __cplusplus
+#if __STDC_VERSION__ >= 202311L
+ /* bool is part of the C23 standard */
+#else
#undef bool
#undef true
#undef false
typedef enum bool { false, true, } bool;
#endif
+#endif
/* ----------------------------------------------------------------------------
* SV* sv_utf8 = xs_sjis_utf8(SV* sv_sjis)
diff --git a/getcode.c b/getcode.c
index 2b9f77f..b8b54f6 100644
--- a/getcode.c
+++ b/getcode.c
@@ -30,11 +30,15 @@ extern SV ** Perl_stack_base;
#define GC_DISP 0
#ifndef __cplusplus
+#if __STDC_VERSION__ >= 202311L
+ /* bool is part of the C23 standard */
+#else
#undef bool
#undef true
#undef false
typedef enum bool { false, true, } bool;
#endif
+#endif
/* ΚΈ */
enum charcode_t
diff --git a/sjis_doti.c b/sjis_doti.c
index 982041e..5aa233e 100644
--- a/sjis_doti.c
+++ b/sjis_doti.c
@@ -5,11 +5,15 @@
#include <stdio.h>
#ifndef __cplusplus
+#if __STDC_VERSION__ >= 202311L
+ /* bool is part of the C23 standard */
+#else
#undef bool
#undef true
#undef false
typedef enum bool { false, true, } bool;
#endif
+#endif
#define DISP_U2S 0
#define DISP_S2U 0
diff --git a/sjis_imode1.c b/sjis_imode1.c
index 83c36c2..201b2da 100644
--- a/sjis_imode1.c
+++ b/sjis_imode1.c
@@ -5,11 +5,15 @@
#include <stdio.h>
#ifndef __cplusplus
+#if __STDC_VERSION__ >= 202311L
+ /* bool is part of the C23 standard */
+#else
#undef bool
#undef true
#undef false
typedef enum bool { false, true, } bool;
#endif
+#endif
#define DISP_U2S 0
#define DISP_S2U 0
diff --git a/sjis_imode2.c b/sjis_imode2.c
index 3682259..d45d9d0 100644
--- a/sjis_imode2.c
+++ b/sjis_imode2.c
@@ -5,11 +5,15 @@
#include <stdio.h>
#ifndef __cplusplus
+#if __STDC_VERSION__ >= 202311L
+ /* bool is part of the C23 standard */
+#else
#undef bool
#undef true
#undef false
typedef enum bool { false, true, } bool;
#endif
+#endif
#define DISP_U2S 0
#define DISP_S2U 0
diff --git a/sjis_jsky1.c b/sjis_jsky1.c
index 46048b3..d962cfa 100644
--- a/sjis_jsky1.c
+++ b/sjis_jsky1.c
@@ -5,11 +5,15 @@
#include <stdio.h>
#ifndef __cplusplus
+#if __STDC_VERSION__ >= 202311L
+ /* bool is part of the C23 standard */
+#else
#undef bool
#undef true
#undef false
typedef enum bool { false, true, } bool;
#endif
+#endif
#define DISP_U2S 0
#define DISP_S2U 0
diff --git a/sjis_jsky2.c b/sjis_jsky2.c
index 8bb879c..1779bbb 100644
--- a/sjis_jsky2.c
+++ b/sjis_jsky2.c
@@ -5,11 +5,15 @@
#include <stdio.h>
#ifndef __cplusplus
+#if __STDC_VERSION__ >= 202311L
+ /* bool is part of the C23 standard */
+#else
#undef bool
#undef true
#undef false
typedef enum bool { false, true, } bool;
#endif
+#endif
#define DISP_U2S 0
#define DISP_S2U 0
|