提交 a59a21b3 编写于 作者: M martin

8006995: java launcher fails to open executable JAR > 2GB

Summary: Use O_LARGEFILE consistently when opening jar files
Reviewed-by: alanb, sherman
上级 874b6e6b
...@@ -563,7 +563,7 @@ JLI_ParseManifest(char *jarfile, manifest_info *info) ...@@ -563,7 +563,7 @@ JLI_ParseManifest(char *jarfile, manifest_info *info)
if ((fd = open(jarfile, O_RDONLY if ((fd = open(jarfile, O_RDONLY
#ifdef O_LARGEFILE #ifdef O_LARGEFILE
| O_LARGEFILE /* large file mode on solaris */ | O_LARGEFILE /* large file mode */
#endif #endif
#ifdef O_BINARY #ifdef O_BINARY
| O_BINARY /* use binary mode on windows */ | O_BINARY /* use binary mode on windows */
...@@ -618,6 +618,9 @@ JLI_JarUnpackFile(const char *jarfile, const char *filename, int *size) { ...@@ -618,6 +618,9 @@ JLI_JarUnpackFile(const char *jarfile, const char *filename, int *size) {
void *data = NULL; void *data = NULL;
fd = open(jarfile, O_RDONLY fd = open(jarfile, O_RDONLY
#ifdef O_LARGEFILE
| O_LARGEFILE /* large file mode */
#endif
#ifdef O_BINARY #ifdef O_BINARY
| O_BINARY /* use binary mode on windows */ | O_BINARY /* use binary mode on windows */
#endif #endif
...@@ -661,6 +664,9 @@ JLI_ManifestIterate(const char *jarfile, attribute_closure ac, void *user_data) ...@@ -661,6 +664,9 @@ JLI_ManifestIterate(const char *jarfile, attribute_closure ac, void *user_data)
int rc; int rc;
if ((fd = open(jarfile, O_RDONLY if ((fd = open(jarfile, O_RDONLY
#ifdef O_LARGEFILE
| O_LARGEFILE /* large file mode */
#endif
#ifdef O_BINARY #ifdef O_BINARY
| O_BINARY /* use binary mode on windows */ | O_BINARY /* use binary mode on windows */
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册