]> granicus.if.org Git - icu/commitdiff
ICU-10873 newlib has _timezone instead of __timezone
authorJungshik Shin <jshin@chromium.org>
Thu, 1 May 2014 00:16:10 +0000 (00:16 +0000)
committerJungshik Shin <jshin@chromium.org>
Thu, 1 May 2014 00:16:10 +0000 (00:16 +0000)
X-SVN-Rev: 35680

icu4c/source/common/putilimp.h

index 45e8eb680e0fca94abf3b6371e48e293b65df7c3..4db983a733f2bebb6ab016c8dfddabf646fc0b7c 100644 (file)
@@ -116,9 +116,13 @@ typedef size_t uintptr_t;
 #elif U_PLATFORM == U_PF_ANDROID
 #   define U_TIMEZONE timezone
 #elif U_PLATFORM_IS_LINUX_BASED
-#   if !defined(__UCLIBC__)
-    /* __timezone is only available in glibc */
-#       define U_TIMEZONE __timezone
+#   if defined(__UCLIBC__)
+       /* uClibc does not have __timezone or _timezone. */
+#   elif defined(_NEWLIB_VERSION)
+#      define U_TIMEZONE      _timezone
+#   else
+       /* glibc */
+#      define U_TIMEZONE      __timezone
 #   endif
 #elif U_PLATFORM_USES_ONLY_WIN32_API
 #   define U_TIMEZONE _timezone