changeset 4614:9a72ee84e61b

7122222: GC log is limited to 2G for 32-bit Summary: Manual backport to hsx24 from hsx25: Enable large file support for generated 32-bit ostream.o on Linux and Solaris (as only the two need this) by setting -D_FILE_OFFSET_BITS=64 in compilation Reviewed-by: dcubed, jcoomes
author tamao
date Tue, 02 Jul 2013 15:08:27 -0700
parents 12019d9953a8
children b68a2c45f554 7bfdc3edfe1a
files make/linux/makefiles/vm.make make/solaris/makefiles/vm.make src/os/solaris/vm/os_solaris.inline.hpp
diffstat 3 files changed, 13 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/make/linux/makefiles/vm.make	Sat Jun 29 01:23:27 2013 +0200
+++ b/make/linux/makefiles/vm.make	Tue Jul 02 15:08:27 2013 -0700
@@ -102,6 +102,11 @@
 # a time and date.
 vm_version.o: CXXFLAGS += ${JRE_VERSION}
 
+# Large File Support
+ifneq ($(LP64), 1)
+ostream.o: CXXFLAGS += -D_FILE_OFFSET_BITS=64
+endif # ifneq ($(LP64), 1)
+
 ifeq ($(INCLUDE_TRACE), 1)
 CFLAGS += -DINCLUDE_TRACE=1
 endif
--- a/make/solaris/makefiles/vm.make	Sat Jun 29 01:23:27 2013 +0200
+++ b/make/solaris/makefiles/vm.make	Tue Jul 02 15:08:27 2013 -0700
@@ -90,6 +90,11 @@
 # a time and date.
 vm_version.o: CXXFLAGS += ${JRE_VERSION}
 
+# Large File Support
+ifneq ($(LP64), 1)
+ostream.o: CXXFLAGS += -D_FILE_OFFSET_BITS=64
+endif # ifneq ($(LP64), 1)
+
 # CFLAGS_WARN holds compiler options to suppress/enable warnings.
 CFLAGS += $(CFLAGS_WARN)
 
--- a/src/os/solaris/vm/os_solaris.inline.hpp	Sat Jun 29 01:23:27 2013 +0200
+++ b/src/os/solaris/vm/os_solaris.inline.hpp	Tue Jul 02 15:08:27 2013 -0700
@@ -93,7 +93,7 @@
 
 inline struct dirent* os::readdir(DIR* dirp, dirent* dbuf) {
   assert(dirp != NULL, "just checking");
-#if defined(_LP64) || defined(_GNU_SOURCE)
+#if defined(_LP64) || defined(_GNU_SOURCE) || _FILE_OFFSET_BITS==64
   dirent* p;
   int status;
 
@@ -102,9 +102,9 @@
     return NULL;
   } else
     return p;
-#else  // defined(_LP64) || defined(_GNU_SOURCE)
+#else  // defined(_LP64) || defined(_GNU_SOURCE) || _FILE_OFFSET_BITS==64
   return ::readdir_r(dirp, dbuf);
-#endif // defined(_LP64) || defined(_GNU_SOURCE)
+#endif // defined(_LP64) || defined(_GNU_SOURCE) || _FILE_OFFSET_BITS==64
 }
 
 inline int os::closedir(DIR *dirp) {