summaryrefslogtreecommitdiff
path: root/ext/intl/timezone/timezone_methods.cpp
diff options
context:
space:
mode:
authorGustavo André dos Santos Lopes <cataphract@php.net>2012-04-01 21:28:54 +0200
committerGustavo André dos Santos Lopes <cataphract@php.net>2012-04-01 23:28:01 +0100
commit95fbae891a653758a0e52879af808af7eedfb043 (patch)
treeeac7a015b341bf1a474fd0d1a65c5487f50c9288 /ext/intl/timezone/timezone_methods.cpp
parent69f75bb43c7e6f2e8b4661ff48aaf68b9b9b2c5c (diff)
downloadphp-git-95fbae891a653758a0e52879af808af7eedfb043.tar.gz
Compatibility with old versions of ICU (4.0+).
Diffstat (limited to 'ext/intl/timezone/timezone_methods.cpp')
-rw-r--r--ext/intl/timezone/timezone_methods.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/intl/timezone/timezone_methods.cpp b/ext/intl/timezone/timezone_methods.cpp
index 37b3996706..eaa6b46e39 100644
--- a/ext/intl/timezone/timezone_methods.cpp
+++ b/ext/intl/timezone/timezone_methods.cpp
@@ -189,6 +189,7 @@ U_CFUNC PHP_FUNCTION(intltz_count_equivalent_ids)
RETURN_LONG((long)result);
}
+#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 48
U_CFUNC PHP_FUNCTION(intltz_create_time_zone_id_enumeration)
{
long zoneType,
@@ -243,6 +244,7 @@ U_CFUNC PHP_FUNCTION(intltz_create_time_zone_id_enumeration)
IntlIterator_from_StringEnumeration(se, return_value TSRMLS_CC);
}
+#endif
U_CFUNC PHP_FUNCTION(intltz_get_canonical_id)
{
@@ -283,6 +285,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_canonical_id)
}
}
+#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 48
U_CFUNC PHP_FUNCTION(intltz_get_region)
{
char *str_id;
@@ -310,6 +313,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_region)
RETURN_STRINGL(outbuf, region_len, 1);
}
+#endif
U_CFUNC PHP_FUNCTION(intltz_get_tz_data_version)
{
@@ -477,9 +481,11 @@ U_CFUNC PHP_FUNCTION(intltz_has_same_rules)
static const TimeZone::EDisplayType display_types[] = {
TimeZone::SHORT, TimeZone::LONG,
+#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 44
TimeZone::SHORT_GENERIC, TimeZone::LONG_GENERIC,
TimeZone::SHORT_GMT, TimeZone::LONG_GMT,
TimeZone::SHORT_COMMONLY_USED, TimeZone::GENERIC_LOCATION
+#endif
};
U_CFUNC PHP_FUNCTION(intltz_get_display_name)