From: Peter Kokot Date: Sun, 23 Jun 2019 20:04:03 +0000 (+0200) Subject: Clean headers checks X-Git-Tag: php-7.4.0alpha3~168 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2079b09854ba1b7990641450ab9a69a141f7718a;p=php Clean headers checks Some headers were checked multiple times in the main configure.ac file and in the bundled extensions or SAPIs themselves. Also many of these checks are then used accross other extensions or SAPIs so a central configure.ac makes most sense for these checks. --- diff --git a/Zend/Zend.m4 b/Zend/Zend.m4 index d859487498..5b97e6c361 100644 --- a/Zend/Zend.m4 +++ b/Zend/Zend.m4 @@ -126,16 +126,7 @@ dnl AC_DEFUN([LIBZEND_BASIC_CHECKS],[ AC_REQUIRE([AC_PROG_CC]) -AC_CHECK_HEADERS( -inttypes.h \ -stdint.h \ -malloc.h \ -unistd.h \ -sys/types.h \ -sys/time.h \ -unix.h \ -cpuid.h \ -dlfcn.h) +AC_CHECK_HEADERS([cpuid.h]) dnl dnl LIBZEND_DLSYM_CHECK diff --git a/configure.ac b/configure.ac index 450de11c16..0680a0acfa 100644 --- a/configure.ac +++ b/configure.ac @@ -436,12 +436,14 @@ ieeefp.h \ langinfo.h \ limits.h \ locale.h \ +malloc.h \ monetary.h \ netdb.h \ poll.h \ pwd.h \ resolv.h \ signal.h \ +strings.h \ syslog.h \ sysexits.h \ sys/ioctl.h \ @@ -457,6 +459,7 @@ sys/statfs.h \ sys/statvfs.h \ sys/vfs.h \ sys/sysexits.h \ +sys/uio.h \ sys/wait.h \ sys/loadavg.h \ termios.h \ diff --git a/ext/date/config0.m4 b/ext/date/config0.m4 index ebd86acc2e..38389503e1 100644 --- a/ext/date/config0.m4 +++ b/ext/date/config0.m4 @@ -1,8 +1,5 @@ dnl Check for headers needed by timelib -AC_CHECK_HEADERS([ \ -strings.h \ -io.h -]) +AC_CHECK_HEADERS([io.h]) dnl Check for strtoll, atoll AC_CHECK_FUNCS(strtoll atoll) diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 index 4d8f3a5888..dc32c5b94f 100644 --- a/ext/opcache/config.m4 +++ b/ext/opcache/config.m4 @@ -21,8 +21,6 @@ if test "$PHP_OPCACHE" != "no"; then AC_DEFINE(HAVE_MPROTECT, 1, [Define if you have mprotect() function]) ]) - AC_CHECK_HEADERS([unistd.h sys/uio.h]) - AC_MSG_CHECKING(for sysvipc shared memory support) AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include diff --git a/ext/sockets/config.m4 b/ext/sockets/config.m4 index 405b68d288..71cebdb3e2 100644 --- a/ext/sockets/config.m4 +++ b/ext/sockets/config.m4 @@ -17,7 +17,7 @@ if test "$PHP_SOCKETS" != "no"; then fi AC_CHECK_FUNCS([hstrerror socketpair if_nametoindex if_indextoname]) - AC_CHECK_HEADERS([netdb.h netinet/tcp.h sys/un.h sys/sockio.h]) + AC_CHECK_HEADERS([netinet/tcp.h sys/un.h sys/sockio.h]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #include diff --git a/ext/standard/config.m4 b/ext/standard/config.m4 index 891fca2ffa..b0ec90900b 100644 --- a/ext/standard/config.m4 +++ b/ext/standard/config.m4 @@ -448,7 +448,6 @@ AC_CHECK_HEADERS([net/if.h],[], [], #endif #include ]) -AC_CHECK_HEADERS([netdb.h]) AC_MSG_CHECKING([for usable getifaddrs]) AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include diff --git a/sapi/fpm/config.m4 b/sapi/fpm/config.m4 index 67ffc10522..24d42d2bf0 100644 --- a/sapi/fpm/config.m4 +++ b/sapi/fpm/config.m4 @@ -11,11 +11,6 @@ AC_DEFUN([AC_FPM_STDLIBS], AC_SEARCH_LIBS(socket, socket) AC_SEARCH_LIBS(inet_addr, nsl) - - AC_CHECK_HEADERS([fcntl.h unistd.h sys/uio.h]) - AC_CHECK_HEADERS([sys/select.h sys/socket.h sys/time.h]) - AC_CHECK_HEADERS([arpa/inet.h netinet/in.h]) - AC_CHECK_HEADERS([sysexits.h]) ]) AC_DEFUN([AC_FPM_PRCTL],