]> granicus.if.org Git - php/commitdiff
Fix [-Wundef] warning in MBString extension
authorGeorge Peter Banyard <girgias@php.net>
Tue, 12 May 2020 15:59:17 +0000 (17:59 +0200)
committerGeorge Peter Banyard <girgias@php.net>
Sat, 16 May 2020 13:31:20 +0000 (15:31 +0200)
ext/mbstring/mb_gpc.c
ext/mbstring/mb_gpc.h
ext/mbstring/mbstring.c
ext/mbstring/mbstring.h
ext/mbstring/mbstring.stub.php
ext/mbstring/mbstring_arginfo.h
ext/mbstring/php_mbregex.c
ext/mbstring/php_mbregex.h
ext/mbstring/php_unicode.c
ext/mbstring/php_unicode.h

index 01f3d8ce8bdb658b1267cdc15bc9458c89d20b1f..5af2d8a486b1917fe6670f4a586f8f32c87193b0 100644 (file)
@@ -41,7 +41,7 @@
 #include "mb_gpc.h"
 /* }}} */
 
-#if HAVE_MBSTRING
+#ifdef HAVE_MBSTRING
 
 ZEND_EXTERN_MODULE_GLOBALS(mbstring)
 
index 07c5d1137f5b12f149650611f2854511f62d77c4..fb4f9278201fead8b77c45fce62d52a9bdc9d70b 100644 (file)
@@ -23,7 +23,7 @@
 #include "php.h"
 /* }}} */
 
