Skip to content

Commit a7f3ad4

Browse files
committed
Fixing build on WIn32
MBREGEX is disabled for now. 5 mbre_* functions are undefined on WIn32
1 parent 7fd0c8b commit a7f3ad4

File tree

5 files changed

+20
-5
lines changed

5 files changed

+20
-5
lines changed

ext/mbstring/mbstring.dsp

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ext/mbstring/mbstring.h

+14
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,20 @@
4949
#ifdef COMPILE_DL_MBSTRING
5050
#undef HAVE_MBSTRING
5151
#define HAVE_MBSTRING 1
52+
#ifdef PHP_WIN32
53+
# undef HAVE_MBREGEX
54+
# define HAVE_MBREGEX 0
55+
# undef HAVE_MBSTR_CN
56+
# define HAVE_MBSTR_CN 1
57+
# undef HAVE_MBSTR_JA
58+
# define HAVE_MBSTR_JA 1
59+
# undef HAVE_MBSTR_KR
60+
# define HAVE_MBSTR_KR 1
61+
# undef HAVE_MBSTR_RU
62+
# define HAVE_MBSTR_RU 1
63+
# undef HAVE_MBSTR_TW
64+
# define HAVE_MBSTR_TW 1
65+
#endif
5266
#endif
5367

5468
#ifdef PHP_WIN32

ext/mbstring/php_mbregex.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525

2626
#include "php.h"
2727
#include "php_ini.h"
28-
#include "php_mbregex.h"
29-
#include "mbregex.h"
3028
#include "mbstring.h"
29+
#include "mbregex.h"
30+
#include "php_mbregex.h"
3131

3232
#if HAVE_MBREGEX
3333

ext/mbstring/php_unicode.c

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636

3737
#include "php.h"
3838
#include "php_ini.h"
39+
#include "mbstring.h"
3940

4041
#if HAVE_MBSTRING
4142

ext/mbstring/php_unicode.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103

104104
MBSTRING_API int php_unicode_is_prop(unsigned long code, unsigned long mask1,
105105
unsigned long mask2);
106-
MBSTRING_API char *php_unicode_convert_case(int case_mode, char *srcstr, size_t srclen, size_t *retlen,
106+
MBSTRING_API char *php_unicode_convert_case(int case_mode, char *srcstr, size_t srclen, size_t *ret_len,
107107
char *src_encoding TSRMLS_DC);
108108

109109
#define PHP_UNICODE_CASE_UPPER 0

0 commit comments

Comments
 (0)