8006995: java launcher fails to open executable JAR > 2GB
authormartin
Wed, 06 Feb 2013 17:59:54 -0800
changeset 15644 2dfa520c7303
parent 15643 5e3b735b74ac
child 15645 8d05e519bffb
8006995: java launcher fails to open executable JAR > 2GB Summary: Use O_LARGEFILE consistently when opening jar files Reviewed-by: alanb, sherman
jdk/src/share/bin/parse_manifest.c
--- 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