Change to posix.cc to set gnu.java.util.zoneinfo.dir

Albert Chin gcc-java@mlists.thewrittenword.com
Wed Mar 7 20:31:00 GMT 2007


The following checkin was made on 2007-02-22:
  r122229 | jakub | 2007-02-22 10:04:55 -0600 (Thu, 22 Feb 2007) | 48 lines
  libjava/
          ...
          * posix.cc (_Jv_platform_initProperties): Set
          gnu.java.util.zoneinfo.dir.

Index: posix.cc
===================================================================
--- posix.cc	(revision 116941)
+++ posix.cc	(revision 122229)
@@ -139,6 +139,10 @@
   if (! tmpdir)
     tmpdir = "/tmp";
   SET ("java.io.tmpdir", tmpdir);
+  const char *zoneinfodir = ::getenv("TZDATA");
+  if (! zoneinfodir)
+    zoneinfodir = "/usr/share/zoneinfo";
+  SET ("gnu.java.util.zoneinfo.dir", zoneinfodir);
 }
 
 static inline void

What if the directory isn't /usr/share/zoneinfo? On AIX and Solaris,
it's /usr/share/lib/zoneinfo. Shouldn't the default be correct for the
system GCJ is targeted for?

-- 
albert chin (china@thewrittenword.com)



More information about the Java mailing list