summaryrefslogtreecommitdiff
path: root/include/stdbool.h
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>1999-09-24 22:33:11 +0000
committerMarc Espie <espie@cvs.openbsd.org>1999-09-24 22:33:11 +0000
commit71dfdfb38edd5502ea614c8765f194ba86d2cec3 (patch)
tree2dae1f5778caf5293468a4cb1350675d6eca883c /include/stdbool.h
parent9587ac57ad39f243750d94ca4c1f0a970023674a (diff)
stdbool.h conforming to C9X
Diffstat (limited to 'include/stdbool.h')
-rw-r--r--include/stdbool.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/stdbool.h b/include/stdbool.h
new file mode 100644
index 00000000000..f2cd0a27142
--- /dev/null
+++ b/include/stdbool.h
@@ -0,0 +1,21 @@
+/* $OpenBSD: stdbool.h,v 1.1 1999/09/24 22:33:10 espie Exp $ */
+#ifndef _STDBOOL_H_
+#define _STDBOOL_H_
+
+/* `_Bool' type must promote to `int' or `unsigned int'. */
+typedef enum {
+ false = 0,
+ true = 1
+} _Bool;
+
+/* And those constants must also be available as macros. */
+#define false false
+#define true true
+
+/* User visible type `bool' is provided as a macro which may be redefined */
+#define bool _Bool
+
+/* Inform that everything is fine */
+#define __bool_true_false_are_defined 1
+
+#endif /* _STDBOOL_H_ */