mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Remove check for accept() argument types
This check was used to accommodate a staggering variety in particular in the type of the third argument of accept(). This is no longer of concern on currently supported systems. We can just use socklen_t in the code and put in a simple check that substitutes int for socklen_t if it's missing, to cover the few stragglers. Reviewed-by: Andres Freund <andres@anarazel.de> Discussion: https://www.postgresql.org/message-id/3538f4c4-1886-64f2-dcff-aaad8267fb82@enterprisedb.com
This commit is contained in:
82
configure
vendored
82
configure
vendored
@ -14615,6 +14615,17 @@ cat >>confdefs.h <<_ACEOF
|
||||
_ACEOF
|
||||
|
||||
|
||||
fi
|
||||
|
||||
ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/socket.h>
|
||||
"
|
||||
if test "x$ac_cv_type_socklen_t" = xyes; then :
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_SOCKLEN_T 1
|
||||
_ACEOF
|
||||
|
||||
|
||||
fi
|
||||
|
||||
ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
|
||||
@ -15327,77 +15338,6 @@ if test x"$pgac_cv_var_int_timezone" = xyes ; then
|
||||
$as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
|
||||
$as_echo_n "checking types of arguments for accept()... " >&6; }
|
||||
if ${ac_cv_func_accept_return+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if ${ac_cv_func_accept_arg1+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if ${ac_cv_func_accept_arg2+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if ${ac_cv_func_accept_arg3+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
for ac_cv_func_accept_return in 'int' 'SOCKET WSAAPI' 'unsigned int PASCAL'; do
|
||||
for ac_cv_func_accept_arg1 in 'int' 'SOCKET' 'unsigned int'; do
|
||||
for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
|
||||
for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
ac_not_found=no; break 4
|
||||
else
|
||||
ac_not_found=yes
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
done
|
||||
done
|
||||
done
|
||||
done
|
||||
if test "$ac_not_found" = yes; then
|
||||
as_fn_error $? "could not determine argument types" "$LINENO" 5
|
||||
fi
|
||||
if test "$ac_cv_func_accept_arg3" = "void"; then
|
||||
ac_cv_func_accept_arg3=int
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&5
|
||||
$as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
|
||||
_ACEOF
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
|
||||
_ACEOF
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
|
||||
_ACEOF
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
|
||||
_ACEOF
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
|
||||
$as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
|
||||
if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
|
||||
|
Reference in New Issue
Block a user