8006995: java launcher fails to open executable JAR > 2GB
Summary: Use O_LARGEFILE consistently when opening jar files
Reviewed-by: alanb, sherman
--- a/jdk/src/share/bin/parse_manifest.c Wed Feb 06 14:15:05 2013 -0500
+++ b/jdk/src/share/bin/parse_manifest.c Wed Feb 06 17:59:54 2013 -0800
@@ -563,7 +563,7 @@
if ((fd = open(jarfile, O_RDONLY
#ifdef O_LARGEFILE
- | O_LARGEFILE /* large file mode on solaris */
+ | O_LARGEFILE /* large file mode */
#endif
#ifdef O_BINARY
| O_BINARY /* use binary mode on windows */
@@ -618,6 +618,9 @@
void *data = NULL;
fd = open(jarfile, O_RDONLY
+#ifdef O_LARGEFILE
+ | O_LARGEFILE /* large file mode */
+#endif
#ifdef O_BINARY
| O_BINARY /* use binary mode on windows */
#endif
@@ -661,6 +664,9 @@
int rc;
if ((fd = open(jarfile, O_RDONLY
+#ifdef O_LARGEFILE
+ | O_LARGEFILE /* large file mode */
+#endif
#ifdef O_BINARY
| O_BINARY /* use binary mode on windows */
#endif