summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2021-11-09 15:20:47 +0100
committerPeter Eisentraut <peter@eisentraut.org>2021-11-09 15:35:26 +0100
commitee3a1a5b636b69dde33d68c428dd56b3389a4538 (patch)
tree6943325f2baa9e3e70994b3edd79ea5534ed6ba7 /configure
parent4cd046c203bbca2955182f78eabc06e831ffdbb1 (diff)
downloadpostgresql-ee3a1a5b636b69dde33d68c428dd56b3389a4538.tar.gz
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
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure82
1 files changed, 11 insertions, 71 deletions
diff --git a/configure b/configure
index 4ffefe4655..e60e78efdf 100755
--- a/configure
+++ b/configure
@@ -14617,6 +14617,17 @@ _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>
#ifdef HAVE_SYS_UN_H
#include <sys/un.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 :