]> granicus.if.org Git - php/commitdiff
Clean up regex header file mess. php.h now explicitly includes php_regex.h
authorRasmus Lerdorf <rasmus@php.net>
Sat, 30 Oct 1999 14:22:10 +0000 (14:22 +0000)
committerRasmus Lerdorf <rasmus@php.net>
Sat, 30 Oct 1999 14:22:10 +0000 (14:22 +0000)
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.

ext/ereg/ereg.c
ext/ereg/php_regex.h
ext/standard/browscap.c
ext/standard/reg.c
ext/standard/url.c
main/php.h
main/php_regex.h
sapi/apache/mod_php4.c
sapi/apache/sapi_apache.c

index c9f84ed9732bccc138712f7b8bad22effb909f71..7f50ce317028bae1cd30c944701fa7e78850398b 100644 (file)
@@ -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 };
index ff7b5cfcb1cacc326ee15c52d27d6f92dd0c5b83..427604b41787b22043ea61d1c715010ae6300bad 100644 (file)
@@ -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
index e9ba30f5309b67b353e10fc65aff8864276fa1ed..34c8630c4a14ad6bbf01d19e01d8c6d7bae359e2 100644 (file)
@@ -19,7 +19,6 @@
 #include "php.h"
 #include "php3_browscap.h"
 #include "php_ini.h"
-#include "php_regex.h"
 
 #include "zend_globals.h"
 
index c9f84ed9732bccc138712f7b8bad22effb909f71..7f50ce317028bae1cd30c944701fa7e78850398b 100644 (file)
@@ -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 };
index 612af418b870e8436c73b6b0a7c2d35ca97dff34..315e088065c21a5a4e116f58fddfc7f9e9c5b940 100644 (file)
@@ -23,7 +23,6 @@
 #include <sys/types.h>
 
 #include "php.h"
-#include "php_regex.h"
 
 #include "url.h"
 #ifdef _OSD_POSIX
index 98f1dfacb647dc2dccc1f621d3f007d66c3d20ed..104983efb4a08c65cee2468dfd77d4e5826ebeed 100644 (file)
@@ -73,6 +73,7 @@ extern unsigned char second_arg_allow_ref[];
 #define THREAD_LS
 #endif
 
+#include "php_regex.h"
 
 /* PHP's DEBUG value must match Zend's ZEND_DEBUG value */
 #undef DEBUG
index ff7b5cfcb1cacc326ee15c52d27d6f92dd0c5b83..427604b41787b22043ea61d1c715010ae6300bad 100644 (file)
@@ -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
index aff778db0bc839c1930b86964faff8a8b94ff1f3..5d693a39829289a1f213d56ca03d320a3b39df4b 100644 (file)
@@ -19,6 +19,9 @@
  */
 /* $Id$ */
 
+#include "zend.h"
+#include "php.h"
+
 #include "httpd.h"
 #include "http_config.h"
 #if MODULE_MAGIC_NUMBER > 19980712
@@ -34,8 +37,6 @@
 #include "http_request.h"
 #include "http_log.h"
 
-#include "zend.h"
-#include "php.h"
 #include "php_ini.h"
 #include "php_globals.h"
 #include "SAPI.h"
index 0e8b8029af57641a10f0cd57fe2124c963f468a5..3676b2d13a58173e65709467b11472e8ac127f2a 100644 (file)
@@ -21,6 +21,8 @@
  */
 /* $Id$ */
 
+#include "php.h"
+
 #include "httpd.h"
 #include "http_config.h"
 #if MODULE_MAGIC_NUMBER > 19980712
@@ -37,7 +39,6 @@
 #include "http_log.h"
 
 #include "zend.h"
-#include "php.h"
 #include "php_ini.h"
 #include "php_globals.h"
 #include "SAPI.h"