Author: cazfi
Date: Fri Mar 20 06:09:50 2015
New Revision: 28587

URL: http://svn.gna.org/viewcvs/freeciv?rev=28587&view=rev
Log:
Control integer types definition header inclusions with macros defined in public
freeciv_config.h

See patch #5933

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=28587&r1=28586&r2=28587&view=diff
==============================================================================
--- branches/S2_6/configure.ac  (original)
+++ branches/S2_6/configure.ac  Fri Mar 20 06:09:50 2015
@@ -1105,7 +1105,10 @@
 ])
 AC_TYPE_INTPTR_T
 dnl Headers that might contain the intptr_t definition found earlier
-AC_CHECK_HEADERS([inttypes.h stdint.h])
+AC_CHECK_HEADERS([inttypes.h],
+  [AC_DEFINE([FREECIV_HAVE_INTTYPES_H], [1], [inttypes.h available])])
+AC_CHECK_HEADERS([stdint.h],
+  [AC_DEFINE([FREECIV_HAVE_STDINT_H], [1], [stdint.h available])])
 
 dnl Checks for library functions.
 AC_FUNC_FORK

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=28587&r1=28586&r2=28587&view=diff
==============================================================================
--- branches/S2_6/gen_headers/freeciv_config.h.in       (original)
+++ branches/S2_6/gen_headers/freeciv_config.h.in       Fri Mar 20 06:09:50 2015
@@ -41,6 +41,12 @@
 /* libintl.h available */
 #undef FREECIV_HAVE_LIBINTL_H
 
+/* inttypes.h available */
+#undef FREECIV_HAVE_INTTYPES_H
+
+/* stdint.h available */
+#undef FREECIV_HAVE_STDINT_H
+
 /* Have standard compliant stdbool.h */
 #undef FREECIV_HAVE_STDBOOL_H
 

Modified: branches/S2_6/utility/support.h
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/utility/support.h?rev=28587&r1=28586&r2=28587&view=diff
==============================================================================
--- branches/S2_6/utility/support.h     (original)
+++ branches/S2_6/utility/support.h     Fri Mar 20 06:09:50 2015
@@ -69,13 +69,13 @@
 
 /* intptr_t header */
 /* Prefer full inttypes.h if present. */
-#ifdef HAVE_INTTYPES_H
+#ifdef FREECIV_HAVE_INTTYPES_H
 #include <inttypes.h>
 #else
-#ifdef HAVE_STDINT_H
+#ifdef FREECIV_HAVE_STDINT_H
 #include <stdint.h>
-#endif /* HAVE_STDINT_H */
-#endif /* HAVE_INTTYPES_H */
+#endif /* FREECIV_HAVE_STDINT_H */
+#endif /* FREECIV_HAVE_INTTYPES_H */
 
 /* Want to use GCC's __attribute__ keyword to check variadic
  * parameters to printf-like functions, without upsetting other


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

Reply via email to