Skip to content

Remove duplicate socklen_t check #4418

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions build/php.m4
Original file line number Diff line number Diff line change
Expand Up @@ -1322,26 +1322,6 @@ if test "$ac_cv_struct_flock" = "yes" ; then
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
Expand Down
10 changes: 9 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,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)
Expand Down
6 changes: 0 additions & 6 deletions sapi/cgi/config9.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down