Browse Source

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.
experimetnal/RETURN_REF_PATCH
Rasmus Lerdorf 26 years ago
parent
commit
cf0868fec8
  1. 1
      ext/ereg/ereg.c
  2. 10
      ext/ereg/php_regex.h
  3. 1
      ext/standard/browscap.c
  4. 1
      ext/standard/reg.c
  5. 1
      ext/standard/url.c
  6. 1
      main/php.h
  7. 10
      main/php_regex.h
  8. 5
      sapi/apache/mod_php4.c
  9. 3
      sapi/apache/sapi_apache.c

1
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 };

10
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

1
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"

1
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 };

1
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

1
main/php.h

@ -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

10
main/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

5
sapi/apache/mod_php4.c

@ -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"

3
sapi/apache/sapi_apache.c

@ -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"

Loading…
Cancel
Save