Skip to content

Commit 7f99499

Browse files
committed
Merge branch 'PHP-7.4'
* PHP-7.4: Remove HAVE_STRCOLL check
2 parents 221494f + 638c217 commit 7f99499

File tree

11 files changed

+2
-34
lines changed

11 files changed

+2
-34
lines changed

Zend/zend_operators.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1944,7 +1944,6 @@ ZEND_API int ZEND_FASTCALL string_case_compare_function(zval *op1, zval *op2) /*
19441944
}
19451945
/* }}} */
19461946

1947-
#if HAVE_STRCOLL
19481947
ZEND_API int ZEND_FASTCALL string_locale_compare_function(zval *op1, zval *op2) /* {{{ */
19491948
{
19501949
zend_string *tmp_str1, *tmp_str2;
@@ -1957,7 +1956,6 @@ ZEND_API int ZEND_FASTCALL string_locale_compare_function(zval *op1, zval *op2)
19571956
return ret;
19581957
}
19591958
/* }}} */
1960-
#endif
19611959

19621960
ZEND_API int ZEND_FASTCALL numeric_compare_function(zval *op1, zval *op2) /* {{{ */
19631961
{

Zend/zend_operators.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,9 +394,7 @@ ZEND_API int ZEND_FASTCALL numeric_compare_function(zval *op1, zval *op2);
394394
ZEND_API int ZEND_FASTCALL string_compare_function_ex(zval *op1, zval *op2, zend_bool case_insensitive);
395395
ZEND_API int ZEND_FASTCALL string_compare_function(zval *op1, zval *op2);
396396
ZEND_API int ZEND_FASTCALL string_case_compare_function(zval *op1, zval *op2);
397-
#if HAVE_STRCOLL
398397
ZEND_API int ZEND_FASTCALL string_locale_compare_function(zval *op1, zval *op2);
399-
#endif
400398

401399
ZEND_API void ZEND_FASTCALL zend_str_tolower(char *str, size_t length);
402400
ZEND_API char* ZEND_FASTCALL zend_str_tolower_copy(char *dest, const char *source, size_t length);

configure.ac

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,6 @@ statfs \
645645
statvfs \
646646
std_syslog \
647647
strcasecmp \
648-
strcoll \
649648
strdup \
650649
strerror \
651650
strnlen \

ext/opcache/Optimizer/zend_func_info.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,7 @@ static const func_info_t func_infos[] = {
206206
F1("str_split", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
207207
F1("strpbrk", MAY_BE_FALSE | MAY_BE_STRING),
208208
F0("substr_compare", MAY_BE_FALSE | MAY_BE_LONG),
209-
#ifdef HAVE_STRCOLL
210209
F0("strcoll", MAY_BE_LONG),
211-
#endif
212210
#ifdef HAVE_STRFMON
213211
F1("money_format", MAY_BE_FALSE | MAY_BE_STRING),
214212
#endif

ext/standard/array.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,6 @@ static int php_array_reverse_key_compare_string_natural(const void *a, const voi
327327
}
328328
/* }}} */
329329

330-
#if HAVE_STRCOLL
331330
static int php_array_key_compare_string_locale(const void *a, const void *b) /* {{{ */
332331
{
333332
Bucket *f = (Bucket *) a;
@@ -355,7 +354,6 @@ static int php_array_reverse_key_compare_string_locale(const void *a, const void
355354
return php_array_key_compare_string_locale(b, a);
356355
}
357356
/* }}} */
358-
#endif
359357

360358
/* Numbers are always smaller than strings int this function as it
361359
* anyway doesn't make much sense to compare two different data types.
@@ -528,7 +526,6 @@ static int php_array_reverse_natural_case_compare(const void *a, const void *b)
528526
}
529527
/* }}} */
530528

531-
#if HAVE_STRCOLL
532529
static int php_array_data_compare_string_locale(const void *a, const void *b) /* {{{ */
533530
{
534531
Bucket *f;
@@ -558,7 +555,6 @@ static int php_array_reverse_data_compare_string_locale(const void *a, const voi
558555
return php_array_data_compare_string_locale(b, a);
559556
}
560557
/* }}} */
561-
#endif
562558

563559
static compare_func_t php_get_key_compare_func(zend_long sort_type, int reverse) /* {{{ */
564560
{
@@ -603,15 +599,13 @@ static compare_func_t php_get_key_compare_func(zend_long sort_type, int reverse)
603599
}
604600
break;
605601

606-
#if HAVE_STRCOLL
607602
case PHP_SORT_LOCALE_STRING:
608603
if (reverse) {
609604
return php_array_reverse_key_compare_string_locale;
610605
} else {
611606
return php_array_key_compare_string_locale;
612607
}
613608
break;
614-
#endif
615609

616610
case PHP_SORT_REGULAR:
617611
default:
@@ -669,15 +663,13 @@ static compare_func_t php_get_data_compare_func(zend_long sort_type, int reverse
669663
}
670664
break;
671665

672-
#if HAVE_STRCOLL
673666
case PHP_SORT_LOCALE_STRING:
674667
if (reverse) {
675668
return php_array_reverse_data_compare_string_locale;
676669
} else {
677670
return php_array_data_compare_string_locale;
678671
}
679672
break;
680-
#endif
681673

682674
case PHP_SORT_REGULAR:
683675
default:
@@ -5687,9 +5679,7 @@ PHP_FUNCTION(array_multisort)
56875679
case PHP_SORT_NUMERIC:
56885680
case PHP_SORT_STRING:
56895681
case PHP_SORT_NATURAL:
5690-
#if HAVE_STRCOLL
56915682
case PHP_SORT_LOCALE_STRING:
5692-
#endif
56935683
/* flag allowed here */
56945684
if (parse_state[MULTISORT_TYPE] == 1) {
56955685
/* Save the flag and make sure then next arg is not the current flag. */

ext/standard/basic_functions.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2156,12 +2156,10 @@ ZEND_BEGIN_ARG_INFO(arginfo_nl_langinfo, 0)
21562156
ZEND_END_ARG_INFO()
21572157
#endif
21582158

2159-
#ifdef HAVE_STRCOLL
21602159
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO(arginfo_strcoll, IS_LONG, 0)
21612160
ZEND_ARG_INFO(0, str1)
21622161
ZEND_ARG_INFO(0, str2)
21632162
ZEND_END_ARG_INFO()
2164-
#endif
21652163

21662164
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_trim, 0, 1, IS_STRING, 0)
21672165
ZEND_ARG_INFO(0, str)
@@ -2797,10 +2795,7 @@ static const zend_function_entry basic_functions[] = { /* {{{ */
27972795
PHP_FE(substr_compare,arginfo_substr_compare)
27982796
PHP_FE(utf8_encode, arginfo_utf8_encode)
27992797
PHP_FE(utf8_decode, arginfo_utf8_decode)
2800-
2801-
#ifdef HAVE_STRCOLL
28022798
PHP_FE(strcoll,arginfo_strcoll)
2803-
#endif
28042799

28052800
#ifdef HAVE_STRFMON
28062801
PHP_FE(money_format,arginfo_money_format)
@@ -4133,10 +4128,10 @@ PHP_FUNCTION(getenv)
41334128
#else
41344129

41354130
tsrm_env_lock();
4136-
4131+
41374132
/* system method returns a const */
41384133
ptr = getenv(str);
4139-
4134+
41404135
if (ptr) {
41414136
RETVAL_STRING(ptr);
41424137
}

ext/standard/php_string.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,7 @@ PHP_FUNCTION(strpbrk);
9191
PHP_FUNCTION(substr_compare);
9292
PHP_FUNCTION(utf8_encode);
9393
PHP_FUNCTION(utf8_decode);
94-
#ifdef HAVE_STRCOLL
9594
PHP_FUNCTION(strcoll);
96-
#endif
9795
#if HAVE_STRFMON
9896
PHP_FUNCTION(money_format);
9997
#endif

ext/standard/string.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,6 @@ PHP_FUNCTION(nl_langinfo)
701701
#endif
702702
/* }}} */
703703

704-
#ifdef HAVE_STRCOLL
705704
/* {{{ proto int strcoll(string str1, string str2)
706705
Compares two strings using the current locale */
707706
PHP_FUNCTION(strcoll)
@@ -717,7 +716,6 @@ PHP_FUNCTION(strcoll)
717716
(const char *) ZSTR_VAL(s2)));
718717
}
719718
/* }}} */
720-
#endif
721719

722720
/* {{{ php_charmask
723721
* Fills a 256-byte bytemask with input. You can specify a range like 'a..z',

ext/standard/tests/strings/strcoll.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
Testing Basic behaviour of strcoll()
3-
--SKIPIF--
4-
<?php if (!function_exists('strcoll')) die('skip strcoll function not available') ?>
53
--CREDITS--
64
Sebastian Schürmann
75
sebs@php.net

win32/build/config.w32

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,6 @@ ARG_ENABLE('fd-setsize', "Set maximum number of sockets for select(2)", "256");
300300
ADD_FLAG("CFLAGS", "/D FD_SETSIZE=" + parseInt(PHP_FD_SETSIZE));
301301

302302
AC_DEFINE('HAVE_USLEEP', 1);
303-
AC_DEFINE('HAVE_STRCOLL', 1);
304303

305304
/* For snapshot builders, where can we find the additional
306305
* files that make up the snapshot template? */

0 commit comments

Comments
 (0)