Author: cazfi Date: Sat Feb 21 20:13:34 2015 New Revision: 28268 URL: http://svn.gna.org/viewcvs/freeciv?rev=28268&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: trunk/configure.ac trunk/gen_headers/freeciv_config.h.in trunk/utility/support.h Modified: trunk/configure.ac URL: http://svn.gna.org/viewcvs/freeciv/trunk/configure.ac?rev=28268&r1=28267&r2=28268&view=diff ============================================================================== --- trunk/configure.ac (original) +++ trunk/configure.ac Sat Feb 21 20:13:34 2015 @@ -1102,6 +1102,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: trunk/gen_headers/freeciv_config.h.in URL: http://svn.gna.org/viewcvs/freeciv/trunk/gen_headers/freeciv_config.h.in?rev=28268&r1=28267&r2=28268&view=diff ============================================================================== --- trunk/gen_headers/freeciv_config.h.in (original) +++ trunk/gen_headers/freeciv_config.h.in Sat Feb 21 20:13:34 2015 @@ -44,6 +44,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: trunk/utility/support.h URL: http://svn.gna.org/viewcvs/freeciv/trunk/utility/support.h?rev=28268&r1=28267&r2=28268&view=diff ============================================================================== --- trunk/utility/support.h (original) +++ trunk/utility/support.h Sat Feb 21 20:13:34 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