-#if HAVE_MBSTRING
+#ifdef HAVE_MBSTRING
 /* {{{ typedefs */
 typedef struct _php_mb_encoding_handler_info_t {
        const char *separator;
index a70e16071bd49f8db913132e0643196efb83d3a8..779ba3417e49e073a514c52bb187e489a16ac3bc 100644 (file)
 
 #include "mb_gpc.h"
 
-#if HAVE_MBREGEX
+#ifdef HAVE_MBREGEX
 # include "php_mbregex.h"
 # include "php_onig_compat.h"
 # include <oniguruma.h>
 # undef UChar
-#if ONIGURUMA_VERSION_INT < 60800
+# if !defined(ONIGURUMA_VERSION_INT) || ONIGURUMA_VERSION_INT < 60800
 typedef void OnigMatchParam;
 #define onig_new_match_param() (NULL)
 #define onig_initialize_match_param(x) (void)(x)
@@ -69,7 +69,7 @@ typedef void OnigMatchParam;
 onig_search(reg, str, end, start, range, region, option)
 #define onig_match_with_param(re, str, end, at, region, option, mp) \
 onig_match(re, str, end, at, region, option)
-#endif
+# endif
 #else
 # include "ext/pcre/php_pcre.h"
 #endif
@@ -78,7 +78,7 @@ onig_match(re, str, end, at, region, option)
 #include "mbstring_arginfo.h"
 /* }}} */
 
-#if HAVE_MBSTRING
+#ifdef HAVE_MBSTRING
 
 /* {{{ prototypes */
 ZEND_DECLARE_MODULE_GLOBALS(mbstring)
@@ -554,7 +554,7 @@ static void *_php_mb_compile_regex(const char *pattern);
 static int _php_mb_match_regex(void *opaque, const char *str, size_t str_len);
 static void _php_mb_free_regex(void *opaque);
 
-#if HAVE_MBREGEX
+#ifdef HAVE_MBREGEX
 /* {{{ _php_mb_compile_regex */
 static void *_php_mb_compile_regex(const char *pattern)
 {
@@ -906,7 +906,7 @@ static int _php_mb_ini_mbstring_internal_encoding_set(const char *new_value, siz
        }
        MBSTRG(internal_encoding) = encoding;
        MBSTRG(current_internal_encoding) = encoding;
-#if HAVE_MBREGEX
+#ifdef HAVE_MBREGEX
        {
                const char *enc_name = new_value;
                if (FAILURE == php_mb_regex_set_default_mbctype(enc_name)) {
@@ -1054,7 +1054,7 @@ PHP_INI_BEGIN()
                PHP_INI_ALL,
                OnUpdateBool,
                strict_detection, zend_mbstring_globals, mbstring_globals)
-#if HAVE_MBREGEX
+#ifdef HAVE_MBREGEX
        STD_PHP_INI_ENTRY("mbstring.regex_stack_limit", "100000",PHP_INI_ALL, OnUpdateLong, regex_stack_limit, zend_mbstring_globals, mbstring_globals)
        STD_PHP_INI_ENTRY("mbstring.regex_retry_limit", "1000000",PHP_INI_ALL, OnUpdateLong, regex_retry_limit, zend_mbstring_globals, mbstring_globals)
 #endif
@@ -1113,7 +1113,7 @@ ZEND_TSRMLS_CACHE_UPDATE();
        mbstring_globals->strict_detection = 0;
        mbstring_globals->outconv = NULL;
        mbstring_globals->http_output_conv_mimetypes = NULL;
-#if HAVE_MBREGEX
+#ifdef HAVE_MBREGEX
        mbstring_globals->mb_regex_globals = php_mb_regex_globals_alloc();
 #endif
        mbstring_globals->last_used_encoding_name = NULL;
@@ -1136,7 +1136,7 @@ static PHP_GSHUTDOWN_FUNCTION(mbstring)
        if (mbstring_globals->http_output_conv_mimetypes) {
                _php_mb_free_regex(mbstring_globals->http_output_conv_mimetypes);
        }
-#if HAVE_MBREGEX
+#ifdef HAVE_MBREGEX
        php_mb_regex_globals_free(mbstring_globals->mb_regex_globals);
 #endif
 }
@@ -1174,7 +1174,7 @@ ZEND_TSRMLS_CACHE_UPDATE();
        REGISTER_LONG_CONSTANT("MB_CASE_TITLE_SIMPLE", PHP_UNICODE_CASE_TITLE_SIMPLE, CONST_CS | CONST_PERSISTENT);
        REGISTER_LONG_CONSTANT("MB_CASE_FOLD_SIMPLE", PHP_UNICODE_CASE_FOLD_SIMPLE, CONST_CS | CONST_PERSISTENT);
 
-#if HAVE_MBREGEX
+#ifdef HAVE_MBREGEX
        PHP_MINIT(mb_regex) (INIT_FUNC_ARGS_PASSTHRU);
 #endif
 
@@ -1201,7 +1201,7 @@ PHP_MSHUTDOWN_FUNCTION(mbstring)
 
        zend_multibyte_restore_functions();
 
-#if HAVE_MBREGEX
+#ifdef HAVE_MBREGEX
        PHP_MSHUTDOWN(mb_regex) (INIT_FUNC_ARGS_PASSTHRU);
 #endif
 
@@ -1223,7 +1223,7 @@ PHP_RINIT_FUNCTION(mbstring)
 
        php_mb_populate_current_detect_order_list();
 
-#if HAVE_MBREGEX
+#ifdef HAVE_MBREGEX
        PHP_RINIT(mb_regex) (INIT_FUNC_ARGS_PASSTHRU);
 #endif
        zend_multibyte_set_internal_encoding((const zend_encoding *)MBSTRG(internal_encoding));
@@ -1262,7 +1262,7 @@ PHP_RSHUTDOWN_FUNCTION(mbstring)
        MBSTRG(http_output_set) = 0;
        MBSTRG(http_input_set) = 0;
 
-#if HAVE_MBREGEX
+#ifdef HAVE_MBREGEX
        PHP_RSHUTDOWN(mb_regex) (INIT_FUNC_ARGS_PASSTHRU);
 #endif
 
@@ -1288,7 +1288,7 @@ PHP_MINFO_FUNCTION(mbstring)
        php_info_print_table_header(1, "mbstring extension makes use of \"streamable kanji code filter and converter\", which is distributed under the GNU Lesser General Public License version 2.1.");
        php_info_print_table_end();
 
-#if HAVE_MBREGEX
+#ifdef HAVE_MBREGEX
        PHP_MINFO(mb_regex)(ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU);
 #endif
 
index 14003c5d9a1fde0c5faac4380e5068547df403b8..380e0b45689d6000c9bf89c2d980ff3da24398f2 100644 (file)
@@ -45,7 +45,7 @@
 #endif
 
 
-#if HAVE_MBSTRING
+#ifdef HAVE_MBSTRING
 
 #include "libmbfl/mbfl/mbfilter.h"
 #include "SAPI.h"
@@ -108,7 +108,7 @@ ZEND_BEGIN_MODULE_GLOBALS(mbstring)
        size_t illegalchars;
        mbfl_buffer_converter *outconv;
     void *http_output_conv_mimetypes;
-#if HAVE_MBREGEX
+#ifdef HAVE_MBREGEX
     struct _zend_mb_regex_globals *mb_regex_globals;
     zend_long regex_stack_limit;
 #endif
@@ -118,7 +118,7 @@ ZEND_BEGIN_MODULE_GLOBALS(mbstring)
        zend_bool internal_encoding_set;
        zend_bool http_output_set;
        zend_bool http_input_set;
-#if HAVE_MBREGEX
+#ifdef HAVE_MBREGEX
     zend_long regex_retry_limit;
 #endif
 ZEND_END_MODULE_GLOBALS(mbstring)
index 3a1fc929ac901ed954730f622f1f27dc72c43417..789423dbc87c00b66f5cb1802252a3b83ced05b9 100644 (file)
@@ -88,7 +88,7 @@ function mb_ord(string $str, string $encoding = UNKNOWN): int|false {}
 
 function mb_chr(int $cp, string $encoding = UNKNOWN): string|false {}
 
-#if HAVE_MBREGEX
+#ifdef HAVE_MBREGEX
 function mb_regex_encoding(string $encoding = UNKNOWN): string|bool {}
 
 function mb_ereg(string $pattern, string $string, &$registers = UNKNOWN): int|false {}
index 57559f8ccd49e63770c3c9711c5b74c9611d769d..47f0f2db44e48c7af06dfe703cd3f6f2a8917473 100644 (file)
@@ -205,13 +205,13 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_chr, 0, 1, MAY_BE_STRING|MAY_
        ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
 ZEND_END_ARG_INFO()
 
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_regex_encoding, 0, 0, MAY_BE_STRING|MAY_BE_BOOL)
        ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
 ZEND_END_ARG_INFO()
 #endif
 
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_ereg, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
        ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)
        ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
