bodge MacOSX harder

Change-Id: If5a3afa4fea10e95cc52a7411f91ee86bea2b54c
This commit is contained in:
Caolán McNamara
2012-05-11 13:24:41 +01:00
parent 8c60833c26
commit bdbd8d8084

View File

@@ -1,14 +1,19 @@
--- misc/icu/source/common/putil.cpp --- misc/icu/source/common/putil.cpp
+++ misc/build/icu/source/common/putil.cpp +++ misc/build/icu/source/common/putil.cpp
@@ -975,6 +975,11 @@ @@ -1080,8 +1080,16 @@
return result; static const time_t decemberSolstice=1198332540; /*2007-12-22 06:09 UT*/
}
#endif /* This probing will tell us when daylight savings occurs. */
+
+#if U_PLATFORM_IS_DARWIN_BASED +#if U_PLATFORM_IS_DARWIN_BASED
+extern struct tm *localtime_r(const time_t *, struct tm *); + struct tm *tmp;
+ tmp = localtime(&juneSolstice);
+ juneSol = *tmp;
+ tmp = localtime(&decemberSolstice);
+ decemberSol = *tmp;
+#else
localtime_r(&juneSolstice, &juneSol);
localtime_r(&decemberSolstice, &decemberSol);
+#endif +#endif
+ if(decemberSol.tm_isdst > 0) {
U_CAPI const char* U_EXPORT2 daylightType = U_DAYLIGHT_DECEMBER;
uprv_tzname(int n) } else if(juneSol.tm_isdst > 0) {
{