]> thyrsus.com Git - intercal.git/commitdiff
This should have gone with the last commit.
authorEric S. Raymond <esr@thyrsus.com>
Thu, 2 Sep 2010 00:37:27 +0000 (20:37 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 2 Sep 2010 00:37:27 +0000 (20:37 -0400)
src/ick_bool.h [new file with mode: 0644]

diff --git a/src/ick_bool.h b/src/ick_bool.h
new file mode 100644 (file)
index 0000000..20f4fbb
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+ * Hide difference between compilers with the C99 bool type and those without.
+ * The main reason this is desirable is so splint can do more rigorous checking
+ * on bools.
+ */
+
+/*@-redef@ -incondefs*/
+#ifdef __STDC_VERSION__
+#if __STDC_VERSION__ >= 199901L
+#include <stdbool.h>
+#endif
+#endif
+#ifndef __bool_true_false_are_defined
+typedef int bool;
+#define true 1
+#define false 0
+#define __bool_true_false_are_defined 1
+#endif
+/*@=redef =incondefs@*/