author | Stacy Yeh <stacy.yeh@oracle.com> |
Mon, 11 Jan 2016 09:27:45 -0800 | |
changeset 5255 | cea0e462549a |
permissions | -rw-r--r-- |
5255
cea0e462549a
22322082 Move Firefox/Thunderbird from Desktop consolidation to Userland
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff
changeset
|
1 |
In-house patch for firefox to build with GNU compilers. |
cea0e462549a
22322082 Move Firefox/Thunderbird from Desktop consolidation to Userland
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff
changeset
|
2 |
With GNU compiler, we have hunspell_fopen_hooks.h included |
cea0e462549a
22322082 Move Firefox/Thunderbird from Desktop consolidation to Userland
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff
changeset
|
3 |
through mozilla-config.h. |
cea0e462549a
22322082 Move Firefox/Thunderbird from Desktop consolidation to Userland
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff
changeset
|
4 |
But we don't have an implementation for mozilla::ReadAheadFile(). |
cea0e462549a
22322082 Move Firefox/Thunderbird from Desktop consolidation to Userland
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff
changeset
|
5 |
|
cea0e462549a
22322082 Move Firefox/Thunderbird from Desktop consolidation to Userland
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff
changeset
|
6 |
diff --git a/xpcom/glue/FileUtils.cpp b/xpcom/glue/FileUtils.cpp |
cea0e462549a
22322082 Move Firefox/Thunderbird from Desktop consolidation to Userland
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff
changeset
|
7 |
--- a/xpcom/glue/FileUtils.cpp |
cea0e462549a
22322082 Move Firefox/Thunderbird from Desktop consolidation to Userland
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff
changeset
|
8 |
+++ b/xpcom/glue/FileUtils.cpp |
cea0e462549a
22322082 Move Firefox/Thunderbird from Desktop consolidation to Userland
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff
changeset
|
9 |
@@ -481,17 +481,17 @@ mozilla::ReadAheadFile(mozilla::pathstr_ |
cea0e462549a
22322082 Move Firefox/Thunderbird from Desktop consolidation to Userland
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff
changeset
|
10 |
} |
cea0e462549a
22322082 Move Firefox/Thunderbird from Desktop consolidation to Userland
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff
changeset
|
11 |
if (fd == INVALID_HANDLE_VALUE) { |
cea0e462549a
22322082 Move Firefox/Thunderbird from Desktop consolidation to Userland
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff
changeset
|
12 |
return; |
cea0e462549a
22322082 Move Firefox/Thunderbird from Desktop consolidation to Userland
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff
changeset
|
13 |
} |
cea0e462549a
22322082 Move Firefox/Thunderbird from Desktop consolidation to Userland
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff
changeset
|
14 |
ReadAhead(fd, aOffset, aCount); |
cea0e462549a
22322082 Move Firefox/Thunderbird from Desktop consolidation to Userland
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff
changeset
|
15 |
if (!aOutFd) { |
cea0e462549a
22322082 Move Firefox/Thunderbird from Desktop consolidation to Userland
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff
changeset
|
16 |
CloseHandle(fd); |
cea0e462549a
22322082 Move Firefox/Thunderbird from Desktop consolidation to Userland
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff
changeset
|
17 |
} |
cea0e462549a
22322082 Move Firefox/Thunderbird from Desktop consolidation to Userland
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff
changeset
|
18 |
-#elif defined(LINUX) && !defined(ANDROID) || defined(XP_MACOSX) |
cea0e462549a
22322082 Move Firefox/Thunderbird from Desktop consolidation to Userland
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff
changeset
|
19 |
+#elif defined(LINUX) && !defined(ANDROID) || defined(XP_MACOSX) || defined(SOLARIS) |
cea0e462549a
22322082 Move Firefox/Thunderbird from Desktop consolidation to Userland
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff
changeset
|
20 |
if (!aFilePath) { |
cea0e462549a
22322082 Move Firefox/Thunderbird from Desktop consolidation to Userland
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff
changeset
|
21 |
if (aOutFd) { |
cea0e462549a
22322082 Move Firefox/Thunderbird from Desktop consolidation to Userland
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff
changeset
|
22 |
*aOutFd = -1; |
cea0e462549a
22322082 Move Firefox/Thunderbird from Desktop consolidation to Userland
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff
changeset
|
23 |
} |
cea0e462549a
22322082 Move Firefox/Thunderbird from Desktop consolidation to Userland
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff
changeset
|
24 |
return; |
cea0e462549a
22322082 Move Firefox/Thunderbird from Desktop consolidation to Userland
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff
changeset
|
25 |
} |
cea0e462549a
22322082 Move Firefox/Thunderbird from Desktop consolidation to Userland
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff
changeset
|
26 |
int fd = open(aFilePath, O_RDONLY); |
cea0e462549a
22322082 Move Firefox/Thunderbird from Desktop consolidation to Userland
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff
changeset
|
27 |
if (aOutFd) { |