summaryrefslogtreecommitdiff
path: root/icu
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-05-11 13:24:41 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-05-11 13:24:53 +0100
commitbdbd8d8084d257cb2cb42ad9ba8e14c03a53a28d (patch)
tree0c0b1c6d45ea25c5ce9a0267227962aefecb565a /icu
parent8c60833c26c02a28d98e79cccb41aff009b38fc2 (diff)
bodge MacOSX harder
Change-Id: If5a3afa4fea10e95cc52a7411f91ee86bea2b54c
Diffstat (limited to 'icu')
-rw-r--r--icu/icu4c-macosx.patch25
1 files changed, 15 insertions, 10 deletions
diff --git a/icu/icu4c-macosx.patch b/icu/icu4c-macosx.patch
index d685a5fbc24a..0de6ac30381a 100644
--- a/icu/icu4c-macosx.patch
+++ b/icu/icu4c-macosx.patch
@@ -1,14 +1,19 @@
--- misc/icu/source/common/putil.cpp
+++ misc/build/icu/source/common/putil.cpp
-@@ -975,6 +975,11 @@
- return result;
- }
- #endif
-+
+@@ -1080,8 +1080,16 @@
+ static const time_t decemberSolstice=1198332540; /*2007-12-22 06:09 UT*/
+
+ /* This probing will tell us when daylight savings occurs. */
+#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
-+
- U_CAPI const char* U_EXPORT2
- uprv_tzname(int n)
- {
+ if(decemberSol.tm_isdst > 0) {
+ daylightType = U_DAYLIGHT_DECEMBER;
+ } else if(juneSol.tm_isdst > 0) {