summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Eisentraut2016-08-30 16:00:00 +0000
committerPeter Eisentraut2016-09-30 18:04:10 +0000
commita5da81359dbddfee49ea7800b43d99c204b4d31f (patch)
tree43969d043ee34c82b7bc33e0dccb5d085aece9b0
parent1c0cf52b39ca3a9a79661129cff918dc000a55eb (diff)
Add missing include files to configure tests
atoi() needs stdlib.h strcmp() needs string.h Reviewed-by: Heikki Linnakangas <[email protected]> Reviewed-by: Thomas Munro <[email protected]>
-rw-r--r--config/c-library.m44
-rwxr-xr-xconfigure2
2 files changed, 5 insertions, 1 deletions
diff --git a/config/c-library.m4 b/config/c-library.m4
index 0a7452c176..4ff8dae141 100644
--- a/config/c-library.m4
+++ b/config/c-library.m4
@@ -42,7 +42,8 @@ if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
fi
AC_CACHE_CHECK(for tzname, ac_cv_var_tzname,
[AC_LINK_IFELSE([AC_LANG_PROGRAM(
-[[#include <time.h>
+[[#include <stdlib.h>
+#include <time.h>
#ifndef tzname /* For SGI. */
extern char *tzname[]; /* RS6000 and others reject char **tzname. */
#endif
@@ -184,6 +185,7 @@ AC_DEFUN([PGAC_FUNC_SNPRINTF_LONG_LONG_INT_MODIFIER],
AC_CACHE_VAL(pgac_cv_snprintf_long_long_int_modifier,
[for pgac_modifier in 'll' 'q' 'I64'; do
AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
+#include <string.h>
typedef long long int ac_int64;
#define INT64_FORMAT "%${pgac_modifier}d"
diff --git a/configure b/configure
index 3eb0faf77d..1021fd539e 100755
--- a/configure
+++ b/configure
@@ -11569,6 +11569,7 @@ if ${ac_cv_var_tzname+:} false; then :
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+#include <stdlib.h>
#include <time.h>
#ifndef tzname /* For SGI. */
extern char *tzname[]; /* RS6000 and others reject char **tzname. */
@@ -13754,6 +13755,7 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
+#include <string.h>
typedef long long int ac_int64;
#define INT64_FORMAT "%${pgac_modifier}d"