This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: revised natSystem patch
- From: Anthony Green <green at cygnus dot com>
- To: java-patches at gcc dot gnu dot org
- Date: Wed, 6 Feb 2002 07:22:08 -0800 (PST)
- Subject: Patch: revised natSystem patch
- Reply-to: green at cygnus dot com
Similar patches were approved but not checked in a few months ago.
The getSystemTimeZone change needed updating based on Adam's recent
work.
Ok?
2002-02-06 Anthony Green <green@redhat.com>
* java/lang/natSystem.cc (getSystemTimeZone): Some targets have no
concept of timezones.
(init_properties): Don't refer to _Jv_Environment_Properties
when this feature is not available.
Index: java/lang/natSystem.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/natSystem.cc,v
retrieving revision 1.45
diff -c -r1.45 natSystem.cc
*** natSystem.cc 2002/02/06 01:46:46 1.45
--- natSystem.cc 2002/02/06 14:55:30
***************
*** 271,277 ****
tz1 = tzname[0];
tz2 = strcmp (tzname[0], tzname[1]) ? tzname[1] : "";
#else
! #error Neither tm_zone nor tzname defined
#endif
if ((tzoffset % 3600) == 0)
--- 271,279 ----
tz1 = tzname[0];
tz2 = strcmp (tzname[0], tzname[1]) ? tzname[1] : "";
#else
! // Some targets have no concept of timezones.
! tz1 = "???";
! tz2 = tz1;
#endif
if ((tzoffset % 3600) == 0)
***************
*** 464,469 ****
--- 466,472 ----
}
// Set the system properties from the user's environment.
+ #ifndef DISABLE_GETENV_PROPERTIES
if (_Jv_Environment_Properties)
{
size_t i = 0;
***************
*** 475,480 ****
--- 478,484 ----
i++;
}
}
+ #endif
if (_Jv_Jar_Class_Path)
newprops->put(JvNewStringLatin1 ("java.class.path"),