diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 6a9ca26b90f..9b8830a42c7 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -30,6 +30,7 @@ /* $Id$ */ #include "php.h" +#include "php_globals.h" #if HAVE_PCRE @@ -119,8 +120,10 @@ void php_info_pcre(ZEND_MODULE_INFO_FUNC_ARGS) /* {{{ int php_minit_pcre(INIT_FUNC_ARGS) */ int php_minit_pcre(INIT_FUNC_ARGS) { + ELS_FETCH(); + #ifdef ZTS - pcre_globals_id = tsrm_allocate_id( + pcre_globals_id = ts_allocate_id( sizeof(php_pcre_globals), _php_pcre_init_globals, _php_pcre_shutdown_globals); @@ -459,7 +462,7 @@ static void _pcre_match(INTERNAL_FUNCTION_PARAMETERS, int global) } } - php_pcre_free(stringlist); + php_pcre_free((void *) stringlist); /* Advance to the position right after the last full match */ piece += offsets[1]; diff --git a/main/config.w32.h b/main/config.w32.h index d0c2ae7a29a..d4aee434808 100644 --- a/main/config.w32.h +++ b/main/config.w32.h @@ -174,6 +174,8 @@ #define REGEX 1 #define HSREGEX 1 +#define HAVE_PCRE 1 + /* Define if you have the gcvt function. */ #define HAVE_GCVT 1 diff --git a/main/internal_functions_win32.c b/main/internal_functions_win32.c index 9d2e36479fd..15aa1b5cdc1 100644 --- a/main/internal_functions_win32.c +++ b/main/internal_functions_win32.c @@ -57,6 +57,7 @@ #include "ext/standard/php3_standard.h" #include "ext/COM/php3_COM.h" #include "ext/standard/reg.h" +#include "ext/pcre/php_pcre.h" /* SNMP has to be moved to ext */ /* #include "dl/snmp/php3_snmp.h" */ @@ -81,7 +82,8 @@ zend_module_entry *php3_builtin_modules[] = { phpext_bcmath_ptr, phpext_standard_ptr, COM_module_ptr, - phpext_regex_ptr + phpext_regex_ptr, + phpext_pcre_ptr }; diff --git a/php4dll.dsp b/php4dll.dsp index 779c8042fa8..f52aded2791 100644 --- a/php4dll.dsp +++ b/php4dll.dsp @@ -347,10 +347,6 @@ SOURCE=.\ext\standard\microtime.c # End Source File # Begin Source File -SOURCE=.\ext\standard\mime.c -# End Source File -# Begin Source File - SOURCE=.\ext\bcmath\number.c # End Source File # Begin Source File @@ -367,6 +363,10 @@ SOURCE=.\ext\standard\pageinfo.c # End Source File # Begin Source File +SOURCE=.\ext\pcre\php_pcre.c +# End Source File +# Begin Source File + SOURCE=.\ext\standard\post.c # End Source File # Begin Source File @@ -511,6 +511,10 @@ SOURCE=.\functions\php3_syslog.h # End Source File # Begin Source File +SOURCE=.\ext\pcre\php_pcre.h +# End Source File +# Begin Source File + SOURCE=.\functions\phpdir.h # End Source File # Begin Source File @@ -558,6 +562,46 @@ SOURCE=.\regex\regexec.c SOURCE=.\regex\regfree.c # End Source File # End Group +# Begin Group "PCRE" + +# PROP Default_Filter "" +# Begin Group "Source Files No. 3" + +# PROP Default_Filter ".c" +# Begin Source File + +SOURCE=.\ext\pcre\pcrelib\chartables.c +# End Source File +# Begin Source File + +SOURCE=.\ext\pcre\pcrelib\get.c +# End Source File +# Begin Source File + +SOURCE=.\ext\pcre\pcrelib\maketables.c +# End Source File +# Begin Source File + +SOURCE=.\ext\pcre\pcrelib\pcre.c +# End Source File +# Begin Source File + +SOURCE=.\ext\pcre\pcrelib\study.c +# End Source File +# End Group +# Begin Group "Header Files No. 3" + +# PROP Default_Filter ".h" +# Begin Source File + +SOURCE=.\ext\pcre\pcrelib\internal.h +# End Source File +# Begin Source File + +SOURCE=.\ext\pcre\pcrelib\pcre.h +# End Source File +# End Group +# End Group # End Group # Begin Group "Win32" diff --git a/php4dllts.dsp b/php4dllts.dsp index 19a8059dec5..9b6a77a907b 100644 --- a/php4dllts.dsp +++ b/php4dllts.dsp @@ -371,6 +371,10 @@ SOURCE=.\ext\standard\pageinfo.c # End Source File # Begin Source File +SOURCE=.\ext\pcre\php_pcre.c +# End Source File +# Begin Source File + SOURCE=.\ext\standard\post.c # End Source File # Begin Source File @@ -515,6 +519,10 @@ SOURCE=.\functions\php3_syslog.h # End Source File # Begin Source File +SOURCE=.\ext\pcre\php_pcre.h +# End Source File +# Begin Source File + SOURCE=.\ext\session\php_session.h # End Source File # Begin Source File @@ -566,6 +574,46 @@ SOURCE=.\regex\regexec.c SOURCE=.\regex\regfree.c # End Source File # End Group +# Begin Group "PCRE" + +# PROP Default_Filter "" +# Begin Group "Source Files No. 3" + +# PROP Default_Filter ".c" +# Begin Source File + +SOURCE=.\ext\pcre\pcrelib\chartables.c +# End Source File +# Begin Source File + +SOURCE=.\ext\pcre\pcrelib\get.c +# End Source File +# Begin Source File + +SOURCE=.\ext\pcre\pcrelib\maketables.c +# End Source File +# Begin Source File + +SOURCE=.\ext\pcre\pcrelib\pcre.c +# End Source File +# Begin Source File + +SOURCE=.\ext\pcre\pcrelib\study.c +# End Source File +# End Group +# Begin Group "Header Files No. 3" + +# PROP Default_Filter ".h" +# Begin Source File + +SOURCE=.\ext\pcre\pcrelib\internal.h +# End Source File +# Begin Source File + +SOURCE=.\ext\pcre\pcrelib\pcre.h +# End Source File +# End Group +# End Group # End Group # Begin Group "Win32"