mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Bug 975634 - Detect posix_fadvise() via configure. r=glandium
This commit is contained in:
parent
0571ecbb6d
commit
8e35f9b4b4
14
configure.in
14
configure.in
@ -8675,19 +8675,7 @@ fi
|
||||
AC_SUBST(MOZ_EM_DEBUG)
|
||||
|
||||
if test -n "$COMPILE_ENVIRONMENT"; then
|
||||
AC_MSG_CHECKING([for posix_fallocate])
|
||||
AC_TRY_LINK([#define _XOPEN_SOURCE 600
|
||||
#include <fcntl.h>],
|
||||
[posix_fallocate(0, 0, 0);],
|
||||
[ac_cv___posix_fallocate=true],
|
||||
[ac_cv___posix_fallocate=false])
|
||||
|
||||
if test "$ac_cv___posix_fallocate" = true ; then
|
||||
AC_DEFINE(HAVE_POSIX_FALLOCATE)
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
AC_CHECK_FUNCS(posix_fadvise posix_fallocate)
|
||||
|
||||
dnl Check for missing components
|
||||
if test "$MOZ_X11"; then
|
||||
|
@ -4026,19 +4026,7 @@ AC_SUBST(CXX_VERSION)
|
||||
AC_SUBST(MSMANIFEST_TOOL)
|
||||
AC_SUBST(MOZ_LINKER)
|
||||
|
||||
AC_MSG_CHECKING([for posix_fallocate])
|
||||
AC_TRY_LINK([#define _XOPEN_SOURCE 600
|
||||
#include <fcntl.h>],
|
||||
[posix_fallocate(0, 0, 0);],
|
||||
[ac_cv___posix_fallocate=true],
|
||||
[ac_cv___posix_fallocate=false])
|
||||
|
||||
if test "$ac_cv___posix_fallocate" = true ; then
|
||||
AC_DEFINE(HAVE_POSIX_FALLOCATE)
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
AC_CHECK_FUNCS(posix_fadvise posix_fallocate)
|
||||
|
||||
dnl Check for missing components
|
||||
if test "$COMPILE_ENVIRONMENT"; then
|
||||
|
@ -382,7 +382,7 @@ nsLocalFile::OpenNSPRFileDesc(int32_t flags, int32_t mode, PRFileDesc **_retval)
|
||||
PR_Delete(mPath.get());
|
||||
}
|
||||
|
||||
#if defined(LINUX) && !defined(ANDROID)
|
||||
#if defined(HAVE_POSIX_FADVISE)
|
||||
if (flags & OS_READAHEAD) {
|
||||
posix_fadvise(PR_FileDesc2NativeHandle(*_retval), 0, 0,
|
||||
POSIX_FADV_SEQUENTIAL);
|
||||
|
Loading…
Reference in New Issue
Block a user