summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Kokot <peterkokot@gmail.com>2019-07-18 12:11:19 +0200
committerPeter Kokot <peterkokot@gmail.com>2019-07-18 12:11:19 +0200
commitbbdbc2658cb60b42652a398571de6402b5007f54 (patch)
tree2917ba69233e8532f4127dc83f47fc1b1d441536
parent562591f5eb3ff71711a06da21e552932bff82c08 (diff)
downloadphp-git-bbdbc2658cb60b42652a398571de6402b5007f54.tar.gz
Remove duplicate socklen_t check
- Use Autoconf's default AC_CHECK_TYPES Closes GH-4418
-rw-r--r--build/php.m420
-rw-r--r--configure.ac10
-rw-r--r--sapi/cgi/config9.m46
3 files changed, 9 insertions, 27 deletions
diff --git a/build/php.m4 b/build/php.m4
index a17a4b9b60..3624a33a8e 100644
--- a/build/php.m4
+++ b/build/php.m4
@@ -1323,26 +1323,6 @@ fi
])
dnl
-dnl PHP_SOCKLEN_T
-dnl
-AC_DEFUN([PHP_SOCKLEN_T],[
-AC_CACHE_CHECK(for socklen_t,ac_cv_socklen_t,
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#include <sys/types.h>
-#include <sys/socket.h>
-]],[[
-socklen_t x;
-]])],[
- ac_cv_socklen_t=yes
-],[
- ac_cv_socklen_t=no
-]))
-if test "$ac_cv_socklen_t" = "yes"; then
- AC_DEFINE(HAVE_SOCKLEN_T, 1, [Whether you have socklen_t])
-fi
-])
-
-dnl
dnl PHP_MISSING_FCLOSE_DECL
dnl
dnl See if we have broken header files like SunOS has.
diff --git a/configure.ac b/configure.ac
index 67082077c8..36c6e5e3e2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -498,7 +498,15 @@ AC_STRUCT_TIMEZONE
PHP_MISSING_TIME_R_DECL
PHP_MISSING_FCLOSE_DECL
PHP_STRUCT_FLOCK
-PHP_SOCKLEN_T
+
+AC_CHECK_TYPES(socklen_t, [], [], [
+ #ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_SOCKET_H
+ # include <sys/socket.h>
+ #endif
+])
dnl These are defined elsewhere than stdio.h.
PHP_CHECK_SIZEOF(intmax_t, 0)
diff --git a/sapi/cgi/config9.m4 b/sapi/cgi/config9.m4
index a26f417933..ae927cd5f8 100644
--- a/sapi/cgi/config9.m4
+++ b/sapi/cgi/config9.m4
@@ -8,12 +8,6 @@ dnl CGI setup.
AC_MSG_CHECKING(for CGI build)
if test "$PHP_CGI" != "no"; then
AC_MSG_RESULT(yes)
- AC_MSG_CHECKING([for socklen_t in sys/socket.h])
- AC_EGREP_HEADER([socklen_t], [sys/socket.h],
- [AC_MSG_RESULT([yes])
- AC_DEFINE([HAVE_SOCKLEN_T], [1],
- [Define if the socklen_t typedef is in sys/socket.h])],
- AC_MSG_RESULT([no]))
AC_MSG_CHECKING([for sun_len in sys/un.h])
AC_EGREP_HEADER([sun_len], [sys/un.h],