summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>1999-11-13 18:33:28 +0000
committerSascha Schumann <sas@php.net>1999-11-13 18:33:28 +0000
commitafc9e1257b7976bf74925db79aca794dd423587e (patch)
tree55760978fa3f1d7be40e7bb431da11c53b3fe5f0
parentd35ea24fc01571fe808ad45049f62bb573cc7458 (diff)
downloadphp-git-afc9e1257b7976bf74925db79aca794dd423587e.tar.gz
Suck in prototypes correctly with applied aliases
(otherwise php_reg* would not be prototyped)
-rw-r--r--ext/ereg/php_regex.h8
-rw-r--r--ext/ereg/regex/regex_extra.h5
-rw-r--r--main/php_regex.h8
-rw-r--r--regex/regex_extra.h5
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