File tree Expand file tree Collapse file tree 7 files changed +21
-4
lines changed Expand file tree Collapse file tree 7 files changed +21
-4
lines changed Original file line number Diff line number Diff line change @@ -2241,6 +2241,10 @@ AC_DEFUN([PHP_SETUP_ICU],[
2241
2241
ICU_CXXFLAGS=`$ICU_CONFIG --cxxflags`
2242
2242
if test "$icu_version" -ge "49000"; then
2243
2243
ICU_CXXFLAGS="$ICU_CXXFLAGS -DUNISTR_FROM_CHAR_EXPLICIT=explicit -DUNISTR_FROM_STRING_EXPLICIT=explicit"
2244
+ ICU_CFLAGS="-DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1"
2245
+ fi
2246
+ if test "$icu_version" -ge "60000"; then
2247
+ ICU_CFLAGS="$ICU_CFLAGS -DU_HIDE_OBSOLETE_UTF_OLD_H=1"
2244
2248
fi
2245
2249
fi
2246
2250
] )
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ if test "$PHP_INTL" != "no"; then
9
9
PHP_SETUP_ICU(INTL_SHARED_LIBADD)
10
10
PHP_SUBST(INTL_SHARED_LIBADD)
11
11
PHP_REQUIRE_CXX()
12
- INTL_COMMON_FLAGS="$ICU_INCS -Wno-write-strings -D__STDC_LIMIT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
12
+ INTL_COMMON_FLAGS="$ICU_INCS $ICU_CFLAGS -Wno-write-strings -D__STDC_LIMIT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
13
13
if test "$icu_version" -ge "4002"; then
14
14
icu_spoof_src=" spoofchecker/spoofchecker_class.c \
15
15
spoofchecker/spoofchecker.c\
Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ if (PHP_INTL != "no") {
129
129
ADD_FLAG ( "LIBS_INTL" , "iculx.lib" ) ;
130
130
}
131
131
132
- ADD_FLAG ( "CFLAGS_INTL" , "/EHsc /DUNISTR_FROM_CHAR_EXPLICIT=explicit /DUNISTR_FROM_STRING_EXPLICIT=explicit" ) ;
132
+ ADD_FLAG ( "CFLAGS_INTL" , "/EHsc /DUNISTR_FROM_CHAR_EXPLICIT=explicit /DUNISTR_FROM_STRING_EXPLICIT=explicit /DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1 /DU_HIDE_OBSOLETE_UTF_OLD_H=1 " ) ;
133
133
AC_DEFINE ( "HAVE_INTL" , 1 , "Internationalization support enabled" ) ;
134
134
} else {
135
135
WARNING ( "intl not enabled; libraries and/or headers not found" ) ;
Original file line number Diff line number Diff line change 18
18
#include "zend_exceptions.h"
19
19
20
20
#include <unicode/utypes.h>
21
+ #if U_ICU_VERSION_MAJOR_NUM >= 49
22
+ #include <unicode/utf8.h>
23
+ #include <unicode/utf16.h>
24
+ #endif
21
25
#include <unicode/ucnv.h>
22
26
#include <unicode/ustring.h>
23
27
Original file line number Diff line number Diff line change 24
24
#include "grapheme_util.h"
25
25
26
26
#include <unicode/utypes.h>
27
+ #if U_ICU_VERSION_MAJOR_NUM >= 49
28
+ #include <unicode/utf8.h>
29
+ #endif
27
30
#include <unicode/ucol.h>
28
31
#include <unicode/ustring.h>
29
32
#include <unicode/ubrk.h>
@@ -835,10 +838,10 @@ PHP_FUNCTION(grapheme_extract)
835
838
pstr = str + start ;
836
839
837
840
/* just in case pstr points in the middle of a character, move forward to the start of the next char */
838
- if ( !UTF8_IS_SINGLE (* pstr ) && !U8_IS_LEAD (* pstr ) ) {
841
+ if ( !U8_IS_SINGLE (* pstr ) && !U8_IS_LEAD (* pstr ) ) {
839
842
char * str_end = str + str_len ;
840
843
841
- while ( !UTF8_IS_SINGLE (* pstr ) && !U8_IS_LEAD (* pstr ) ) {
844
+ while ( !U8_IS_SINGLE (* pstr ) && !U8_IS_LEAD (* pstr ) ) {
842
845
pstr ++ ;
843
846
if ( pstr >= str_end ) {
844
847
intl_error_set ( NULL , U_ILLEGAL_ARGUMENT_ERROR ,
Original file line number Diff line number Diff line change 24
24
#include "normalizer_class.h"
25
25
#include "normalizer_normalize.h"
26
26
#include "intl_convert.h"
27
+ #if U_ICU_VERSION_MAJOR_NUM >= 49
28
+ #include <unicode/utf8.h>
29
+ #endif
27
30
28
31
/* {{{ proto string Normalizer::normalize( string $input [, string $form = FORM_C] )
29
32
* Normalize a string. }}} */
Original file line number Diff line number Diff line change 3
3
#include "intl_convert.h"
4
4
5
5
#include <unicode/uchar.h>
6
+ #if U_ICU_VERSION_MAJOR_NUM >= 49
7
+ #include <unicode/utf8.h>
8
+ #endif
6
9
7
10
#define IC_METHOD (mname ) PHP_METHOD(IntlChar, mname)
8
11
You can’t perform that action at this time.
0 commit comments