src/solaris/native/java/util/TimeZone_md.c
Print this page
rev 8822 : 8024854: PPC64: Basic changes and files to build the class library on AIX
Reviewed-by: alanb, prr, sla, chegar, michaelm, mullan, art
Contributed-by: luchsh@linux.vnet.ibm.com, spoole@linux.vnet.ibm.com, thomas.stuefe@sap.com
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -121,11 +121,11 @@
if (entry == NULL) {
(void) closedir(dirp);
return NULL;
}
-#if defined(__linux__) || defined(MACOSX) || (defined(__solaris__) \
+#if defined(_AIX) || defined(__linux__) || defined(MACOSX) || (defined(__solaris__) \
&& (defined(_POSIX_PTHREAD_SEMANTICS) || defined(_LP64)))
while (readdir_r(dirp, entry, &dp) == 0 && dp != NULL) {
#else
while ((dp = readdir_r(dirp, entry)) != NULL) {
#endif
@@ -613,10 +613,18 @@
return tz;
}
#endif /*__solaris__*/
#endif /*__linux__*/
+#ifdef _AIX
+static char *
+getPlatformTimeZoneID()
+{
+ return NULL;
+}
+#endif
+
/*
* findJavaTZ_md() maps platform time zone ID to Java time zone ID
* using <java_home>/lib/tzmappings. If the TZ value is not found, it
* trys some libc implementation dependent mappings. If it still
* can't map to a Java time zone ID, it falls back to the GMT+/-hh:mm
@@ -633,11 +641,11 @@
tz = getenv("TZ");
#if defined(__linux__) || defined(_ALLBSD_SOURCE)
if (tz == NULL) {
#else
-#ifdef __solaris__
+#if defined (__solaris__) || defined(_AIX)
if (tz == NULL || *tz == '\0') {
#endif
#endif
tz = getPlatformTimeZoneID();
freetz = tz;