]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
Try to be smarted about defining bool.
authorErik Rozendaal <erik@NLnetLabs.nl>
Tue, 22 Feb 2005 11:20:44 +0000 (11:20 +0000)
committerErik Rozendaal <erik@NLnetLabs.nl>
Tue, 22 Feb 2005 11:20:44 +0000 (11:20 +0000)
ldns/common.h

index 682725714d771124517720b14b5583bf90df1056..4fd595eb9c314b4f29ac967a5d10fd2bccf86957 100644 (file)
 #ifndef _LDNS_COMMON_H
 #define _LDNS_COMMON_H
 
-#ifdef HAVE_STDBOOL_H
-#include <stdbool.h>
-#else
+#if !defined(__cplusplus) && !defined(__bool_true_false_are_defined)
 
-#ifndef __cplusplus
+# if defined(HAVE_STDBOOL_H)
+#  include <stdbool.h>
+# else
 
 typedef unsigned char bool;
-#define false 0
-#define true  1
+#  define bool bool
+#  define false 0
+#  define true  1
+#  define __bool_true_false_are_defined 1
 
-#endif /* !__cplusplus */
+# endif
 
-#endif /* !HAVE_STDBOOL_H */
+#endif
 
 #ifdef HAVE_ATTR_FORMAT
 #define ATTR_FORMAT(archetype, string_index, first_to_check) \