aboutsummaryrefslogtreecommitdiffstats
path: root/include/bool.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-05-06 23:10:50 -0700
committerChris Robinson <[email protected]>2014-05-06 23:10:50 -0700
commit38b98de78eceb77e0b2acc84877bf425ba0fb07d (patch)
tree0624c376a9705d16a0774254217fbae21c9df8cb /include/bool.h
parent1aff37114a930a6a7fab7067572133345398b542 (diff)
Check for C99 _Bool support
Diffstat (limited to 'include/bool.h')
-rw-r--r--include/bool.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/bool.h b/include/bool.h
new file mode 100644
index 00000000..6f714d09
--- /dev/null
+++ b/include/bool.h
@@ -0,0 +1,18 @@
+#ifndef AL_BOOL_H
+#define AL_BOOL_H
+
+#ifdef HAVE_STDBOOL_H
+#include <stdbool.h>
+#endif
+
+#ifndef bool
+#ifdef HAVE_C99_BOOL
+#define bool _Bool
+#else
+#define bool int
+#endif
+#define false 0
+#define true 1
+#endif
+
+#endif /* AL_BOOL_H */