summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorEven <eventh@gmail.com>2011-09-18 15:14:08 +0200
committerEven <eventh@gmail.com>2011-09-18 15:14:08 +0200
commitf08560d1392ff7b12a0829b933dc6db3bbddcfe4 (patch)
tree8c5d671987c16386a45349ecc07561efd633a770 /utils
parent1ff510dfeaa2958282604a1ace97a352b51286d2 (diff)
downloadpycparser-f08560d1392ff7b12a0829b933dc6db3bbddcfe4.tar.gz
Added support for C99 _Bool type.
Also added stdbool.h to fake_libc_includes, and its defines and typedefs to _fake_defines.h and _fake_typedefs.h.
Diffstat (limited to 'utils')
-rw-r--r--utils/fake_libc_include/_fake_defines.h5
-rw-r--r--utils/fake_libc_include/_fake_typedefs.h3
-rw-r--r--utils/fake_libc_include/stdbool.h2
3 files changed, 9 insertions, 1 deletions
diff --git a/utils/fake_libc_include/_fake_defines.h b/utils/fake_libc_include/_fake_defines.h
index 4a30792..8267091 100644
--- a/utils/fake_libc_include/_fake_defines.h
+++ b/utils/fake_libc_include/_fake_defines.h
@@ -23,6 +23,9 @@
#define RAND_MAX 32767
#define INT_MAX 32767
-
+/* C99 stdbool.h defines */
+#define __bool_true_false_are_defined 1
+#define false 0
+#define true 1
#endif
diff --git a/utils/fake_libc_include/_fake_typedefs.h b/utils/fake_libc_include/_fake_typedefs.h
index 6c95c51..0f82d4a 100644
--- a/utils/fake_libc_include/_fake_typedefs.h
+++ b/utils/fake_libc_include/_fake_typedefs.h
@@ -87,4 +87,7 @@ typedef int uint32_t;
typedef int int64_t;
typedef int uint64_t;
+/* C99 stdbool.h bool type */
+typedef _Bool bool;
+
#endif
diff --git a/utils/fake_libc_include/stdbool.h b/utils/fake_libc_include/stdbool.h
new file mode 100644
index 0000000..f2992f3
--- /dev/null
+++ b/utils/fake_libc_include/stdbool.h
@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"