diff options
-rw-r--r-- | ext/ereg/php_regex.h | 8 | ||||
-rw-r--r-- | ext/ereg/regex/regex_extra.h | 5 | ||||
-rw-r--r-- | main/php_regex.h | 8 | ||||
-rw-r--r-- | regex/regex_extra.h | 5 |
4 files changed, 26 insertions, 0 deletions
diff --git a/ext/ereg/php_regex.h b/ext/ereg/php_regex.h index 91cbd994c4..62279c4c08 100644 --- a/ext/ereg/php_regex.h +++ b/ext/ereg/php_regex.h @@ -2,7 +2,15 @@ #define _PHP_REGEX_H #if REGEX == 1 +/* get aliases */ +#include "regex/regex_extra.h" #include "regex/regex.h" + +/* get rid of aliases */ +#define PHP_NO_ALIASES +#include "regex/regex_extra.h" +#undef PHP_NO_ALIASES + #ifndef _REGEX_H #define _REGEX_H 1 /* this should stop Apache from loading the system version of regex.h */ #endif diff --git a/ext/ereg/regex/regex_extra.h b/ext/ereg/regex/regex_extra.h index 511df57f67..3db9e4ad1a 100644 --- a/ext/ereg/regex/regex_extra.h +++ b/ext/ereg/regex/regex_extra.h @@ -1,3 +1,4 @@ +/* do not frame this - we must be able to include this file multiple times */ #undef regexec #undef regerror @@ -8,6 +9,8 @@ #if !(WIN32|WINNT) +#ifndef PHP_NO_ALIASES + #define regexec php_regexec #define regerror php_regerror #define regfree php_regfree @@ -16,3 +19,5 @@ #endif #endif + +#endif diff --git a/main/php_regex.h b/main/php_regex.h index 91cbd994c4..62279c4c08 100644 --- a/main/php_regex.h +++ b/main/php_regex.h @@ -2,7 +2,15 @@ #define _PHP_REGEX_H #if REGEX == 1 +/* get aliases */ +#include "regex/regex_extra.h" #include "regex/regex.h" + +/* get rid of aliases */ +#define PHP_NO_ALIASES +#include "regex/regex_extra.h" +#undef PHP_NO_ALIASES + #ifndef _REGEX_H #define _REGEX_H 1 /* this should stop Apache from loading the system version of regex.h */ #endif diff --git a/regex/regex_extra.h b/regex/regex_extra.h index 511df57f67..3db9e4ad1a 100644 --- a/regex/regex_extra.h +++ b/regex/regex_extra.h @@ -1,3 +1,4 @@ +/* do not frame this - we must be able to include this file multiple times */ #undef regexec #undef regerror @@ -8,6 +9,8 @@ #if !(WIN32|WINNT) +#ifndef PHP_NO_ALIASES + #define regexec php_regexec #define regerror php_regerror #define regfree php_regfree @@ -16,3 +19,5 @@ #endif #endif + +#endif |