Author: cazfi
Date: Fri Mar 20 06:09:43 2015
New Revision: 28586

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

See patch #5933

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=28586&r1=28585&r2=28586&view=diff
==============================================================================
--- trunk/configure.ac  (original)
+++ trunk/configure.ac  Fri Mar 20 06:09:43 2015
@@ -1131,7 +1131,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: trunk/gen_headers/freeciv_config.h.in
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/gen_headers/freeciv_config.h.in?rev=28586&r1=28585&r2=28586&view=diff
==============================================================================
--- trunk/gen_headers/freeciv_config.h.in       (original)
+++ trunk/gen_headers/freeciv_config.h.in       Fri Mar 20 06:09:43 2015
@@ -44,6 +44,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: trunk/utility/support.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/utility/support.h?rev=28586&r1=28585&r2=28586&view=diff
==============================================================================
--- trunk/utility/support.h     (original)
+++ trunk/utility/support.h     Fri Mar 20 06:09:43 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