diff options
author | Anatol Belski <ab@php.net> | 2013-03-03 19:06:22 +0100 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2013-03-03 19:06:22 +0100 |
commit | 357ab3cbada57374075ccf57c9ec25bbbbcb6948 (patch) | |
tree | f8c61f2068629b070bf82ada4ad2b2adc44516ba /ext/pcre/pcrelib/pcre_config.c | |
parent | c134f2a1a5ef56da72dbdc1096eddc91e4f5939e (diff) | |
download | php-git-357ab3cbada57374075ccf57c9ec25bbbbcb6948.tar.gz |
merged PCRE 8.32
- defined HAVE_CONFIG_H to simplify the future merges
- PCRE NEWS http://pcre.org/news.txt
Diffstat (limited to 'ext/pcre/pcrelib/pcre_config.c')
-rw-r--r-- | ext/pcre/pcrelib/pcre_config.c | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/ext/pcre/pcrelib/pcre_config.c b/ext/pcre/pcrelib/pcre_config.c index 34719591f7..3d5689f62c 100644 --- a/ext/pcre/pcrelib/pcre_config.c +++ b/ext/pcre/pcrelib/pcre_config.c @@ -41,7 +41,9 @@ POSSIBILITY OF SUCH DAMAGE. /* This module contains the external function pcre_config(). */ +#ifdef HAVE_CONFIG_H #include "config.h" +#endif /* Keep the original link size. */ static int real_link_size = LINK_SIZE; @@ -63,18 +65,21 @@ Arguments: Returns: 0 if data returned, negative on error */ -#ifdef COMPILE_PCRE8 +#if defined COMPILE_PCRE8 PCRE_EXP_DEFN int PCRE_CALL_CONVENTION pcre_config(int what, void *where) -#else +#elif defined COMPILE_PCRE16 PCRE_EXP_DEFN int PCRE_CALL_CONVENTION pcre16_config(int what, void *where) +#elif defined COMPILE_PCRE32 +PCRE_EXP_DEFN int PCRE_CALL_CONVENTION +pcre32_config(int what, void *where) #endif { switch (what) { case PCRE_CONFIG_UTF8: -#if defined COMPILE_PCRE16 +#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32 *((int *)where) = 0; return PCRE_ERROR_BADOPTION; #else @@ -87,7 +92,20 @@ switch (what) #endif case PCRE_CONFIG_UTF16: -#if defined COMPILE_PCRE8 +#if defined COMPILE_PCRE8 || defined COMPILE_PCRE32 + *((int *)where) = 0; + return PCRE_ERROR_BADOPTION; +#else +#if defined SUPPORT_UTF + *((int *)where) = 1; +#else + *((int *)where) = 0; +#endif + break; +#endif + + case PCRE_CONFIG_UTF32: +#if defined COMPILE_PCRE8 || defined COMPILE_PCRE16 *((int *)where) = 0; return PCRE_ERROR_BADOPTION; #else |