configure: Fix detection of fallocate on old glibc.

oldstable
Hans Leidekker 2012-12-07 09:22:40 +01:00 committed by Alexandre Julliard
parent 8818e25954
commit 3244be0500
2 changed files with 43 additions and 2 deletions

35
configure vendored
View File

@ -12931,7 +12931,6 @@ for ac_func in \
chsize \
dlopen \
epoll_create \
fallocate \
ffs \
finite \
fnmatch \
@ -13494,6 +13493,40 @@ $as_echo "#define HAVE_SCHED_SETAFFINITY 1" >>confdefs.h
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fallocate" >&5
$as_echo_n "checking for fallocate... " >&6; }
if ${wine_cv_have_fallocate+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#define _GNU_SOURCE
#include <fcntl.h>
int
main ()
{
fallocate(-1, 0, 0, 0);
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
wine_cv_have_fallocate=yes
else
wine_cv_have_fallocate=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $wine_cv_have_fallocate" >&5
$as_echo "$wine_cv_have_fallocate" >&6; }
if test "$wine_cv_have_fallocate" = "yes"
then
$as_echo "#define HAVE_FALLOCATE 1" >>confdefs.h
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
$as_echo_n "checking for inline... " >&6; }

View File

@ -1976,7 +1976,6 @@ AC_CHECK_FUNCS(\
chsize \
dlopen \
epoll_create \
fallocate \
ffs \
finite \
fnmatch \
@ -2117,6 +2116,15 @@ then
AC_DEFINE(HAVE_SCHED_SETAFFINITY, 1, [Define to 1 if you have the `sched_setaffinity' function.])
fi
AC_CACHE_CHECK([for fallocate],wine_cv_have_fallocate,
AC_LINK_IFELSE([AC_LANG_PROGRAM(
[[#define _GNU_SOURCE
#include <fcntl.h>]], [[fallocate(-1, 0, 0, 0);]])],[wine_cv_have_fallocate=yes],[wine_cv_have_fallocate=no]))
if test "$wine_cv_have_fallocate" = "yes"
then
AC_DEFINE(HAVE_FALLOCATE, 1, [Define to 1 if you have the `fallocate' function.])
fi
dnl **** Check for types ****
AC_C_INLINE