@@ -219,11 +219,11 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_ereg, 0, 2, MAY_BE_LONG|MAY_B
 ZEND_END_ARG_INFO()
 #endif
 
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
 #define arginfo_mb_eregi arginfo_mb_ereg
 #endif
 
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_ereg_replace, 0, 3, MAY_BE_STRING|MAY_BE_FALSE|MAY_BE_NULL)
        ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)
        ZEND_ARG_TYPE_INFO(0, replacement, IS_STRING, 0)
@@ -232,11 +232,11 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_ereg_replace, 0, 3, MAY_BE_ST
 ZEND_END_ARG_INFO()
 #endif
 
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
 #define arginfo_mb_eregi_replace arginfo_mb_ereg_replace
 #endif
 
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_ereg_replace_callback, 0, 3, MAY_BE_STRING|MAY_BE_FALSE|MAY_BE_NULL)
        ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)
        ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 0)
@@ -245,7 +245,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_ereg_replace_callback, 0, 3,
 ZEND_END_ARG_INFO()
 #endif
 
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_split, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
        ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)
        ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
@@ -253,7 +253,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_split, 0, 2, MAY_BE_ARRAY|MAY
 ZEND_END_ARG_INFO()
 #endif
 
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_ereg_match, 0, 2, _IS_BOOL, 0)
        ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)
        ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
@@ -261,22 +261,22 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_ereg_match, 0, 2, _IS_BOOL, 0
 ZEND_END_ARG_INFO()
 #endif
 
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_ereg_search, 0, 0, MAY_BE_ARRAY|MAY_BE_BOOL)
        ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)
        ZEND_ARG_TYPE_INFO(0, option, IS_STRING, 0)
 ZEND_END_ARG_INFO()
 #endif
 
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
 #define arginfo_mb_ereg_search_pos arginfo_mb_ereg_search
 #endif
 
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
 #define arginfo_mb_ereg_search_regs arginfo_mb_ereg_search
 #endif
 
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_ereg_search_init, 0, 1, _IS_BOOL, 0)
        ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
        ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0)
@@ -284,23 +284,23 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_ereg_search_init, 0, 1, _IS_B
 ZEND_END_ARG_INFO()
 #endif
 
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mb_ereg_search_getregs, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE)
 ZEND_END_ARG_INFO()
 #endif
 
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_ereg_search_getpos, 0, 0, IS_LONG, 0)
 ZEND_END_ARG_INFO()
 #endif
 
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_ereg_search_setpos, 0, 1, _IS_BOOL, 0)
        ZEND_ARG_TYPE_INFO(0, position, IS_LONG, 0)
 ZEND_END_ARG_INFO()
 #endif
 
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mb_regex_set_options, 0, 0, IS_STRING, 0)
        ZEND_ARG_TYPE_INFO(0, options, IS_STRING, 0)
 ZEND_END_ARG_INFO()
@@ -350,52 +350,52 @@ ZEND_FUNCTION(mb_check_encoding);
 ZEND_FUNCTION(mb_scrub);
 ZEND_FUNCTION(mb_ord);
 ZEND_FUNCTION(mb_chr);
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
 ZEND_FUNCTION(mb_regex_encoding);
 #endif
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
 ZEND_FUNCTION(mb_ereg);
 #endif
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
 ZEND_FUNCTION(mb_eregi);
 #endif
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
 ZEND_FUNCTION(mb_ereg_replace);
 #endif
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
 ZEND_FUNCTION(mb_eregi_replace);
 #endif
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
 ZEND_FUNCTION(mb_ereg_replace_callback);
 #endif
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
 ZEND_FUNCTION(mb_split);
 #endif
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
 ZEND_FUNCTION(mb_ereg_match);
 #endif
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
 ZEND_FUNCTION(mb_ereg_search);
 #endif
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
 ZEND_FUNCTION(mb_ereg_search_pos);
 #endif
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
 ZEND_FUNCTION(mb_ereg_search_regs);
 #endif
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
 ZEND_FUNCTION(mb_ereg_search_init);
 #endif
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
 ZEND_FUNCTION(mb_ereg_search_getregs);
 #endif
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
 ZEND_FUNCTION(mb_ereg_search_getpos);
 #endif
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
 ZEND_FUNCTION(mb_ereg_search_setpos);
 #endif
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
 ZEND_FUNCTION(mb_regex_set_options);
 #endif
 
