]> granicus.if.org Git - php/commitdiff
Remove not needed checking for <errno.h>
authorPeter Kokot <peterkokot@gmail.com>
Wed, 5 Sep 2018 19:34:40 +0000 (21:34 +0200)
committerPeter Kokot <peterkokot@gmail.com>
Sun, 9 Sep 2018 08:19:04 +0000 (10:19 +0200)
Header `<errno.h>` is part of the standard C89 headers [1] and on
current systems checking is not need anymore since PHP requires at
least C89. This is noted also by Autoconf itself in the docs and
code [2].

The Autoconf check defined the `HAVE_ERRNO_H` symbol when building PHP
with sockets extension or fpm sapi. This symbol is not utilized across
the PHP source code except in the current version of bundled GD library
which has worked ok so far also with sockets extension or fpm sapi
disabled anyway.

Refs:
[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
[2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4

ext/sockets/config.m4
sapi/fpm/config.m4

index 277a3a1dcd84baa389fbd8cb3ddc741ebeaf517b..525d7c011ae42038383d7d565e3a3816dd01653c 100644 (file)
@@ -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 errno.h])
+  AC_CHECK_HEADERS([netdb.h netinet/tcp.h sys/un.h sys/sockio.h])
   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #include <sys/types.h>
 #include <sys/socket.h>
index 44d842b285ebe4641cdec204ad2ff7d7383c47d8..b8e376d92be24d6c3e327bd1c0540e9f779a2383 100644 (file)
@@ -11,7 +11,7 @@ AC_DEFUN([AC_FPM_STDLIBS],
   AC_SEARCH_LIBS(socket, socket)
   AC_SEARCH_LIBS(inet_addr, nsl)
 
-  AC_CHECK_HEADERS([errno.h fcntl.h stdio.h stdlib.h unistd.h sys/uio.h])
+  AC_CHECK_HEADERS([fcntl.h stdio.h stdlib.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])