check for <sys/select.h> before <sys/types.h> (bb #452)

git-svn: trunk@4016
0.95
Török Edvin 17 years ago
parent e82a6578fa
commit 33e22cc04f
  1. 4
      ChangeLog
  2. 64
      configure
  3. 26
      configure.in

@ -1,3 +1,7 @@
Tue Jul 29 10:29:54 EEST 2008 (edwin)
-------------------------------------
* configure.in: check for <sys/select.h> before <sys/types.h> (bb #452)
Tue Jul 29 03:53:31 CEST 2008 (acab)
------------------------------------
* libclamav/disasm.c: change output struct

64
configure vendored

@ -19058,7 +19058,35 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <sys/types.h>
#include <sys/select.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "fd_mask" >/dev/null 2>&1; then
have_fd_set=yes
fi
rm -f conftest*
if test $have_fd_set = yes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_SYS_SELECT_H 1
_ACEOF
{ echo "$as_me:$LINENO: result: yes, found in sys/select.h" >&5
echo "${ECHO_T}yes, found in sys/select.h" >&6; }
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <sys/time.h>
#include <sys/types.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
int
main ()
{
@ -19093,42 +19121,18 @@ sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
if test $have_fd_set = yes; then
{ echo "$as_me:$LINENO: result: yes, found in sys/types.h" >&5
if test $have_fd_set = yes; then
{ echo "$as_me:$LINENO: result: yes, found in sys/types.h" >&5
echo "${ECHO_T}yes, found in sys/types.h" >&6; }
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <sys/select.h>
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "fd_mask" >/dev/null 2>&1; then
have_fd_set=yes
fi
rm -f conftest*
if test $have_fd_set = yes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_SYS_SELECT_H 1
_ACEOF
{ echo "$as_me:$LINENO: result: yes, found in sys/select.h" >&5
echo "${ECHO_T}yes, found in sys/select.h" >&6; }
else
else
cat >>confdefs.h <<\_ACEOF
#define NO_FD_SET 1
_ACEOF
{ echo "$as_me:$LINENO: result: no" >&5
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi
fi
fi
{ echo "$as_me:$LINENO: checking default FD_SETSIZE value" >&5

@ -1417,19 +1417,23 @@ fi
dnl Check if <sys/select.h> needs to be included for fd_set
AC_MSG_CHECKING([for fd_set])
AC_TRY_COMPILE([#include <sys/types.h>],
[fd_set readMask, writeMask;], have_fd_set=yes, have_fd_set=no)
AC_HEADER_EGREP([fd_mask], [sys/select.h], [have_fd_set=yes])
if test $have_fd_set = yes; then
AC_MSG_RESULT([yes, found in sys/types.h])
AC_DEFINE([HAVE_SYS_SELECT_H], 1, "have <sys/select.h>")
AC_MSG_RESULT([yes, found in sys/select.h])
else
AC_HEADER_EGREP([fd_mask], [sys/select.h], [have_fd_set=yes])
if test $have_fd_set = yes; then
AC_DEFINE([HAVE_SYS_SELECT_H], 1, "have <sys/select.h>")
AC_MSG_RESULT([yes, found in sys/select.h])
else
AC_DEFINE([NO_FD_SET], 1, "no fd_set")
AC_MSG_RESULT(no)
fi
AC_TRY_COMPILE([#include <sys/time.h>
#include <sys/types.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif],
[fd_set readMask, writeMask;], have_fd_set=yes, have_fd_set=no)
if test $have_fd_set = yes; then
AC_MSG_RESULT([yes, found in sys/types.h])
else
AC_DEFINE([NO_FD_SET], 1, "no fd_set")
AC_MSG_RESULT(no)
fi
fi
AC_MSG_CHECKING([default FD_SETSIZE value])

Loading…
Cancel
Save