Browse Source

Support PCRE under Win32

experimental/newoperator
Zeev Suraski 27 years ago
parent
commit
5baaa716dc
  1. 7
      ext/pcre/php_pcre.c
  2. 2
      main/config.w32.h
  3. 4
      main/internal_functions_win32.c
  4. 52
      php4dll.dsp
  5. 48
      php4dllts.dsp

7
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];

2
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

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

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

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

Loading…
Cancel
Save