summaryrefslogtreecommitdiff
path: root/ext
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
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')
-rw-r--r--ext/ereg/ereg.c1
-rw-r--r--ext/ereg/php_regex.h10
-rw-r--r--ext/standard/browscap.c1
-rw-r--r--ext/standard/reg.c1
-rw-r--r--ext/standard/url.c1
5 files changed, 10 insertions, 4 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
diff --git a/ext/standard/browscap.c b/ext/standard/browscap.c
index e9ba30f530..34c8630c4a 100644
--- a/ext/standard/browscap.c
+++ b/ext/standard/browscap.c
@@ -19,7 +19,6 @@
#include "php.h"
#include "php3_browscap.h"
#include "php_ini.h"
-#include "php_regex.h"
#include "zend_globals.h"
diff --git a/ext/standard/reg.c b/ext/standard/reg.c
index c9f84ed973..7f50ce3170 100644
--- a/ext/standard/reg.c
+++ b/ext/standard/reg.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/standard/url.c b/ext/standard/url.c
index 612af418b8..315e088065 100644
--- a/ext/standard/url.c
+++ b/ext/standard/url.c
@@ -23,7 +23,6 @@
#include <sys/types.h>
#include "php.h"
-#include "php_regex.h"
#include "url.h"
#ifdef _OSD_POSIX