summaryrefslogtreecommitdiffstats
path: root/xpcom/glue/FileUtils.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2020-04-14 21:49:04 +0200
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-04-14 21:49:04 +0200
commit39dac57259cff8b61db0b22cb2ad0a8adb02692e (patch)
tree52a026cc8c22793eb17fd0f5e22adce1ae08a1dd /xpcom/glue/FileUtils.cpp
parenta1cce3b2b00bbd9f4983013ddd8934a7bccb9e99 (diff)
parentc2d9ab62f3d097c9e0e00184cab1f546554f5eaa (diff)
downloadUXP-39dac57259cff8b61db0b22cb2ad0a8adb02692e.tar
UXP-39dac57259cff8b61db0b22cb2ad0a8adb02692e.tar.gz
UXP-39dac57259cff8b61db0b22cb2ad0a8adb02692e.tar.lz
UXP-39dac57259cff8b61db0b22cb2ad0a8adb02692e.tar.xz
UXP-39dac57259cff8b61db0b22cb2ad0a8adb02692e.zip
Merge branch 'redwood' into 28.9-platform
Diffstat (limited to 'xpcom/glue/FileUtils.cpp')
-rw-r--r--xpcom/glue/FileUtils.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/xpcom/glue/FileUtils.cpp b/xpcom/glue/FileUtils.cpp
index 53fe68708..65a6c1e82 100644
--- a/xpcom/glue/FileUtils.cpp
+++ b/xpcom/glue/FileUtils.cpp
@@ -226,7 +226,7 @@ mozilla::ReadAheadLib(nsIFile* aFile)
return;
}
ReadAheadLib(path.get());
-#elif defined(LINUX) && !defined(ANDROID) || defined(XP_MACOSX)
+#elif defined(LINUX) || defined(XP_MACOSX)
nsAutoCString nativePath;
if (!aFile || NS_FAILED(aFile->GetNativePath(nativePath))) {
return;
@@ -245,7 +245,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(LINUX) || defined(XP_MACOSX)
nsAutoCString nativePath;
if (!aFile || NS_FAILED(aFile->GetNativePath(nativePath))) {
return;
@@ -256,7 +256,7 @@ mozilla::ReadAheadFile(nsIFile* aFile, const size_t aOffset,
#endif // !defined(XPCOM_GLUE)
-#if defined(LINUX) && !defined(ANDROID)
+#if defined(LINUX)
static const unsigned int bufsize = 4096;
@@ -382,7 +382,7 @@ 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(LINUX)
readahead(aFd, aOffset, aCount);
@@ -405,7 +405,7 @@ mozilla::ReadAheadLib(mozilla::pathstr_t aFilePath)
}
#if defined(XP_WIN)
ReadAheadFile(aFilePath);
-#elif defined(LINUX) && !defined(ANDROID)
+#elif defined(LINUX)
int fd = open(aFilePath, O_RDONLY);
if (fd < 0) {
return;
@@ -532,7 +532,7 @@ mozilla::ReadAheadFile(mozilla::pathstr_t aFilePath, const size_t aOffset,
if (!aOutFd) {
CloseHandle(fd);
}
-#elif defined(LINUX) && !defined(ANDROID) || defined(XP_MACOSX) || defined(XP_SOLARIS)
+#elif defined(LINUX) || defined(XP_MACOSX) || defined(XP_SOLARIS)
if (!aFilePath) {
if (aOutFd) {
*aOutFd = -1;