switch Win32 building to modern PCRE versions (starting from 7.1)

instead of single old 4.4 version
This commit is contained in:
Igor Sysoev 2009-05-13 19:48:21 +00:00
parent 5147f8e9ca
commit ea8828b99e
8 changed files with 29 additions and 102 deletions

View File

@ -28,19 +28,15 @@ esac
case "$NGX_PLATFORM" in
win32)
cp auto/lib/pcre/patch.pcre.in $PCRE
cp auto/lib/pcre/patch.pcre.in.owc $PCRE
cp auto/lib/pcre/patch.config.in $PCRE
cp auto/lib/pcre/patch.pcre.c $PCRE
cat << END >> $NGX_MAKEFILE
`echo "$PCRE/pcre.h: $NGX_MAKEFILE" | sed -e "s/\//$ngx_regex_dirsep/g"`
\$(MAKE) -f auto/lib/pcre/$ngx_makefile $ngx_pcre pcre.h
`echo "$PCRE/pcre.lib: $PCRE/pcre.h" | sed -e "s/\//$ngx_regex_dirsep/g"`
`echo "$PCRE/pcre.lib: $NGX_MAKEFILE" | sed -e "s/\//$ngx_regex_dirsep/g"`
\$(MAKE) -f auto/lib/pcre/$ngx_makefile $ngx_pcre $ngx_opt
`echo "$PCRE/pcre.h:" | sed -e "s/\//$ngx_regex_dirsep/g"`
\$(MAKE) -f auto/lib/pcre/$ngx_makefile $ngx_pcre pcre.h
END
;;
@ -56,7 +52,6 @@ $PCRE/Makefile: $NGX_MAKEFILE
&& CC="\$(CC)" CFLAGS="$PCRE_OPT" \\
./configure --disable-shared
$PCRE/.libs/libpcre.a: $PCRE/Makefile
cd $PCRE \\
&& \$(MAKE) libpcre.la

View File

@ -3,22 +3,23 @@
CFLAGS = -q -O2 -tWM -w-8004 $(CPU_OPT)
PCREFLAGS = -DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10
PCREFLAGS = -DHAVE_CONFIG_H -DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10
pcre.lib:
cd $(PCRE)
bcc32 -q -edftables dftables.c
bcc32 -c $(CFLAGS) -I. $(PCREFLAGS) pcre_*.c
dftables > chartables.c
> pcre.lst
for %n in (*.obj) do @echo +%n & >> pcre.lst
echo + >> pcre.lst
bcc32 -c $(CFLAGS) $(PCREFLAGS) maketables.c get.c study.c pcre.c
tlib pcre.lib +maketables.obj +get.obj +study.obj +pcre.obj
tlib pcre.lib @pcre.lst
pcre.h:
cd $(PCRE)
patch -o pcre.h pcre.in patch.pcre.in
patch -o config.h config.in patch.config.in
patch < patch.pcre.c
copy /y pcre.h.generic pcre.h
copy /y config.h.generic config.h
copy /y pcre_chartables.c.dist pcre_chartables.c

View File

@ -3,24 +3,19 @@
CFLAGS = -O2 -Ob1 -Oi -Gs $(LIBC) $(CPU_OPT)
PCREFLAGS = -DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10
PCREFLAGS = -DHAVE_CONFIG_H -DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10
pcre.lib:
cd $(PCRE)
cl -Fedftables dftables.c
cl -nologo -c $(CFLAGS) -I . $(PCREFLAGS) pcre_*.c
dftables > chartables.c
cl -nologo -c $(CFLAGS) $(PCREFLAGS) \
maketables.c get.c study.c pcre.c
link -lib -out:pcre.lib -verbose:lib \
maketables.obj get.obj study.obj pcre.obj
link -lib -out:pcre.lib -verbose:lib pcre_*.obj
pcre.h:
cd $(PCRE)
patch -o pcre.h pcre.in patch.pcre.in
patch -o config.h config.in patch.config.in
patch < patch.pcre.c
copy /y pcre.h.generic pcre.h
copy /y config.h.generic config.h
copy /y pcre_chartables.c.dist pcre_chartables.c

View File

