From 71f5af6c70e93b35dfcade404166bda6629fb8ce Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Tue, 15 Feb 2011 08:28:03 +0000 Subject: - fix build with ICU < 4.2, add ICU_VERSION for m4 checks --- ext/intl/php_intl.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'ext/intl/php_intl.c') diff --git a/ext/intl/php_intl.c b/ext/intl/php_intl.c index 0512847fa1..ab5640486d 100755 --- a/ext/intl/php_intl.c +++ b/ext/intl/php_intl.c @@ -70,10 +70,12 @@ #include "idn/idn.h" -#include "spoofchecker/spoofchecker_class.h" -#include "spoofchecker/spoofchecker.h" -#include "spoofchecker/spoofchecker_create.h" -#include "spoofchecker/spoofchecker_main.h" +#if U_ICU_VERSION_MAJOR_NUM > 3 && U_ICU_VERSION_MINOR_NUM >=2 +# include "spoofchecker/spoofchecker_class.h" +# include "spoofchecker/spoofchecker.h" +# include "spoofchecker/spoofchecker_create.h" +# include "spoofchecker/spoofchecker_main.h" +#endif #include "msgformat/msgformat.h" #include "common/common_error.h" @@ -638,12 +640,13 @@ PHP_MINIT_FUNCTION( intl ) /* Expose IDN constants to PHP scripts. */ idn_register_constants(INIT_FUNC_ARGS_PASSTHRU); +#if U_ICU_VERSION_MAJOR_NUM > 3 && U_ICU_VERSION_MINOR_NUM >=2 /* Register 'Spoofchecker' PHP class */ spoofchecker_register_Spoofchecker_class( TSRMLS_C ); /* Expose Spoofchecker constants to PHP scripts */ spoofchecker_register_constants( INIT_FUNC_ARGS_PASSTHRU ); - +#endif /* Global error handling. */ intl_error_init( NULL TSRMLS_CC ); -- cgit v1.2.1