|
1 |
| -# $Header: /cvsroot/pgsql/aclocal.m4,v 1.3 2000/06/14 18:17:24 petere Exp $ |
| 1 | +# $Header: /cvsroot/pgsql/aclocal.m4,v 1.4 2000/08/26 21:11:44 petere Exp $ |
2 | 2 | # This comes from the official Autoconf macro archive at
|
3 | 3 | # <http://research.cys.de/autoconf-archive/>
|
4 | 4 | # (I removed the $ before the Id CVS keyword below.)
|
|
29 | 29 | # use the macro to define a corresponding variable. We also make the
|
30 | 30 | # reasonable(?) assumption that you can use arg3 for getsocktype etc.
|
31 | 31 | # as well (i.e., anywhere POSIX.2 has socklen_t).
|
| 32 | +# |
| 33 | +# arg2 can also be `const' (e.g., RH 4.2). Change the order of tests |
| 34 | +# for arg3 so that `int' is first, in case there is no prototype at all. |
32 | 35 |
|
33 | 36 | AC_DEFUN(AC_FUNC_ACCEPT_ARGTYPES,
|
34 | 37 | [AC_MSG_CHECKING([types of arguments for accept()])
|
35 | 38 | AC_CACHE_VAL(ac_cv_func_accept_arg1,dnl
|
36 | 39 | [AC_CACHE_VAL(ac_cv_func_accept_arg2,dnl
|
37 | 40 | [AC_CACHE_VAL(ac_cv_func_accept_arg3,dnl
|
38 | 41 | [for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; do
|
39 |
| - for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'void *'; do |
40 |
| - for ac_cv_func_accept_arg3 in 'socklen_t' 'size_t' 'unsigned int' 'int'; do |
41 |
| - AC_TRY_COMPILE(dnl |
| 42 | + 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 |
| 44 | + AC_TRY_COMPILE( |
42 | 45 | [#ifdef HAVE_SYS_TYPES_H
|
43 | 46 | #include <sys/types.h>
|
44 | 47 | #endif
|
45 | 48 | #ifdef HAVE_SYS_SOCKET_H
|
46 | 49 | #include <sys/socket.h>
|
47 | 50 | #endif
|
48 |
| -extern accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);],,dnl |
49 |
| - [ac_not_found=no ; break 3], ac_not_found=yes) |
| 51 | +extern accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);], |
| 52 | + [], [ac_not_found=no; break 3], [ac_not_found=yes]) |
50 | 53 | done
|
51 | 54 | done
|
52 | 55 | done
|
| 56 | + if test "$ac_not_found" = yes; then |
| 57 | + AC_MSG_ERROR([could not determine argument types]) |
| 58 | + fi |
53 | 59 | ])dnl AC_CACHE_VAL
|
54 | 60 | ])dnl AC_CACHE_VAL
|
55 | 61 | ])dnl AC_CACHE_VAL
|
56 |
| - if test "$ac_not_found" = yes; then |
57 |
| - ac_cv_func_accept_arg1=int |
58 |
| - ac_cv_func_accept_arg2='struct sockaddr *' |
59 |
| - ac_cv_func_accept_arg3='socklen_t' |
60 |
| - fi |
61 | 62 | AC_MSG_RESULT([$ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *])
|
62 | 63 | AC_DEFINE_UNQUOTED(ACCEPT_TYPE_ARG1,$ac_cv_func_accept_arg1)
|
63 | 64 | AC_DEFINE_UNQUOTED(ACCEPT_TYPE_ARG2,$ac_cv_func_accept_arg2)
|
64 | 65 | AC_DEFINE_UNQUOTED(ACCEPT_TYPE_ARG3,$ac_cv_func_accept_arg3)
|
65 | 66 | ])
|
66 | 67 | # Macros to detect C compiler features
|
67 |
| -# $Header: /cvsroot/pgsql/aclocal.m4,v 1.3 2000/06/14 18:17:24 petere Exp $ |
| 68 | +# $Header: /cvsroot/pgsql/aclocal.m4,v 1.4 2000/08/26 21:11:44 petere Exp $ |
68 | 69 |
|
69 | 70 |
|
70 | 71 | # PGAC_C_SIGNED
|
@@ -184,7 +185,7 @@ undefine([AC_TYPE_NAME])dnl
|
184 | 185 | undefine([AC_CV_NAME])dnl
|
185 | 186 | ])# PGAC_CHECK_ALIGNOF
|
186 | 187 | # Macros that test various C library quirks
|
187 |
| -# $Header: /cvsroot/pgsql/aclocal.m4,v 1.3 2000/06/14 18:17:24 petere Exp $ |
| 188 | +# $Header: /cvsroot/pgsql/aclocal.m4,v 1.4 2000/08/26 21:11:44 petere Exp $ |
188 | 189 |
|
189 | 190 |
|
190 | 191 | # PGAC_VAR_INT_TIMEZONE
|
|
263 | 264 | HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
|
264 | 265 | AC_SUBST(HAVE_POSIX_SIGNALS)])# PGAC_FUNC_POSIX_SIGNALS
|
265 | 266 | # Macros to detect certain C++ features
|
266 |
| -# $Header: /cvsroot/pgsql/aclocal.m4,v 1.3 2000/06/14 18:17:24 petere Exp $ |
| 267 | +# $Header: /cvsroot/pgsql/aclocal.m4,v 1.4 2000/08/26 21:11:44 petere Exp $ |
267 | 268 |
|
268 | 269 |
|
269 | 270 | # PGAC_CLASS_STRING
|
@@ -332,7 +333,7 @@ fi])# PGAC_CXX_NAMESPACE_STD
|
332 | 333 | #
|
333 | 334 | # Autoconf macros for configuring the build of Python extension modules
|
334 | 335 | #
|
335 |
| -# $Header: /cvsroot/pgsql/aclocal.m4,v 1.3 2000/06/14 18:17:24 petere Exp $ |
| 336 | +# $Header: /cvsroot/pgsql/aclocal.m4,v 1.4 2000/08/26 21:11:44 petere Exp $ |
336 | 337 | #
|
337 | 338 |
|
338 | 339 | # PGAC_PROG_PYTHON
|
|
0 commit comments