summaryrefslogtreecommitdiff
path: root/ext/pcre/pcrelib/NON-UNIX-USE
diff options
context:
space:
mode:
authorAndrei Zmievski <andrei@php.net>2002-10-15 13:59:58 +0000
committerAndrei Zmievski <andrei@php.net>2002-10-15 13:59:58 +0000
commitc65c18269302de59e7b657bce2e30b2726935d73 (patch)
tree168fe26908b277d60d539ca10474e43a5c47b242 /ext/pcre/pcrelib/NON-UNIX-USE
parentb4348434be0c5e94cc09ba342660c81e0fc416bb (diff)
downloadphp-git-c65c18269302de59e7b657bce2e30b2726935d73.tar.gz
Upgrade to version 3.92.
Diffstat (limited to 'ext/pcre/pcrelib/NON-UNIX-USE')
-rw-r--r--ext/pcre/pcrelib/NON-UNIX-USE42
1 files changed, 39 insertions, 3 deletions
diff --git a/ext/pcre/pcrelib/NON-UNIX-USE b/ext/pcre/pcrelib/NON-UNIX-USE
index 14b1cc0d05..8cbad88819 100644
--- a/ext/pcre/pcrelib/NON-UNIX-USE
+++ b/ext/pcre/pcrelib/NON-UNIX-USE
@@ -41,13 +41,49 @@ Makefile.in to create Makefile, substituting suitable values for the variables
at the head of the file.
Some help in building a Win32 DLL of PCRE in GnuWin32 environments was
-contributed by Paul.Sokolovsky@technologist.com. These environments are
-Mingw32 (http://www.xraylith.wisc.edu/~khan/software/gnu-win32/) and
-CygWin (http://sourceware.cygnus.com/cygwin/). Paul comments:
+contributed by Paul Sokolovsky. These environments are Mingw32
+(http://www.xraylith.wisc.edu/~khan/software/gnu-win32/) and CygWin
+(http://sourceware.cygnus.com/cygwin/). Paul comments:
For CygWin, set CFLAGS=-mno-cygwin, and do 'make dll'. You'll get
pcre.dll (containing pcreposix also), libpcre.dll.a, and dynamically
linked pgrep and pcretest. If you have /bin/sh, run RunTest (three
main test go ok, locale not supported).
+A script for building PCRE using Borland's C++ compiler for use with VPASCAL
+was contributed by Alexander Tokarev. It is called makevp.bat.
+
+These are some further comments about Win32 builds from Mark Evans:
+
+The documentation for Win32 builds is a bit shy. Under MSVC6 I
+followed their instructions to the letter, but there were still
+some things missing.
+
+(1) Must #define STATIC for entire project if linking statically.
+ (I see no reason to use DLLs for code this compact.) This of
+ course is a project setting in MSVC under Preprocessor.
+
+(2) Missing some #ifdefs relating to the function pointers
+ pcre_malloc and pcre_free. See my solution below. (The stubs
+ may not be mandatory but they made me feel better.)
+
+=========================
+#ifdef _WIN32
+#include <malloc.h>
+
+void* malloc_stub(size_t N)
+{ return malloc(N); }
+void free_stub(void* p)
+{ free(p); }
+void *(*pcre_malloc)(size_t) = &malloc_stub;
+void (*pcre_free)(void *) = &free_stub;
+
+#else
+
+void *(*pcre_malloc)(size_t) = malloc;
+void (*pcre_free)(void *) = free;
+
+#endif
+=========================
+
****