setup_once.h: tighten requirements for stdbool.h header inclusion
authorYang Tse <yangsita@gmail.com>
Tue, 17 Apr 2012 11:18:33 +0000 (13:18 +0200)
committerYang Tse <yangsita@gmail.com>
Tue, 17 Apr 2012 11:30:01 +0000 (13:30 +0200)
Include stdbool.h only when it is available and configure is capable of
detecting a proper 'bool' data type when the header is included.

setup_once.h

index 48cb9b2..fc630ef 100644 (file)
@@ -2,7 +2,7 @@
 #define __SETUP_ONCE_H
 
 
-/* Copyright (C) 2004 - 2011 by Daniel Stenberg et al
+/* Copyright (C) 2004 - 2012 by Daniel Stenberg et al
  *
  * Permission to use, copy, modify, and distribute this software and its
  * documentation for any purpose and without fee is hereby granted, provided
@@ -72,7 +72,7 @@
 #include <fcntl.h>
 #endif
 
-#ifdef HAVE_STDBOOL_H
+#if defined(HAVE_STDBOOL_H) && defined(HAVE_BOOL_T)
 #include <stdbool.h>
 #endif
 
@@ -510,4 +510,3 @@ typedef int sig_atomic_t;
 
 
 #endif /* __SETUP_ONCE_H */
-