Merge pull request #37 from fmorgner/master
authorMartin Johansson <martin@fatbob.nu>
Tue, 22 Apr 2014 20:29:16 +0000 (22:29 +0200)
committerMartin Johansson <martin@fatbob.nu>
Tue, 22 Apr 2014 20:29:16 +0000 (22:29 +0200)
Use c99 standard bool when available

src/types.h

index cd451460425b9adc762bae51446971a5ddd6d7b2..a1c77b0afe8489e1d67513cd6a617db388e46a9c 100644 (file)
@@ -1,10 +1,19 @@
 #ifndef TYPES_H_90878954
 #define TYPES_H_90878954
 
+#if __STDC_VERSION__ >= 199901L
+
+#include <stdbool.h>
+typedef bool bool_t;
+
+#else // __STDC_VERSION__
+
 typedef enum {
        false,
        true
 } bool_t;
 
+#endif // __STDC_VERSION
+
 #endif