Skip to content

Commit 6b70f38

Browse files
committed
Also test for 'void *' as third arg of accept() (as on Solaris 7 and 8),
but take it as 'int *' instead. Add real test for whether ld -R works on Unixware. Rename --enable-uniconv to --enable-unicode-conversion. Install shlibs mode 755 by default, since 644 causes gratuitous complaints from ldd et al. on some systems.
1 parent 343f615 commit 6b70f38

File tree

5 files changed

+461
-398
lines changed

5 files changed

+461
-398
lines changed

config/ac_func_accept_argtypes.m4

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Header: /cvsroot/pgsql/config/ac_func_accept_argtypes.m4,v 1.2 2000/08/26 21:11:45 petere Exp $
1+
# $Header: /cvsroot/pgsql/config/ac_func_accept_argtypes.m4,v 1.3 2000/11/09 18:18:42 petere Exp $
22
# This comes from the official Autoconf macro archive at
33
# <http://research.cys.de/autoconf-archive/>
44
# (I removed the $ before the Id CVS keyword below.)
@@ -32,6 +32,10 @@ dnl
3232
#
3333
# arg2 can also be `const' (e.g., RH 4.2). Change the order of tests
3434
# for arg3 so that `int' is first, in case there is no prototype at all.
35+
#
36+
# Solaris 7 and 8 have arg3 as 'void *' (disguised as 'Psocklen_t'
37+
# which is *not* 'socklen_t *'). If we detect that, then we assume
38+
# 'int' as the result, because that ought to work best.
3539

3640
AC_DEFUN(AC_FUNC_ACCEPT_ARGTYPES,
3741
[AC_MSG_CHECKING([types of arguments for accept()])
@@ -40,22 +44,25 @@ AC_DEFUN(AC_FUNC_ACCEPT_ARGTYPES,
4044
[AC_CACHE_VAL(ac_cv_func_accept_arg3,dnl
4145
[for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; do
4246
for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
43-
for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int'; do
47+
for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
4448
AC_TRY_COMPILE(
4549
[#ifdef HAVE_SYS_TYPES_H
4650
#include <sys/types.h>
4751
#endif
4852
#ifdef HAVE_SYS_SOCKET_H
4953
#include <sys/socket.h>
5054
#endif
51-
extern accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);],
55+
extern int accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);],
5256
[], [ac_not_found=no; break 3], [ac_not_found=yes])
5357
done
5458
done
5559
done
5660
if test "$ac_not_found" = yes; then
5761
AC_MSG_ERROR([could not determine argument types])
5862
fi
63+
if test "$ac_cv_func_accept_arg3" = "void"; then
64+
ac_cv_func_accept_arg3=int
65+
fi
5966
])dnl AC_CACHE_VAL
6067
])dnl AC_CACHE_VAL
6168
])dnl AC_CACHE_VAL

0 commit comments

Comments
 (0)