From bd647c156549b2f666e5fae80f1ca674b6cde895 Mon Sep 17 00:00:00 2001 From: Jun-ichi Takimoto Date: Mon, 16 Nov 2020 20:59:51 +0900 Subject: 47560: add includes/prototypes for tests in configure On macOS 11.0 it is now an error to use a function without prototype. --- configure.ac | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 995f010b9..549cae3d6 100644 --- a/configure.ac +++ b/configure.ac @@ -1395,6 +1395,10 @@ AH_TEMPLATE([TGETENT_ACCEPTS_NULL], AC_CACHE_CHECK(if tgetent accepts NULL, zsh_cv_func_tgetent_accepts_null, [AC_RUN_IFELSE([AC_LANG_SOURCE([[ +#include +#include +int tgetent(char *, char *); +char *tgetstr(char *, char **); main() { char buf[4096]; @@ -1419,6 +1423,10 @@ fi AC_CACHE_CHECK(if tgetent returns 0 on success, zsh_cv_func_tgetent_zero_success, [AC_RUN_IFELSE([AC_LANG_SOURCE([[ +#include +#include +int tgetent(char *, char*); +char *tgetstr(char *, char **); main() { char buf[4096]; @@ -1856,6 +1864,7 @@ zsh_cv_rlim_t_is_longer, #include #endif #include +#include main(){struct rlimit r;exit(sizeof(r.rlim_cur) <= sizeof(long));}]])],[zsh_cv_rlim_t_is_longer=yes],[zsh_cv_rlim_t_is_longer=no],[zsh_cv_rlim_t_is_longer=yes])]) if test x$zsh_cv_rlim_t_is_longer = xyes; then AC_CACHE_CHECK(if rlim_t is a quad, @@ -1866,6 +1875,7 @@ if test x$zsh_cv_rlim_t_is_longer = xyes; then #endif #include #include +#include main() { struct rlimit r; char buf[20]; @@ -1888,6 +1898,7 @@ else #include #endif #include +#include main(){struct rlimit r;r.rlim_cur=-1;exit(r.rlim_cur<0);}]])],[zsh_cv_type_rlim_t_is_unsigned=yes],[zsh_cv_type_rlim_t_is_unsigned=no],[zsh_cv_type_rlim_t_is_unsigned=no])]) if test x$zsh_cv_type_rlim_t_is_unsigned = xyes; then AC_DEFINE(RLIM_T_IS_UNSIGNED) @@ -2192,6 +2203,9 @@ zsh_cv_sys_fifo, [AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include +#include +#include +#include main() { char c; @@ -2233,6 +2247,7 @@ zsh_cv_sys_link, [AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include +#include main() { int ret; @@ -2265,6 +2280,7 @@ zsh_cv_sys_killesrch, #include #include #include +#include main() { int pid = (getpid() + 10000) & 0xffffff; @@ -2290,6 +2306,7 @@ if test x$signals_style = xPOSIX_SIGNALS; then [AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include +#include int child=0; void handler(sig) int sig; @@ -2341,6 +2358,7 @@ case "x$zsh_working_tcsetpgrp" in #include #include #include +#include main() { int fd; int ret; @@ -2384,6 +2402,10 @@ if test x$ac_cv_func_getpwnam = xyes; then zsh_cv_sys_getpwnam_faked, [AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include +#include +#include +#include +#include main() { struct passwd *pw1, *pw2; char buf[1024], name[1024]; @@ -2712,6 +2734,7 @@ elif test "x$dynamic" = xyes; then [AC_RUN_IFELSE([AC_LANG_SOURCE([[/* Test for whether ELF binaries are produced */ #include #include +#include main(argc, argv) int argc; char *argv[]; @@ -2865,6 +2888,7 @@ EOM AC_TRY_COMMAND($DLLD $LDFLAGS $DLLDFLAGS -o conftest.$DL_EXT conftest.o 1>&AS_MESSAGE_LOG_FD) && AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include +#include #ifdef HPUX10DYNAMIC #include #define RTLD_LAZY BIND_DEFERRED -- cgit 1.4.1