Moved #if a few paces to the left on Wez's advice. Fussy old compilers ;) Still does the same job (fixes win32 build and all builds where there is no strcoll), only this time without breaking otherwise happy builds.
- Steph
Index: Zend/zend_config.w32.h =================================================================== RCS file: /repository/ZendEngine2/zend_config.w32.h,v retrieving revision 1.36 diff -u -r1.36 zend_config.w32.h --- Zend/zend_config.w32.h 8 Jan 2004 17:31:47 -0000 1.36 +++ Zend/zend_config.w32.h 14 Sep 2004 15:24:36 -0000 @@ -30,6 +30,8 @@ #include <stdlib.h> #include <crtdbg.h> +#define HAVE_STRCOLL 1 + #include <string.h> #ifndef ZEND_INCLUDE_FULL_WINDOWS_HEADERS Index: Zend/zend_operators.c =================================================================== RCS file: /repository/ZendEngine2/zend_operators.c,v retrieving revision 1.196 diff -u -r1.196 zend_operators.c --- Zend/zend_operators.c 11 Sep 2004 14:22:35 -0000 1.196 +++ Zend/zend_operators.c 14 Sep 2004 15:24:41 -0000 @@ -1222,7 +1222,6 @@ return SUCCESS; } -#if HAVE_STRCOLL ZEND_API int string_locale_compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) { zval op1_copy, op2_copy; @@ -1249,7 +1248,6 @@ } return SUCCESS; } -#endif ZEND_API int numeric_compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) { Index: ext/standard/array.c =================================================================== RCS file: /repository/php-src/ext/standard/array.c,v retrieving revision 1.274 diff -u -r1.274 array.c --- ext/standard/array.c 11 Sep 2004 14:22:35 -0000 1.274 +++ ext/standard/array.c 14 Sep 2004 15:25:10 -0000 @@ -55,17 +55,19 @@ #define EXTR_OVERWRITE 0 #define EXTR_SKIP 1 #define EXTR_PREFIX_SAME 2 -#define EXTR_PREFIX_ALL 3 -#define EXTR_PREFIX_INVALID 4 -#define EXTR_PREFIX_IF_EXISTS 5 -#define EXTR_IF_EXISTS 6 +#define EXTR_PREFIX_ALL 3 +#define EXTR_PREFIX_INVALID 4 +#define EXTR_PREFIX_IF_EXISTS 5 +#define EXTR_IF_EXISTS 6 #define EXTR_REFS 0x100 #define SORT_REGULAR 0 #define SORT_NUMERIC 1 -#define SORT_STRING 2 -#define SORT_LOCALE_STRING 5 +#define SORT_STRING 2 +#if HAVE_STRCOLL +#define SORT_LOCALE_STRING 5 +#endif #define SORT_DESC 3 #define SORT_ASC 4 @@ -115,7 +117,10 @@ REGISTER_LONG_CONSTANT("SORT_REGULAR", SORT_REGULAR, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("SORT_NUMERIC", SORT_NUMERIC, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("SORT_STRING", SORT_STRING, CONST_CS | CONST_PERSISTENT); + +#if HAVE_STRCOLL REGISTER_LONG_CONSTANT("SORT_LOCALE_STRING", SORT_LOCALE_STRING, CONST_CS | CONST_PERSISTENT); +#endif REGISTER_LONG_CONSTANT("CASE_LOWER", CASE_LOWER, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("CASE_UPPER", CASE_UPPER, CONST_CS | CONST_PERSISTENT);
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php