Mercurial > hg > icedtea6
changeset 265:ea36b40031ff cacao
* patches/icedtea-use-system-tzdata.patch: New file.
* Makefile.am (ICEDTEA_PATCHES): Add above patch.
* Makefile.in: Regenerated.
author | Keith Seitz <keiths@redhat.com> |
---|---|
date | Thu, 27 Sep 2007 20:27:19 -0700 |
parents | 89ec04d11de1 |
children | 2c9f72582164 |
files | ChangeLog Makefile.am patches/icedtea-use-system-tzdata.patch |
diffstat | 3 files changed, 52 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Fri Sep 14 13:12:11 2007 -0700 +++ b/ChangeLog Thu Sep 27 20:27:19 2007 -0700 @@ -1,3 +1,9 @@ +2007-09-27 Keith Seitz <keiths@redhat.com> + + * patches/icedtea-use-system-tzdata.patch: New file. + * Makefile.am (ICEDTEA_PATCHES): Add above patch. + * Makefile.in: Regenerated. + 2007-09-18 Christan Thalinger <twisti@complang.tuwien.ac.at> * patches/icedtea-cacao-jvm-cfg.patch: Added
--- a/Makefile.am Fri Sep 14 13:12:11 2007 -0700 +++ b/Makefile.am Thu Sep 27 20:27:19 2007 -0700 @@ -186,6 +186,7 @@ patches/icedtea-tools.patch \ patches/icedtea-certbundle.patch \ patches/icedtea-demos.patch \ + patches/icedtea-use-system-tzdata.patch \ $(FAST_BUILD_PATCH) if WITH_CACAO
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-use-system-tzdata.patch Thu Sep 27 20:27:19 2007 -0700 @@ -0,0 +1,45 @@ +diff -r 7afa92fca0fd hotspot/src/os/linux/vm/os_linux.cpp +--- openjdk/hotspot/src/os/linux/vm/os_linux.cpp Thu Sep 27 12:57:09 2007 -0700 ++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp Thu Sep 27 14:00:27 2007 -0700 +@@ -391,6 +391,9 @@ void os::init_system_properties_values() + "javax.net.ssl.trustStorePassword", + ""); + ++ // Use the system zoneinfo files, if present ++ Arguments::PropertyList_add (&sp, ++ "user.zoneinfo.dir", "/usr/share/javazi"); + #undef malloc + #undef getenv + #undef EXTENSIONS_DIR +diff -r 7afa92fca0fd j2se/src/share/classes/sun/util/calendar/ZoneInfoFile.java +--- openjdk/j2se/src/share/classes/sun/util/calendar/ZoneInfoFile.java Thu Sep 27 12:57:09 2007 -0700 ++++ openjdk/j2se/src/share/classes/sun/util/calendar/ZoneInfoFile.java Thu Sep 27 14:00:27 2007 -0700 +@@ -1021,10 +1021,24 @@ public class ZoneInfoFile { + byte[] buffer = null; + + try { +- String homeDir = (String) AccessController.doPrivileged( +- new sun.security.action.GetPropertyAction("java.home")); +- final String fname = homeDir + File.separator + "lib" + File.separator +- + "zi" + File.separator + fileName; ++ String zi_dir = (String) System.getProperty("user.zoneinfo.dir"); ++ File dir = null; ++ if (zi_dir != null) ++ dir = new File(zi_dir); ++ ++ // Some minimal sanity checking ++ if (dir != null) { ++ File f = new File(dir, "ZoneInfoMappings"); ++ if (!f.exists()) ++ dir = null; ++ } ++ ++ if (dir == null) { ++ String homeDir = (String) System.getProperty("java.home"); ++ zi_dir = homeDir + File.separator + "lib" + File.separator ++ + "zi"; ++ } ++ final String fname = zi_dir + File.separator + fileName; + buffer = (byte[]) AccessController.doPrivileged(new PrivilegedExceptionAction() { + public Object run() throws IOException { + File file = new File(fname);