summaryrefslogtreecommitdiff
path: root/regex
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>1999-11-13 16:51:33 +0000
committerSascha Schumann <sas@php.net>1999-11-13 16:51:33 +0000
commitbcb2214e9951b271d073314870bf09a6a87435f5 (patch)
treeb3a1540deb25e4480d62c57854ba092479191e28 /regex
parentc166a6fb835c5b43a782da141c1543e8a1878229 (diff)
downloadphp-git-bcb2214e9951b271d073314870bf09a6a87435f5.tar.gz
Improve regex library selection. It lets user specify whether they want
system, apache, or php's regex library by using the --with-regex option. "php" is the default; if you use --with-apache in combination with Apache 1.3.x, the default is "apache".
Diffstat (limited to 'regex')
-rw-r--r--regex/regex_extra.h14
-rw-r--r--regex/utils.h3
2 files changed, 17 insertions, 0 deletions
diff --git a/regex/regex_extra.h b/regex/regex_extra.h
new file mode 100644
index 0000000000..b839ddc2ad
--- /dev/null
+++ b/regex/regex_extra.h
@@ -0,0 +1,14 @@
+
+#undef regexec
+#undef regerror
+#undef regfree
+#undef regcomp
+
+#if (defined(REGEX) && REGEX == 1) || (!defined(REGEX))
+
+#define regexec php_regexec
+#define regerror php_regerror
+#define regfree php_regfree
+#define regcomp php_regcomp
+
+#endif
diff --git a/regex/utils.h b/regex/utils.h
index 1a997ac8fc..cd4a96025f 100644
--- a/regex/utils.h
+++ b/regex/utils.h
@@ -1,4 +1,7 @@
/* utility definitions */
+
+#include "regex_extra.h"
+
#ifdef _POSIX2_RE_DUP_MAX
#define DUPMAX _POSIX2_RE_DUP_MAX
#else