diff options
author | Moriyoshi Koizumi <moriyoshi@php.net> | 2003-12-10 06:08:39 +0000 |
---|---|---|
committer | Moriyoshi Koizumi <moriyoshi@php.net> | 2003-12-10 06:08:39 +0000 |
commit | 35c3a7f525b18ab01a62d97c70e533e4fd6e5b23 (patch) | |
tree | 4c73b319a9e6b8ae41311c4f205103d95d6719b3 /ext/standard/php_string.h | |
parent | c4c586a6523387d0b9459c1e5e9b9584e28bd0be (diff) | |
download | php-git-35c3a7f525b18ab01a62d97c70e533e4fd6e5b23.tar.gz |
Expose the macro globally
Diffstat (limited to 'ext/standard/php_string.h')
-rw-r--r-- | ext/standard/php_string.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/standard/php_string.h b/ext/standard/php_string.h index dac757b050..a7882dba96 100644 --- a/ext/standard/php_string.h +++ b/ext/standard/php_string.h @@ -144,6 +144,16 @@ PHPAPI char *php_strerror(int errnum); #define strerror php_strerror #endif +#ifndef HAVE_MBLEN +# define php_mblen(ptr, len) 1 +#else +# if defined(_REENTRANT) && defined(HAVE_MBRLEN) && defined(HAVE_MBSTATE_T) +# define php_mblen(ptr, len) ((ptr) == NULL ? mbsinit(&BG(mblen_state)): (int)mbrlen(ptr, len, &BG(mblen_state))) +# else +# define php_mblen(ptr, len) mblen(ptr, len) +# endif +#endif + void register_string_constants(INIT_FUNC_ARGS); #endif /* PHP_STRING_H */ |