changeset in /hg/icedtea: * patches/icedtea-use-system-tzdata.pa...

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

changeset in /hg/icedtea: * patches/icedtea-use-system-tzdata.pa...

Keith Seitz
changeset ea36b40031ff in /hg/icedtea
details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=ea36b40031ff
description:
        * patches/icedtea-use-system-tzdata.patch: New file.
                * Makefile.am (ICEDTEA_PATCHES):  Add above patch.
                * Makefile.in: Regenerated.

diffstat:

3 files changed, 52 insertions(+)
ChangeLog                               |    6 ++++
Makefile.am                             |    1
patches/icedtea-use-system-tzdata.patch |   45 +++++++++++++++++++++++++++++++

diffs (73 lines):

diff -r 89ec04d11de1 -r ea36b40031ff ChangeLog
--- 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-18  Christan Thalinger  <twisti@
+2007-09-27  Keith Seitz  <[hidden email]>
+
+ * patches/icedtea-use-system-tzdata.patch: New file.
+ * Makefile.am (ICEDTEA_PATCHES):  Add above patch.
+ * Makefile.in: Regenerated.
+
 2007-09-18  Christan Thalinger  <[hidden email]>
 
  * patches/icedtea-cacao-jvm-cfg.patch: Added
diff -r 89ec04d11de1 -r ea36b40031ff Makefile.am
--- 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 @@ ICEDTEA_PATCHES = \
  patches/icedtea-tools.patch \
  patches/icedtea-certbundle.patch \
  patches/icedtea-demos.patch \
+ patches/icedtea-use-system-tzdata.patch \
  $(FAST_BUILD_PATCH)
 
 if WITH_CACAO
diff -r 89ec04d11de1 -r ea36b40031ff patches/icedtea-use-system-tzdata.patch
--- /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);