@ -3,20 +3,21 @@
CFLAGS = -c -zq -bt=nt -ot -op -oi -oe -s -bm $(CPU_OPT)
PCREFLAGS = -DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10
PCREFLAGS = -DHAVE_CONFIG_H -DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10
pcre.lib:
cd $(PCRE)
wcl386 -zq -bt=nt -l=nt -fe=dftables dftables.c
dftables > chartables.c
wcl386 $(CFLAGS) -i=. $(PCREFLAGS) pcre_*.c
wcl386 $(CFLAGS) $(PCREFLAGS) maketables.c get.c study.c pcre.c
wlib -n pcre.lib maketables.obj get.obj study.obj pcre.obj
dir /b *.obj > pcre.lst
wlib -n pcre.lib @pcre.lst
pcre.h:
cd $(PCRE)
patch -o pcre.h pcre.in patch.pcre.in.owc
patch -o config.h config.in patch.config.in
copy /y pcre.h.generic pcre.h
copy /y config.h.generic config.h
copy /y pcre_chartables.c.dist pcre_chartables.c

View File

@ -1,11 +0,0 @@
--- config.in Thu Aug 21 14:43:07 2003
+++ config.in Sun Mar 7 02:37:24 2004
@@ -28,7 +28,7 @@
found. */
#define HAVE_STRERROR 0
-#define HAVE_MEMMOVE 0
+#define HAVE_MEMMOVE 1
/* There are some non-Unix systems that don't even have bcopy(). If this macro
is false, an emulation is used. If HAVE_MEMMOVE is set to 1, the value of

View File

@ -1,13 +0,0 @@
--- pcre.c Thu Aug 21 14:43:07 2003
+++ pcre.c Tue Mar 22 12:56:59 2005
@@ -246,8 +246,8 @@
extern "C" void (*pcre_free)(void *) = free;
extern "C" int (*pcre_callout)(pcre_callout_block *) = NULL;
#else
-void *(*pcre_malloc)(size_t) = malloc;
-void (*pcre_free)(void *) = free;
+void *(__cdecl *pcre_malloc)(size_t) = malloc;
+void (__cdecl *pcre_free)(void *) = free;
int (*pcre_callout)(pcre_callout_block *) = NULL;
#endif
#endif

View File

@ -1,26 +0,0 @@
--- pcre.in Thu Aug 21 14:43:07 2003
+++ pcre.h Tue Mar 22 12:56:59 2005
@@ -10,9 +10,9 @@
/* The file pcre.h is build by "configure". Do not edit it; instead
make changes to pcre.in. */
-#define PCRE_MAJOR @PCRE_MAJOR@
-#define PCRE_MINOR @PCRE_MINOR@
-#define PCRE_DATE @PCRE_DATE@
+#define PCRE_MAJOR 4
+#define PCRE_MINOR 4
+#define PCRE_DATE 21-August-2003
/* Win32 uses DLL by default */
@@ -143,8 +143,8 @@
have to be different again. */
#ifndef VPCOMPAT
-PCRE_DATA_SCOPE void *(*pcre_malloc)(size_t);
-PCRE_DATA_SCOPE void (*pcre_free)(void *);
+PCRE_DATA_SCOPE void *(__cdecl *pcre_malloc)(size_t);
+PCRE_DATA_SCOPE void (__cdecl *pcre_free)(void *);
PCRE_DATA_SCOPE int (*pcre_callout)(pcre_callout_block *);
#else /* VPCOMPAT */
extern void *pcre_malloc(size_t);

View File

@ -1,15 +0,0 @@
--- pcre.in Thu Aug 21 14:43:07 2003
+++ pcre.h Tue Mar 22 12:56:59 2005
@@ -10,9 +10,9 @@
/* The file pcre.h is build by "configure". Do not edit it; instead
make changes to pcre.in. */
-#define PCRE_MAJOR @PCRE_MAJOR@
-#define PCRE_MINOR @PCRE_MINOR@
-#define PCRE_DATE @PCRE_DATE@
+#define PCRE_MAJOR 4
+#define PCRE_MINOR 4
+#define PCRE_DATE 21-August-2003
/* Win32 uses DLL by default */