mirror of
git://git.sv.gnu.org/autoconf
synced 2024-11-21 01:01:48 +08:00
1998-10-24 Ben Elliston <bje@cygnus.com>
* acspecific.m4 (AC_FUNC_SELECT_ARGTYPES): New macro. Detects the types of formal arguments to select(). Contributed by Lars Hecking <lhecking@nmrc.ucc.ie>. * acconfig.h (SELECT_TYPE_ARG1): Add. (SELECT_TYPE_ARG234): Likewise. (SELECT_TYPE_ARG5): Likewise.
This commit is contained in:
parent
3d53aae6bb
commit
9c71e5b8ef
@ -1,5 +1,13 @@
|
||||
1998-10-24 Ben Elliston <bje@cygnus.com>
|
||||
|
||||
* acspecific.m4 (AC_FUNC_SELECT_ARGTYPES): New macro. Detects the
|
||||
types of formal arguments to select(). Contributed by Lars Hecking
|
||||
<lhecking@nmrc.ucc.ie>.
|
||||
|
||||
* acconfig.h (SELECT_TYPE_ARG1): Add.
|
||||
(SELECT_TYPE_ARG234): Likewise.
|
||||
(SELECT_TYPE_ARG5): Likewise.
|
||||
|
||||
* config.guess: Hide warnings emitted by the HP linker when
|
||||
generating a PA 2.0 object file. Contributed by Marcus Thiessel
|
||||
<marcus@xemacs.org>.
|
||||
|
@ -188,6 +188,15 @@
|
||||
/* Define as the return type of signal handlers (int or void). */
|
||||
#undef RETSIGTYPE
|
||||
|
||||
/* Define to the type of arg1 for select(). */
|
||||
#undef SELECT_TYPE_ARG1
|
||||
|
||||
/* Define to the type of args 2, 3 and 4 for select(). */
|
||||
#undef SELECT_TYPE_ARG234
|
||||
|
||||
/* Define to the type of arg5 for select(). */
|
||||
#undef SELECT_TYPE_ARG5
|
||||
|
||||
/* Define if the `setpgrp' function takes no argument. */
|
||||
#undef SETPGRP_VOID
|
||||
|
||||
|
@ -1664,6 +1664,46 @@ test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
|
||||
AC_SUBST(LIBOBJS)dnl
|
||||
])
|
||||
|
||||
AC_DEFUN(AC_FUNC_SELECT_ARGTYPES,
|
||||
[AC_MSG_CHECKING([types of arguments for select()])
|
||||
AC_CACHE_VAL(ac_cv_func_select_arg234,dnl
|
||||
[AC_CACHE_VAL(ac_cv_func_select_arg1,dnl
|
||||
[AC_CACHE_VAL(ac_cv_func_select_arg5,dnl
|
||||
[for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
|
||||
for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
|
||||
for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
|
||||
AC_TRY_COMPILE(dnl
|
||||
[#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SELECT_H
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
extern select ($ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5);],,dnl
|
||||
[ac_not_found=no ; break 3],ac_not_found=yes)
|
||||
done
|
||||
done
|
||||
done
|
||||
])dnl AC_CACHE_VAL
|
||||
])dnl AC_CACHE_VAL
|
||||
])dnl AC_CACHE_VAL
|
||||
if test "$ac_not_found" = yes; then
|
||||
ac_cv_func_select_arg1=int
|
||||
ac_cv_func_select_arg234='int *'
|
||||
ac_cv_func_select_arg5='struct timeval *'
|
||||
fi
|
||||
AC_MSG_RESULT([$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5])
|
||||
AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG1,$ac_cv_func_select_arg1)
|
||||
AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG234,($ac_cv_func_select_arg234))
|
||||
AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG5,($ac_cv_func_select_arg5))
|
||||
])
|
||||
|
||||
|
||||
dnl ### Checks for structure members
|
||||
|
||||
|
@ -1664,6 +1664,46 @@ test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
|
||||
AC_SUBST(LIBOBJS)dnl
|
||||
])
|
||||
|
||||
AC_DEFUN(AC_FUNC_SELECT_ARGTYPES,
|
||||
[AC_MSG_CHECKING([types of arguments for select()])
|
||||
AC_CACHE_VAL(ac_cv_func_select_arg234,dnl
|
||||
[AC_CACHE_VAL(ac_cv_func_select_arg1,dnl
|
||||
[AC_CACHE_VAL(ac_cv_func_select_arg5,dnl
|
||||
[for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
|
||||
for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
|
||||
for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
|
||||
AC_TRY_COMPILE(dnl
|
||||
[#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SELECT_H
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
extern select ($ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5);],,dnl
|
||||
[ac_not_found=no ; break 3],ac_not_found=yes)
|
||||
done
|
||||
done
|
||||
done
|
||||
])dnl AC_CACHE_VAL
|
||||
])dnl AC_CACHE_VAL
|
||||
])dnl AC_CACHE_VAL
|
||||
if test "$ac_not_found" = yes; then
|
||||
ac_cv_func_select_arg1=int
|
||||
ac_cv_func_select_arg234='int *'
|
||||
ac_cv_func_select_arg5='struct timeval *'
|
||||
fi
|
||||
AC_MSG_RESULT([$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5])
|
||||
AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG1,$ac_cv_func_select_arg1)
|
||||
AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG234,($ac_cv_func_select_arg234))
|
||||
AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG5,($ac_cv_func_select_arg5))
|
||||
])
|
||||
|
||||
|
||||
dnl ### Checks for structure members
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user