]> granicus.if.org Git - shadow/commitdiff
Allow usage of booleans in the source.
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 25 May 2008 20:37:51 +0000 (20:37 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 25 May 2008 20:37:51 +0000 (20:37 +0000)
ChangeLog
lib/defines.h

index 04d41b3488b3ad868699ceb4eaa871ae6663aea7..3ff7b476f8b7afe2f8aea1920b46d365d1adb6cb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-05-25  Nicolas François  <nicolas.francois@centraliens.net>
+
+       * configure.in, lib/defines.h: Allow usage of booleans in the
+       source.
+
 2008-05-25  Nicolas François  <nicolas.francois@centraliens.net>
 
        * configure.in: Allow --disable-man and --enable-man=no.
index a3ab5aaf910fc77d96e03292639503a1fcced5f6..e946109e4d51fe01a7340ccc4a01fb955528fd2e 100644 (file)
@@ -321,4 +321,20 @@ extern char *strerror ();
 # define unused
 #endif
 
+#if HAVE_STDBOOL_H
+# include <stdbool.h>
+#else
+# if ! HAVE__BOOL
+#  ifdef __cplusplus
+typedef bool _Bool;
+#  else
+typedef unsigned char _Bool;
+#  endif
+# endif
+# define bool _Bool
+# define false 0
+# define true 1
+# define __bool_true_false_are_defined 1
+#endif
+
 #endif                         /* _DEFINES_H_ */