summaryrefslogtreecommitdiff
path: root/textproc/icu/patches/patch-common_putil.cpp
blob: ee65d796fe1f8fdd56cfd171c1c002f5d54aa4f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
$NetBSD: patch-common_putil.cpp,v 1.2 2015/10/09 23:15:34 ryoon Exp $

--- common/putil.cpp.orig	2015-10-08 03:53:44.000000000 +0000
+++ common/putil.cpp
@@ -117,6 +117,14 @@
 #endif
 
 /*
+ * Mac OS X 10.4 doesn't use its localtime_r() declaration in <time.h> if either _ANSI_SOURCE or _POSIX_C_SOURCE is #defined.
+ */
+#if defined(U_TZNAME) && U_PLATFORM_IS_DARWIN_BASED && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ == 1040 \
+	&& (defined(_ANSI_SOURCE) || defined(_POSIX_C_SOURCE))
+U_CFUNC struct tm *localtime_r(const time_t *, struct tm *);
+#endif
+
+/*
  * Only include langinfo.h if we have a way to get the codeset. If we later
  * depend on more feature, we can test on U_HAVE_NL_LANGINFO.
  *