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
|
From: Andrej Shadura <andrewsh@debian.org>
Date: Sun, 7 Sep 2025 14:04:59 +0200
Subject: Use C23-compatible bool definition
---
hbf.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/hbf.c b/hbf.c
index 3c4fba9..d11e369 100644
--- a/hbf.c
+++ b/hbf.c
@@ -82,10 +82,25 @@
#define reg register
+#if __STDC_VERSION__ >= 202000
+
+#define TRUE true
+#define FALSE false
+
+#elif __STDC_VERSION__ >= 199901L
+
+#include <stdbool.h>
+#define TRUE true
+#define FALSE false
+
+#else
+
typedef int bool;
#define TRUE 1
#define FALSE 0
+#endif
+
#define Bit(n) (1<<(7 - (n)))
/*
|