Author: cazfi
Date: Sat Feb 21 20:13:41 2015
New Revision: 28269

URL: http://svn.gna.org/viewcvs/freeciv?rev=28269&view=rev
Log:
Added public FREECIV_HAVE_STDBOOL_H to tell if stdbool.h should be used
to get bool defined.

See patch #5846

Modified:
    branches/S2_6/configure.ac
    branches/S2_6/gen_headers/freeciv_config.h.in
    branches/S2_6/utility/support.h

Modified: branches/S2_6/configure.ac
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/configure.ac?rev=28269&r1=28268&r2=28269&view=diff
==============================================================================
--- branches/S2_6/configure.ac  (original)
+++ branches/S2_6/configure.ac  Sat Feb 21 20:13:41 2015
@@ -1076,6 +1076,9 @@
 AC_CHECK_HEADERS([locale.h], [AC_DEFINE([FREECIV_HAVE_LOCALE_H], [1], 
[locale.h available])])
 AC_CHECK_HEADERS([libintl.h], [AC_DEFINE([FREECIV_HAVE_LIBINTL_H], [1], 
[libint.h available])])
 AC_HEADER_STDBOOL
+if test $ac_cv_header_stdbool_h = yes; then
+  AC_DEFINE([FREECIV_HAVE_STDBOOL_H], [1], [Have standard compliant stdbool.h])
+fi
 dnl Avoid including the unix emulation layer if we build mingw executables
 dnl There would be type conflicts between winsock and bsd/unix includes
 if test "x$MINGW32" != "xyes"; then

Modified: branches/S2_6/gen_headers/freeciv_config.h.in
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/gen_headers/freeciv_config.h.in?rev=28269&r1=28268&r2=28269&view=diff
==============================================================================
--- branches/S2_6/gen_headers/freeciv_config.h.in       (original)
+++ branches/S2_6/gen_headers/freeciv_config.h.in       Sat Feb 21 20:13:41 2015
@@ -41,6 +41,9 @@
 /* libintl.h available */
 #undef FREECIV_HAVE_LIBINTL_H
 
+/* Have standard compliant stdbool.h */
+#undef FREECIV_HAVE_STDBOOL_H
+
 /* jansson network protocol in use */
 #undef FREECIV_JSON_CONNECTION
 

Modified: branches/S2_6/utility/support.h
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/utility/support.h?rev=28269&r1=28268&r2=28269&view=diff
==============================================================================
--- branches/S2_6/utility/support.h     (original)
+++ branches/S2_6/utility/support.h     Sat Feb 21 20:13:41 2015
@@ -23,6 +23,8 @@
   Where the functions are available natively, these are just wrappers.
   See also mem.h, netintf.h, rand.h, and see support.c for more comments.
 ***********************************************************************/
+
+#include <freeciv_config.h>
 
 #include <dirent.h>
 #include <stdarg.h>
@@ -50,7 +52,7 @@
 #include <posix/be_prim.h>
 #define __bool_true_false_are_defined 1
 #else
-#ifdef HAVE_STDBOOL_H
+#ifdef FREECIV_HAVE_STDBOOL_H
 #include <stdbool.h>
 #else /* Implement <stdbool.h> ourselves */
 #undef bool
@@ -60,7 +62,7 @@
 #define true  1
 #define false 0
 #define __bool_true_false_are_defined 1
-#endif /* ! HAVE_STDBOOL_H */
+#endif /* ! FREECIV_HAVE_STDBOOL_H */
 #endif /* ! __BEOS__ */
 #endif /* __cplusplus */
 


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to