diff --git a/icu4c/source/common/putil.c b/icu4c/source/common/putil.c index 0d7280a4f4a..96432839b9d 100644 --- a/icu4c/source/common/putil.c +++ b/icu4c/source/common/putil.c @@ -741,11 +741,7 @@ U_CAPI const char* U_EXPORT2 uprv_tzname(int n) { #ifdef U_WINDOWS -#if 0 - char* id = (char*) detectWindowsTimeZone(); -#else - char *id = (char *) u_detectWindowsTimeZone(); -#endif + const char *id = u_detectWindowsTimeZone(); if (id != NULL) { return id; diff --git a/icu4c/source/common/wintz.c b/icu4c/source/common/wintz.c index aa6e847e697..f4773ee032a 100644 --- a/icu4c/source/common/wintz.c +++ b/icu4c/source/common/wintz.c @@ -378,7 +378,7 @@ static LONG getTZI(const char *winid, TZI *tzi) } U_CAPI void U_EXPORT2 -u_getWindowsTimeZoneInfo(TIME_ZONE_INFORMATION *zoneInfo, const UChar *icuid, int32_t length) +uprv_getWindowsTimeZoneInfo(TIME_ZONE_INFORMATION *zoneInfo, const UChar *icuid, int32_t length) { const char *winid; TZI tzi; @@ -454,7 +454,7 @@ u_getWindowsTimeZoneInfo(TIME_ZONE_INFORMATION *zoneInfo, const UChar *icuid, in * time zone, translated to an ICU time zone, or NULL upon failure. */ U_CAPI const char* U_EXPORT2 -u_detectWindowsTimeZone() { +uprv_detectWindowsTimeZone() { LONG result; HKEY hkey; TZI tziKey; diff --git a/icu4c/source/common/wintz.h b/icu4c/source/common/wintz.h index 15c3387b1d0..13ecc379531 100644 --- a/icu4c/source/common/wintz.h +++ b/icu4c/source/common/wintz.h @@ -27,10 +27,10 @@ typedef struct _TIME_ZONE_INFORMATION TIME_ZONE_INFORMATION; U_CDECL_END U_CAPI void U_EXPORT2 -u_getWindowsTimeZoneInfo(TIME_ZONE_INFORMATION *zoneInfo, const UChar *icuid, int32_t length); +uprv_getWindowsTimeZoneInfo(TIME_ZONE_INFORMATION *zoneInfo, const UChar *icuid, int32_t length); U_CAPI const char* U_EXPORT2 -u_detectWindowsTimeZone(); +uprv_detectWindowsTimeZone(); #endif /* #ifdef U_WINDOWS */ diff --git a/icu4c/source/i18n/windtfmt.cpp b/icu4c/source/i18n/windtfmt.cpp index 9fb24549387..6ae50dbbcde 100644 --- a/icu4c/source/i18n/windtfmt.cpp +++ b/icu4c/source/i18n/windtfmt.cpp @@ -152,7 +152,7 @@ UnicodeString &Win32DateFormat::format(Calendar &cal, UnicodeString &appendTo, F UnicodeString icuid; tz.getID(icuid); - u_getWindowsTimeZoneInfo(&tzi, icuid.getBuffer(), icuid.length()); + uprv_getWindowsTimeZoneInfo(&tzi, icuid.getBuffer(), icuid.length()); } uct = utmscale_fromInt64((int64_t) cal.getTime(status), UDTS_ICU4C_TIME, &status); @@ -294,7 +294,7 @@ void Win32DateFormat::setTimeZoneInfo(const TimeZone &zone) fZoneID = zoneID; zone.getID(icuid); - u_getWindowsTimeZoneInfo(fTZI, icuid.getBuffer(), icuid.length()); + uprv_getWindowsTimeZoneInfo(fTZI, icuid.getBuffer(), icuid.length()); } }