summaryrefslogtreecommitdiff
path: root/ext/ereg
diff options
context:
space:
mode:
authorRasmus Lerdorf <rasmus@php.net>1999-10-30 14:22:10 +0000
committerRasmus Lerdorf <rasmus@php.net>1999-10-30 14:22:10 +0000
commitcf0868fec89a1fcac53ff8421f9cf0d9345310c5 (patch)
treeb6960232979da1ea74d39eefe06b13f8f4823069 /ext/ereg
parentbbb1a4f8eb5ba01ea783845182edf17a1711150d (diff)
downloadphp-git-cf0868fec89a1fcac53ff8421f9cf0d9345310c5.tar.gz
Clean up regex header file mess. php.h now explicitly includes php_regex.h
and php_regex.h figures out which regex header files to include and defines symbols that prevents other stuff from including the wrong versions of regex header files.
Diffstat (limited to 'ext/ereg')
-rw-r--r--ext/ereg/ereg.c1
-rw-r--r--ext/ereg/php_regex.h10
2 files changed, 10 insertions, 1 deletions
diff --git a/ext/ereg/ereg.c b/ext/ereg/ereg.c
index c9f84ed973..7f50ce3170 100644
--- a/ext/ereg/ereg.c
+++ b/ext/ereg/ereg.c
@@ -22,7 +22,6 @@
#include <stdio.h>
#include "php.h"
#include "php3_string.h"
-#include "php_regex.h"
#include "reg.h"
unsigned char third_argument_force_ref[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE };
diff --git a/ext/ereg/php_regex.h b/ext/ereg/php_regex.h
index ff7b5cfcb1..427604b417 100644
--- a/ext/ereg/php_regex.h
+++ b/ext/ereg/php_regex.h
@@ -3,11 +3,21 @@
#if REGEX
#include "regex/regex.h"
+#ifndef REGEX_H
#define _REGEX_H 1 /* this should stop Apache from loading the system version of regex.h */
+#endif
+#ifndef REGEX_H_
#define _REGEX_H_ 1
+#endif
+#ifndef RX_H
#define _RX_H 1 /* Try defining these for Linux to */
+#endif
+#ifndef REGEXP_LIBRARY_H
#define __REGEXP_LIBRARY_H__ 1 /* avoid Apache including regex.h */
+#endif
+#ifndef H_REGEX
#define _H_REGEX 1 /* This one is for AIX */
+#endif
#else
#include <regex.h>
#endif