@@ -444,52 +444,52 @@ static const zend_function_entry ext_functions[] = {
        ZEND_FE(mb_scrub, arginfo_mb_scrub)
        ZEND_FE(mb_ord, arginfo_mb_ord)
        ZEND_FE(mb_chr, arginfo_mb_chr)
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
        ZEND_FE(mb_regex_encoding, arginfo_mb_regex_encoding)
 #endif
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
        ZEND_FE(mb_ereg, arginfo_mb_ereg)
 #endif
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
        ZEND_FE(mb_eregi, arginfo_mb_eregi)
 #endif
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
        ZEND_FE(mb_ereg_replace, arginfo_mb_ereg_replace)
 #endif
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
        ZEND_FE(mb_eregi_replace, arginfo_mb_eregi_replace)
 #endif
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
        ZEND_FE(mb_ereg_replace_callback, arginfo_mb_ereg_replace_callback)
 #endif
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
        ZEND_FE(mb_split, arginfo_mb_split)
 #endif
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
        ZEND_FE(mb_ereg_match, arginfo_mb_ereg_match)
 #endif
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
        ZEND_FE(mb_ereg_search, arginfo_mb_ereg_search)
 #endif
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
        ZEND_FE(mb_ereg_search_pos, arginfo_mb_ereg_search_pos)
 #endif
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
        ZEND_FE(mb_ereg_search_regs, arginfo_mb_ereg_search_regs)
 #endif
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
        ZEND_FE(mb_ereg_search_init, arginfo_mb_ereg_search_init)
 #endif
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
        ZEND_FE(mb_ereg_search_getregs, arginfo_mb_ereg_search_getregs)
 #endif
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
        ZEND_FE(mb_ereg_search_getpos, arginfo_mb_ereg_search_getpos)
 #endif
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
        ZEND_FE(mb_ereg_search_setpos, arginfo_mb_ereg_search_setpos)
 #endif
-#if HAVE_MBREGEX
+#if defined(HAVE_MBREGEX)
        ZEND_FE(mb_regex_set_options, arginfo_mb_regex_set_options)
 #endif
        ZEND_FE_END
index 43855545d732298f24312d666b27ca5a6ea2e5b2..bc365969884b0a4734c7e17d60590dbec2756b16 100644 (file)
@@ -21,7 +21,7 @@
 #include "php.h"
 #include "php_ini.h"
 
-#if HAVE_MBREGEX
+#ifdef HAVE_MBREGEX
 
 #include "zend_smart_str.h"
 #include "ext/standard/info.h"
@@ -33,7 +33,7 @@
 #include <oniguruma.h>
 #undef UChar
 
-#if ONIGURUMA_VERSION_INT < 60800
+#if !defined(ONIGURUMA_VERSION_INT) || ONIGURUMA_VERSION_INT < 60800
 typedef void OnigMatchParam;
 #define onig_new_match_param() (NULL)
 #define onig_initialize_match_param(x) (void)(x)
index 64463da01cb5a7e2490babeff4aba59faf3adc22..78b914254297d3d4f240ad617d8c764c953f6cd7 100644 (file)
@@ -17,7 +17,7 @@
 #ifndef _PHP_MBREGEX_H
 #define _PHP_MBREGEX_H
 
-#if HAVE_MBREGEX
+#ifdef HAVE_MBREGEX
 
 #include "php.h"
 #include "zend.h"
index ba84dc55c764516be2667daf2888c41125dd7bbb..dc0c3f08319998e0205215e183d1203bcc6544cd 100644 (file)
@@ -35,7 +35,7 @@
 #include "php.h"
 #include "php_ini.h"
 
-#if HAVE_MBSTRING
+#ifdef HAVE_MBSTRING
 
 /* include case folding data generated from the official UnicodeData.txt file */
 #include "mbstring.h"
index 2cd6dd953917641de2bebd9c728be791c0357e06..26d0979ca45f15f8f7d5dae5fe23a9a80da59b14 100644 (file)
@@ -31,7 +31,7 @@
 #ifndef PHP_UNICODE_H
 #define PHP_UNICODE_H
 
-#if HAVE_MBSTRING
+#ifdef HAVE_MBSTRING
 
 #define UC_MN  0 /* Mark, Non-Spacing          */
 #define UC_MC  1 /* Mark, Spacing Combining    */