Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Feb 2014 03:06:04 GMT
From:      svn-freebsd-gecko@chruetertee.ch
To:        freebsd-gecko@freebsd.org
Subject:   [SVN-Commit] r1507 - in trunk: mail/thunderbird/files www/firefox-esr/files www/firefox-nightly/files www/firefox/files www/libxul/files www/seamonkey/files
Message-ID:  <201402220306.s1M364PT066611@trillian.chruetertee.ch>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Sat Feb 22 03:06:04 2014
New Revision: 1507

Log:
oops, backout POSIX_FADV_WILLNEED part as it doesn't block like readahead()

Modified:
   trunk/mail/thunderbird/files/patch-bug975634
   trunk/www/firefox-esr/files/patch-bug975634
   trunk/www/firefox-nightly/files/patch-bug975634
   trunk/www/firefox/files/patch-bug975634
   trunk/www/libxul/files/patch-bug975634
   trunk/www/seamonkey/files/patch-bug975634

Modified: trunk/mail/thunderbird/files/patch-bug975634
==============================================================================
--- trunk/mail/thunderbird/files/patch-bug975634	Sat Feb 22 01:48:14 2014	(r1506)
+++ trunk/mail/thunderbird/files/patch-bug975634	Sat Feb 22 03:06:04 2014	(r1507)
@@ -48,76 +48,6 @@
  AC_MSG_CHECKING([for posix_fallocate])
  AC_TRY_LINK([#define _XOPEN_SOURCE 600
    #include <fcntl.h>],
-diff --git xpcom/glue/FileUtils.cpp xpcom/glue/FileUtils.cpp
-index 66fe9e9..8bdf8f4 100644
---- mozilla/xpcom/glue/FileUtils.cpp
-+++ mozilla/xpcom/glue/FileUtils.cpp
-@@ -24,7 +24,7 @@
- #elif defined(XP_UNIX)
- #include <fcntl.h>
- #include <unistd.h>
--#if defined(LINUX)
-+#if defined(HAVE_POSIX_FADVISE)
- #include <elf.h>
- #endif
- #include <sys/types.h>
-@@ -185,7 +185,7 @@ mozilla::ReadAheadLib(nsIFile* aFile)
-     return;
-   }
-   ReadAheadLib(path.get());
--#elif defined(LINUX) && !defined(ANDROID) || defined(XP_MACOSX)
-+#elif defined(HAVE_POSIX_FADVISE) || defined(XP_MACOSX)
-   nsAutoCString nativePath;
-   if (!aFile || NS_FAILED(aFile->GetNativePath(nativePath))) {
-     return;
-@@ -204,7 +204,7 @@ mozilla::ReadAheadFile(nsIFile* aFile, const size_t aOffset,
-     return;
-   }
-   ReadAheadFile(path.get(), aOffset, aCount, aOutFd);
--#elif defined(LINUX) && !defined(ANDROID) || defined(XP_MACOSX)
-+#elif defined(HAVE_POSIX_FADVISE) || defined(XP_MACOSX)
-   nsAutoCString nativePath;
-   if (!aFile || NS_FAILED(aFile->GetNativePath(nativePath))) {
-     return;
-@@ -215,7 +215,7 @@ mozilla::ReadAheadFile(nsIFile* aFile, const size_t aOffset,
- 
- #endif // !defined(XPCOM_GLUE)
- 
--#if defined(LINUX) && !defined(ANDROID)
-+#if defined(HAVE_POSIX_FADVISE)
- 
- static const unsigned int bufsize = 4096;
- 
-@@ -341,9 +341,9 @@ mozilla::ReadAhead(mozilla::filedesc_t aFd, const size_t aOffset,
-   // Restore the file pointer
-   SetFilePointerEx(aFd, fpOriginal, nullptr, FILE_BEGIN);
- 
--#elif defined(LINUX) && !defined(ANDROID)
-+#elif defined(HAVE_POSIX_FADVISE)
- 
--  readahead(aFd, aOffset, aCount);
-+  posix_fadvise(aFd, aOffset, aCount, POSIX_FADV_WILLNEED);
- 
- #elif defined(XP_MACOSX)
- 
-@@ -364,7 +364,7 @@ mozilla::ReadAheadLib(mozilla::pathstr_t aFilePath)
-   }
- #if defined(XP_WIN)
-   ReadAheadFile(aFilePath);
--#elif defined(LINUX) && !defined(ANDROID)
-+#elif defined(HAVE_POSIX_FADVISE)
-   int fd = open(aFilePath, O_RDONLY);
-   if (fd < 0) {
-     return;
-@@ -486,7 +486,7 @@ mozilla::ReadAheadFile(mozilla::pathstr_t aFilePath, const size_t aOffset,
-   if (!aOutFd) {
-     CloseHandle(fd);
-   }
--#elif defined(LINUX) && !defined(ANDROID) || defined(XP_MACOSX)
-+#elif defined(HAVE_POSIX_FADVISE) || defined(XP_MACOSX)
-   if (!aFilePath) {
-     if (aOutFd) {
-       *aOutFd = -1;
 diff --git xpcom/io/nsLocalFileUnix.cpp xpcom/io/nsLocalFileUnix.cpp
 index bacf06c..0e46e4a 100644
 --- mozilla/xpcom/io/nsLocalFileUnix.cpp

Modified: trunk/www/firefox-esr/files/patch-bug975634
==============================================================================
--- trunk/www/firefox-esr/files/patch-bug975634	Sat Feb 22 01:48:14 2014	(r1506)
+++ trunk/www/firefox-esr/files/patch-bug975634	Sat Feb 22 03:06:04 2014	(r1507)
@@ -48,76 +48,6 @@
  AC_MSG_CHECKING([for posix_fallocate])
  AC_TRY_LINK([#define _XOPEN_SOURCE 600
    #include <fcntl.h>],
-diff --git xpcom/glue/FileUtils.cpp xpcom/glue/FileUtils.cpp
-index 66fe9e9..8bdf8f4 100644
---- xpcom/glue/FileUtils.cpp
-+++ xpcom/glue/FileUtils.cpp
-@@ -24,7 +24,7 @@
- #elif defined(XP_UNIX)
- #include <fcntl.h>
- #include <unistd.h>
--#if defined(LINUX)
-+#if defined(HAVE_POSIX_FADVISE)
- #include <elf.h>
- #endif
- #include <sys/types.h>
-@@ -185,7 +185,7 @@ mozilla::ReadAheadLib(nsIFile* aFile)
-     return;
-   }
-   ReadAheadLib(path.get());
--#elif defined(LINUX) && !defined(ANDROID) || defined(XP_MACOSX)
-+#elif defined(HAVE_POSIX_FADVISE) || defined(XP_MACOSX)
-   nsAutoCString nativePath;
-   if (!aFile || NS_FAILED(aFile->GetNativePath(nativePath))) {
-     return;
-@@ -204,7 +204,7 @@ mozilla::ReadAheadFile(nsIFile* aFile, const size_t aOffset,
-     return;
-   }
-   ReadAheadFile(path.get(), aOffset, aCount, aOutFd);
--#elif defined(LINUX) && !defined(ANDROID) || defined(XP_MACOSX)
-+#elif defined(HAVE_POSIX_FADVISE) || defined(XP_MACOSX)
-   nsAutoCString nativePath;
-   if (!aFile || NS_FAILED(aFile->GetNativePath(nativePath))) {
-     return;
-@@ -215,7 +215,7 @@ mozilla::ReadAheadFile(nsIFile* aFile, const size_t aOffset,
- 
- #endif // !defined(XPCOM_GLUE)
- 
--#if defined(LINUX) && !defined(ANDROID)
-+#if defined(HAVE_POSIX_FADVISE)
- 
- static const unsigned int bufsize = 4096;
- 
-@@ -341,9 +341,9 @@ mozilla::ReadAhead(mozilla::filedesc_t aFd, const size_t aOffset,
-   // Restore the file pointer
-   SetFilePointerEx(aFd, fpOriginal, nullptr, FILE_BEGIN);
- 
--#elif defined(LINUX) && !defined(ANDROID)
-+#elif defined(HAVE_POSIX_FADVISE)
- 
--  readahead(aFd, aOffset, aCount);
-+  posix_fadvise(aFd, aOffset, aCount, POSIX_FADV_WILLNEED);
- 
- #elif defined(XP_MACOSX)
- 
-@@ -364,7 +364,7 @@ mozilla::ReadAheadLib(mozilla::pathstr_t aFilePath)
-   }
- #if defined(XP_WIN)
-   ReadAheadFile(aFilePath);
--#elif defined(LINUX) && !defined(ANDROID)
-+#elif defined(HAVE_POSIX_FADVISE)
-   int fd = open(aFilePath, O_RDONLY);
-   if (fd < 0) {
-     return;
-@@ -486,7 +486,7 @@ mozilla::ReadAheadFile(mozilla::pathstr_t aFilePath, const size_t aOffset,
-   if (!aOutFd) {
-     CloseHandle(fd);
-   }
--#elif defined(LINUX) && !defined(ANDROID) || defined(XP_MACOSX)
-+#elif defined(HAVE_POSIX_FADVISE) || defined(XP_MACOSX)
-   if (!aFilePath) {
-     if (aOutFd) {
-       *aOutFd = -1;
 diff --git xpcom/io/nsLocalFileUnix.cpp xpcom/io/nsLocalFileUnix.cpp
 index bacf06c..0e46e4a 100644
 --- xpcom/io/nsLocalFileUnix.cpp

Modified: trunk/www/firefox-nightly/files/patch-bug975634
==============================================================================
--- trunk/www/firefox-nightly/files/patch-bug975634	Sat Feb 22 01:48:14 2014	(r1506)
+++ trunk/www/firefox-nightly/files/patch-bug975634	Sat Feb 22 03:06:04 2014	(r1507)
@@ -48,76 +48,6 @@
  AC_MSG_CHECKING([for posix_fallocate])
  AC_TRY_LINK([#define _XOPEN_SOURCE 600
    #include <fcntl.h>],
-diff --git xpcom/glue/FileUtils.cpp xpcom/glue/FileUtils.cpp
-index 66fe9e9..8bdf8f4 100644
---- xpcom/glue/FileUtils.cpp
-+++ xpcom/glue/FileUtils.cpp
-@@ -24,7 +24,7 @@
- #elif defined(XP_UNIX)
- #include <fcntl.h>
- #include <unistd.h>
--#if defined(LINUX)
-+#if defined(HAVE_POSIX_FADVISE)
- #include <elf.h>
- #endif
- #include <sys/types.h>
-@@ -185,7 +185,7 @@ mozilla::ReadAheadLib(nsIFile* aFile)
-     return;
-   }
-   ReadAheadLib(path.get());
--#elif defined(LINUX) && !defined(ANDROID) || defined(XP_MACOSX)
-+#elif defined(HAVE_POSIX_FADVISE) || defined(XP_MACOSX)
-   nsAutoCString nativePath;
-   if (!aFile || NS_FAILED(aFile->GetNativePath(nativePath))) {
-     return;
-@@ -204,7 +204,7 @@ mozilla::ReadAheadFile(nsIFile* aFile, const size_t aOffset,
-     return;
-   }
-   ReadAheadFile(path.get(), aOffset, aCount, aOutFd);
--#elif defined(LINUX) && !defined(ANDROID) || defined(XP_MACOSX)
-+#elif defined(HAVE_POSIX_FADVISE) || defined(XP_MACOSX)
-   nsAutoCString nativePath;
-   if (!aFile || NS_FAILED(aFile->GetNativePath(nativePath))) {
-     return;
-@@ -215,7 +215,7 @@ mozilla::ReadAheadFile(nsIFile* aFile, const size_t aOffset,
- 
- #endif // !defined(XPCOM_GLUE)
- 
--#if defined(LINUX) && !defined(ANDROID)
-+#if defined(HAVE_POSIX_FADVISE)
- 
- static const unsigned int bufsize = 4096;
- 
-@@ -341,9 +341,9 @@ mozilla::ReadAhead(mozilla::filedesc_t aFd, const size_t aOffset,
-   // Restore the file pointer
-   SetFilePointerEx(aFd, fpOriginal, nullptr, FILE_BEGIN);
- 
--#elif defined(LINUX) && !defined(ANDROID)
-+#elif defined(HAVE_POSIX_FADVISE)
- 
--  readahead(aFd, aOffset, aCount);
-+  posix_fadvise(aFd, aOffset, aCount, POSIX_FADV_WILLNEED);
- 
- #elif defined(XP_MACOSX)
- 
-@@ -364,7 +364,7 @@ mozilla::ReadAheadLib(mozilla::pathstr_t aFilePath)
-   }
- #if defined(XP_WIN)
-   ReadAheadFile(aFilePath);
--#elif defined(LINUX) && !defined(ANDROID)
-+#elif defined(HAVE_POSIX_FADVISE)
-   int fd = open(aFilePath, O_RDONLY);
-   if (fd < 0) {
-     return;
-@@ -486,7 +486,7 @@ mozilla::ReadAheadFile(mozilla::pathstr_t aFilePath, const size_t aOffset,
-   if (!aOutFd) {
-     CloseHandle(fd);
-   }
--#elif defined(LINUX) && !defined(ANDROID) || defined(XP_MACOSX)
-+#elif defined(HAVE_POSIX_FADVISE) || defined(XP_MACOSX)
-   if (!aFilePath) {
-     if (aOutFd) {
-       *aOutFd = -1;
 diff --git xpcom/io/nsLocalFileUnix.cpp xpcom/io/nsLocalFileUnix.cpp
 index bacf06c..0e46e4a 100644
 --- xpcom/io/nsLocalFileUnix.cpp

Modified: trunk/www/firefox/files/patch-bug975634
==============================================================================
--- trunk/www/firefox/files/patch-bug975634	Sat Feb 22 01:48:14 2014	(r1506)
+++ trunk/www/firefox/files/patch-bug975634	Sat Feb 22 03:06:04 2014	(r1507)
@@ -48,76 +48,6 @@
  AC_MSG_CHECKING([for posix_fallocate])
  AC_TRY_LINK([#define _XOPEN_SOURCE 600
    #include <fcntl.h>],
-diff --git xpcom/glue/FileUtils.cpp xpcom/glue/FileUtils.cpp
-index 66fe9e9..8bdf8f4 100644
---- xpcom/glue/FileUtils.cpp
-+++ xpcom/glue/FileUtils.cpp
-@@ -24,7 +24,7 @@
- #elif defined(XP_UNIX)
- #include <fcntl.h>
- #include <unistd.h>
--#if defined(LINUX)
-+#if defined(HAVE_POSIX_FADVISE)
- #include <elf.h>
- #endif
- #include <sys/types.h>
-@@ -185,7 +185,7 @@ mozilla::ReadAheadLib(nsIFile* aFile)
-     return;
-   }
-   ReadAheadLib(path.get());
--#elif defined(LINUX) && !defined(ANDROID) || defined(XP_MACOSX)
-+#elif defined(HAVE_POSIX_FADVISE) || defined(XP_MACOSX)
-   nsAutoCString nativePath;
-   if (!aFile || NS_FAILED(aFile->GetNativePath(nativePath))) {
-     return;
-@@ -204,7 +204,7 @@ mozilla::ReadAheadFile(nsIFile* aFile, const size_t aOffset,
-     return;
-   }
-   ReadAheadFile(path.get(), aOffset, aCount, aOutFd);
--#elif defined(LINUX) && !defined(ANDROID) || defined(XP_MACOSX)
-+#elif defined(HAVE_POSIX_FADVISE) || defined(XP_MACOSX)
-   nsAutoCString nativePath;
-   if (!aFile || NS_FAILED(aFile->GetNativePath(nativePath))) {
-     return;
-@@ -215,7 +215,7 @@ mozilla::ReadAheadFile(nsIFile* aFile, const size_t aOffset,
- 
- #endif // !defined(XPCOM_GLUE)
- 
--#if defined(LINUX) && !defined(ANDROID)
-+#if defined(HAVE_POSIX_FADVISE)
- 
- static const unsigned int bufsize = 4096;
- 
-@@ -341,9 +341,9 @@ mozilla::ReadAhead(mozilla::filedesc_t aFd, const size_t aOffset,
-   // Restore the file pointer
-   SetFilePointerEx(aFd, fpOriginal, nullptr, FILE_BEGIN);
- 
--#elif defined(LINUX) && !defined(ANDROID)
-+#elif defined(HAVE_POSIX_FADVISE)
- 
--  readahead(aFd, aOffset, aCount);
-+  posix_fadvise(aFd, aOffset, aCount, POSIX_FADV_WILLNEED);
- 
- #elif defined(XP_MACOSX)
- 
-@@ -364,7 +364,7 @@ mozilla::ReadAheadLib(mozilla::pathstr_t aFilePath)
-   }
- #if defined(XP_WIN)
-   ReadAheadFile(aFilePath);
--#elif defined(LINUX) && !defined(ANDROID)
-+#elif defined(HAVE_POSIX_FADVISE)
-   int fd = open(aFilePath, O_RDONLY);
-   if (fd < 0) {
-     return;
-@@ -486,7 +486,7 @@ mozilla::ReadAheadFile(mozilla::pathstr_t aFilePath, const size_t aOffset,
-   if (!aOutFd) {
-     CloseHandle(fd);
-   }
--#elif defined(LINUX) && !defined(ANDROID) || defined(XP_MACOSX)
-+#elif defined(HAVE_POSIX_FADVISE) || defined(XP_MACOSX)
-   if (!aFilePath) {
-     if (aOutFd) {
-       *aOutFd = -1;
 diff --git xpcom/io/nsLocalFileUnix.cpp xpcom/io/nsLocalFileUnix.cpp
 index bacf06c..0e46e4a 100644
 --- xpcom/io/nsLocalFileUnix.cpp

Modified: trunk/www/libxul/files/patch-bug975634
==============================================================================
--- trunk/www/libxul/files/patch-bug975634	Sat Feb 22 01:48:14 2014	(r1506)
+++ trunk/www/libxul/files/patch-bug975634	Sat Feb 22 03:06:04 2014	(r1507)
@@ -48,76 +48,6 @@
  AC_MSG_CHECKING([for posix_fallocate])
  AC_TRY_LINK([#define _XOPEN_SOURCE 600
    #include <fcntl.h>],
-diff --git xpcom/glue/FileUtils.cpp xpcom/glue/FileUtils.cpp
-index 66fe9e9..8bdf8f4 100644
---- xpcom/glue/FileUtils.cpp
-+++ xpcom/glue/FileUtils.cpp
-@@ -24,7 +24,7 @@
- #elif defined(XP_UNIX)
- #include <fcntl.h>
- #include <unistd.h>
--#if defined(LINUX)
-+#if defined(HAVE_POSIX_FADVISE)
- #include <elf.h>
- #endif
- #include <sys/types.h>
-@@ -185,7 +185,7 @@ mozilla::ReadAheadLib(nsIFile* aFile)
-     return;
-   }
-   ReadAheadLib(path.get());
--#elif defined(LINUX) && !defined(ANDROID) || defined(XP_MACOSX)
-+#elif defined(HAVE_POSIX_FADVISE) || defined(XP_MACOSX)
-   nsAutoCString nativePath;
-   if (!aFile || NS_FAILED(aFile->GetNativePath(nativePath))) {
-     return;
-@@ -204,7 +204,7 @@ mozilla::ReadAheadFile(nsIFile* aFile, const size_t aOffset,
-     return;
-   }
-   ReadAheadFile(path.get(), aOffset, aCount, aOutFd);
--#elif defined(LINUX) && !defined(ANDROID) || defined(XP_MACOSX)
-+#elif defined(HAVE_POSIX_FADVISE) || defined(XP_MACOSX)
-   nsAutoCString nativePath;
-   if (!aFile || NS_FAILED(aFile->GetNativePath(nativePath))) {
-     return;
-@@ -215,7 +215,7 @@ mozilla::ReadAheadFile(nsIFile* aFile, const size_t aOffset,
- 
- #endif // !defined(XPCOM_GLUE)
- 
--#if defined(LINUX) && !defined(ANDROID)
-+#if defined(HAVE_POSIX_FADVISE)
- 
- static const unsigned int bufsize = 4096;
- 
-@@ -341,9 +341,9 @@ mozilla::ReadAhead(mozilla::filedesc_t aFd, const size_t aOffset,
-   // Restore the file pointer
-   SetFilePointerEx(aFd, fpOriginal, nullptr, FILE_BEGIN);
- 
--#elif defined(LINUX) && !defined(ANDROID)
-+#elif defined(HAVE_POSIX_FADVISE)
- 
--  readahead(aFd, aOffset, aCount);
-+  posix_fadvise(aFd, aOffset, aCount, POSIX_FADV_WILLNEED);
- 
- #elif defined(XP_MACOSX)
- 
-@@ -364,7 +364,7 @@ mozilla::ReadAheadLib(mozilla::pathstr_t aFilePath)
-   }
- #if defined(XP_WIN)
-   ReadAheadFile(aFilePath);
--#elif defined(LINUX) && !defined(ANDROID)
-+#elif defined(HAVE_POSIX_FADVISE)
-   int fd = open(aFilePath, O_RDONLY);
-   if (fd < 0) {
-     return;
-@@ -486,7 +486,7 @@ mozilla::ReadAheadFile(mozilla::pathstr_t aFilePath, const size_t aOffset,
-   if (!aOutFd) {
-     CloseHandle(fd);
-   }
--#elif defined(LINUX) && !defined(ANDROID) || defined(XP_MACOSX)
-+#elif defined(HAVE_POSIX_FADVISE) || defined(XP_MACOSX)
-   if (!aFilePath) {
-     if (aOutFd) {
-       *aOutFd = -1;
 diff --git xpcom/io/nsLocalFileUnix.cpp xpcom/io/nsLocalFileUnix.cpp
 index bacf06c..0e46e4a 100644
 --- xpcom/io/nsLocalFileUnix.cpp

Modified: trunk/www/seamonkey/files/patch-bug975634
==============================================================================
--- trunk/www/seamonkey/files/patch-bug975634	Sat Feb 22 01:48:14 2014	(r1506)
+++ trunk/www/seamonkey/files/patch-bug975634	Sat Feb 22 03:06:04 2014	(r1507)
@@ -48,76 +48,6 @@
  AC_MSG_CHECKING([for posix_fallocate])
  AC_TRY_LINK([#define _XOPEN_SOURCE 600
    #include <fcntl.h>],
-diff --git xpcom/glue/FileUtils.cpp xpcom/glue/FileUtils.cpp
-index 66fe9e9..8bdf8f4 100644
---- mozilla/xpcom/glue/FileUtils.cpp
-+++ mozilla/xpcom/glue/FileUtils.cpp
-@@ -24,7 +24,7 @@
- #elif defined(XP_UNIX)
- #include <fcntl.h>
- #include <unistd.h>
--#if defined(LINUX)
-+#if defined(HAVE_POSIX_FADVISE)
- #include <elf.h>
- #endif
- #include <sys/types.h>
-@@ -185,7 +185,7 @@ mozilla::ReadAheadLib(nsIFile* aFile)
-     return;
-   }
-   ReadAheadLib(path.get());
--#elif defined(LINUX) && !defined(ANDROID) || defined(XP_MACOSX)
-+#elif defined(HAVE_POSIX_FADVISE) || defined(XP_MACOSX)
-   nsAutoCString nativePath;
-   if (!aFile || NS_FAILED(aFile->GetNativePath(nativePath))) {
-     return;
-@@ -204,7 +204,7 @@ mozilla::ReadAheadFile(nsIFile* aFile, const size_t aOffset,
-     return;
-   }
-   ReadAheadFile(path.get(), aOffset, aCount, aOutFd);
--#elif defined(LINUX) && !defined(ANDROID) || defined(XP_MACOSX)
-+#elif defined(HAVE_POSIX_FADVISE) || defined(XP_MACOSX)
-   nsAutoCString nativePath;
-   if (!aFile || NS_FAILED(aFile->GetNativePath(nativePath))) {
-     return;
-@@ -215,7 +215,7 @@ mozilla::ReadAheadFile(nsIFile* aFile, const size_t aOffset,
- 
- #endif // !defined(XPCOM_GLUE)
- 
--#if defined(LINUX) && !defined(ANDROID)
-+#if defined(HAVE_POSIX_FADVISE)
- 
- static const unsigned int bufsize = 4096;
- 
-@@ -341,9 +341,9 @@ mozilla::ReadAhead(mozilla::filedesc_t aFd, const size_t aOffset,
-   // Restore the file pointer
-   SetFilePointerEx(aFd, fpOriginal, nullptr, FILE_BEGIN);
- 
--#elif defined(LINUX) && !defined(ANDROID)
-+#elif defined(HAVE_POSIX_FADVISE)
- 
--  readahead(aFd, aOffset, aCount);
-+  posix_fadvise(aFd, aOffset, aCount, POSIX_FADV_WILLNEED);
- 
- #elif defined(XP_MACOSX)
- 
-@@ -364,7 +364,7 @@ mozilla::ReadAheadLib(mozilla::pathstr_t aFilePath)
-   }
- #if defined(XP_WIN)
-   ReadAheadFile(aFilePath);
--#elif defined(LINUX) && !defined(ANDROID)
-+#elif defined(HAVE_POSIX_FADVISE)
-   int fd = open(aFilePath, O_RDONLY);
-   if (fd < 0) {
-     return;
-@@ -486,7 +486,7 @@ mozilla::ReadAheadFile(mozilla::pathstr_t aFilePath, const size_t aOffset,
-   if (!aOutFd) {
-     CloseHandle(fd);
-   }
--#elif defined(LINUX) && !defined(ANDROID) || defined(XP_MACOSX)
-+#elif defined(HAVE_POSIX_FADVISE) || defined(XP_MACOSX)
-   if (!aFilePath) {
-     if (aOutFd) {
-       *aOutFd = -1;
 diff --git xpcom/io/nsLocalFileUnix.cpp xpcom/io/nsLocalFileUnix.cpp
 index bacf06c..0e46e4a 100644
 --- mozilla/xpcom/io/nsLocalFileUnix.cpp



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402220306.s1M364PT066611>