diff options
author | nigel <nigel@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2007-02-24 21:41:27 +0000 |
---|---|---|
committer | nigel <nigel@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2007-02-24 21:41:27 +0000 |
commit | 5deecd6a48a3c346b7677003c35e323a31129740 (patch) | |
tree | 09578c32591ec5b21be748315cef1c978de2a3c5 | |
parent | ced1f145fdf26ec7df4b9048a9da0ef17e9618f2 (diff) | |
download | pcre-5deecd6a48a3c346b7677003c35e323a31129740.tar.gz |
Load pcre-6.6 into code/trunk.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@89 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | Makefile.in | 56 | ||||
-rwxr-xr-x | configure | 56 | ||||
-rw-r--r-- | configure.ac | 7 | ||||
-rw-r--r-- | pcre.h | 9 | ||||
-rw-r--r-- | pcregrep.c | 87 | ||||
-rw-r--r-- | pcreposix.h | 27 |
7 files changed, 191 insertions, 64 deletions
@@ -1,6 +1,19 @@ ChangeLog for PCRE ------------------ +Version 6.6 06-Feb-06 +--------------------- + + 1. Change 16(a) for 6.5 broke things, because PCRE_DATA_SCOPE was not defined + in pcreposix.h. I have copied the definition from pcre.h. + + 2. Change 25 for 6.5 broke compilation in a build directory out-of-tree + because pcre.h is no longer a built file. + + 3. Added Jeff Friedl's additional debugging patches to pcregrep. These are + not normally included in the compiled code. + + Version 6.5 01-Feb-06 --------------------- diff --git a/Makefile.in b/Makefile.in index babec2b..854b879 100644 --- a/Makefile.in +++ b/Makefile.in @@ -229,113 +229,113 @@ libpcrecpp.la: libpcre.la $(CPPOBJ) pcre_chartables.@OBJEXT@: pcre_chartables.c @$(LTCOMPILE) pcre_chartables.c -pcre_compile.@OBJEXT@: Makefile config.h pcre.h \ +pcre_compile.@OBJEXT@: Makefile config.h $(top_srcdir)/pcre.h \ $(top_srcdir)/pcre_internal.h $(top_srcdir)/pcre_compile.c \ $(top_srcdir)/pcre_printint.src @$(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \ $(top_srcdir)/pcre_compile.c -pcre_config.@OBJEXT@: Makefile config.h pcre.h \ +pcre_config.@OBJEXT@: Makefile config.h $(top_srcdir)/pcre.h \ $(top_srcdir)/pcre_internal.h $(top_srcdir)/pcre_config.c @$(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \ $(top_srcdir)/pcre_config.c -pcre_dfa_exec.@OBJEXT@: Makefile config.h pcre.h \ +pcre_dfa_exec.@OBJEXT@: Makefile config.h $(top_srcdir)/pcre.h \ $(top_srcdir)/pcre_internal.h $(top_srcdir)/pcre_dfa_exec.c @$(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \ $(top_srcdir)/pcre_dfa_exec.c -pcre_exec.@OBJEXT@: Makefile config.h pcre.h \ +pcre_exec.@OBJEXT@: Makefile config.h $(top_srcdir)/pcre.h \ $(top_srcdir)/pcre_internal.h $(top_srcdir)/pcre_exec.c @$(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \ $(top_srcdir)/pcre_exec.c -pcre_fullinfo.@OBJEXT@: Makefile config.h pcre.h \ +pcre_fullinfo.@OBJEXT@: Makefile config.h $(top_srcdir)/pcre.h \ $(top_srcdir)/pcre_internal.h $(top_srcdir)/pcre_fullinfo.c @$(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \ $(top_srcdir)/pcre_fullinfo.c -pcre_get.@OBJEXT@: Makefile config.h pcre.h \ +pcre_get.@OBJEXT@: Makefile config.h $(top_srcdir)/pcre.h \ $(top_srcdir)/pcre_internal.h $(top_srcdir)/pcre_get.c @$(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \ $(top_srcdir)/pcre_get.c -pcre_globals.@OBJEXT@: Makefile config.h pcre.h \ +pcre_globals.@OBJEXT@: Makefile config.h $(top_srcdir)/pcre.h \ $(top_srcdir)/pcre_internal.h $(top_srcdir)/pcre_globals.c @$(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \ $(top_srcdir)/pcre_globals.c -pcre_info.@OBJEXT@: Makefile config.h pcre.h \ +pcre_info.@OBJEXT@: Makefile config.h $(top_srcdir)/pcre.h \ $(top_srcdir)/pcre_internal.h $(top_srcdir)/pcre_info.c @$(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \ $(top_srcdir)/pcre_info.c -pcre_maketables.@OBJEXT@: Makefile config.h pcre.h \ +pcre_maketables.@OBJEXT@: Makefile config.h $(top_srcdir)/pcre.h \ $(top_srcdir)/pcre_internal.h $(top_srcdir)/pcre_maketables.c @$(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \ $(top_srcdir)/pcre_maketables.c -pcre_ord2utf8.@OBJEXT@: Makefile config.h pcre.h \ +pcre_ord2utf8.@OBJEXT@: Makefile config.h $(top_srcdir)/pcre.h \ $(top_srcdir)/pcre_internal.h $(top_srcdir)/pcre_ord2utf8.c @$(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \ $(top_srcdir)/pcre_ord2utf8.c -pcre_refcount.@OBJEXT@: Makefile config.h pcre.h \ +pcre_refcount.@OBJEXT@: Makefile config.h $(top_srcdir)/pcre.h \ $(top_srcdir)/pcre_internal.h $(top_srcdir)/pcre_refcount.c @$(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \ $(top_srcdir)/pcre_refcount.c -pcre_study.@OBJEXT@: Makefile config.h pcre.h \ +pcre_study.@OBJEXT@: Makefile config.h $(top_srcdir)/pcre.h \ $(top_srcdir)/pcre_internal.h $(top_srcdir)/pcre_study.c @$(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \ $(top_srcdir)/pcre_study.c -pcre_tables.@OBJEXT@: Makefile config.h pcre.h \ +pcre_tables.@OBJEXT@: Makefile config.h $(top_srcdir)/pcre.h \ $(top_srcdir)/pcre_internal.h $(top_srcdir)/pcre_tables.c @$(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \ $(top_srcdir)/pcre_tables.c -pcre_try_flipped.@OBJEXT@: Makefile config.h pcre.h \ +pcre_try_flipped.@OBJEXT@: Makefile config.h $(top_srcdir)/pcre.h \ $(top_srcdir)/pcre_internal.h $(top_srcdir)/pcre_try_flipped.c @$(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \ $(top_srcdir)/pcre_try_flipped.c -pcre_ucp_searchfuncs.@OBJEXT@: Makefile config.h pcre.h \ +pcre_ucp_searchfuncs.@OBJEXT@: Makefile config.h $(top_srcdir)/pcre.h \ $(top_srcdir)/pcre_internal.h \ $(top_srcdir)/pcre_ucp_searchfuncs.c \ $(top_srcdir)/ucptable.c @$(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \ $(top_srcdir)/pcre_ucp_searchfuncs.c -pcre_valid_utf8.@OBJEXT@: Makefile config.h pcre.h \ +pcre_valid_utf8.@OBJEXT@: Makefile config.h $(top_srcdir)/pcre.h \ $(top_srcdir)/pcre_internal.h $(top_srcdir)/pcre_valid_utf8.c @$(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \ $(top_srcdir)/pcre_valid_utf8.c -pcre_version.@OBJEXT@: Makefile config.h pcre.h \ +pcre_version.@OBJEXT@: Makefile config.h $(top_srcdir)/pcre.h \ $(top_srcdir)/pcre_internal.h $(top_srcdir)/pcre_version.c @$(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \ $(top_srcdir)/pcre_version.c -pcre_xclass.@OBJEXT@: Makefile config.h pcre.h \ +pcre_xclass.@OBJEXT@: Makefile config.h $(top_srcdir)/pcre.h \ $(top_srcdir)/pcre_internal.h $(top_srcdir)/pcre_xclass.c @$(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \ $(top_srcdir)/pcre_xclass.c pcreposix.@OBJEXT@: $(top_srcdir)/pcreposix.c $(top_srcdir)/pcreposix.h \ - $(top_srcdir)/pcre_internal.h pcre.h config.h Makefile + $(top_srcdir)/pcre_internal.h $(top_srcdir)/pcre.h config.h Makefile @$(LTCOMPILE) $(POSIX_MALLOC_THRESHOLD) \ $(top_srcdir)/pcreposix.c pcrecpp.@OBJEXT@: $(top_srcdir)/pcrecpp.cc $(top_srcdir)/pcrecpp.h \ - pcrecpparg.h pcre_stringpiece.h pcre.h config.h Makefile + pcrecpparg.h pcre_stringpiece.h $(top_srcdir)/pcre.h config.h Makefile @$(LTCXXCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \ $(top_srcdir)/pcrecpp.cc pcre_scanner.@OBJEXT@: $(top_srcdir)/pcre_scanner.cc \ $(top_srcdir)/pcre_scanner.h \ $(top_srcdir)/pcrecpp.h pcrecpparg.h pcre_stringpiece.h \ - pcre.h config.h Makefile + $(top_srcdir)/pcre.h config.h Makefile @$(LTCXXCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) \ $(top_srcdir)/pcre_scanner.cc @@ -346,13 +346,13 @@ pcre_stringpiece.@OBJEXT@: $(top_srcdir)/pcre_stringpiece.cc \ $(top_srcdir)/pcre_stringpiece.cc pcretest.@OBJEXT@: $(top_srcdir)/pcretest.c $(top_srcdir)/pcre_internal.h \ - $(top_srcdir)/pcre_printint.src pcre.h config.h Makefile + $(top_srcdir)/pcre_printint.src $(top_srcdir)/pcre.h config.h Makefile $(CC) -c $(CFLAGS) -I. -I$(top_srcdir) $(UTF8) $(UCP) \ $(LINK_SIZE) $(top_srcdir)/pcretest.c pcrecpp_unittest.@OBJEXT@: $(top_srcdir)/pcrecpp_unittest.cc \ $(top_srcdir)/pcrecpp.h \ - pcrecpparg.h pcre_stringpiece.h pcre.h config.h Makefile + pcrecpparg.h pcre_stringpiece.h $(top_srcdir)/pcre.h config.h Makefile $(CXX) -c $(CXXFLAGS) -I. -I$(top_srcdir) $(UTF8) $(UCP) \ $(LINK_SIZE) $(top_srcdir)/pcrecpp_unittest.cc @@ -364,11 +364,11 @@ pcre_stringpiece_unittest.@OBJEXT@: $(top_srcdir)/pcre_stringpiece_unittest.cc \ pcre_scanner_unittest.@OBJEXT@: $(top_srcdir)/pcre_scanner_unittest.cc \ $(top_srcdir)/pcre_scanner.h \ $(top_srcdir)/pcrecpp.h pcre_stringpiece.h \ - pcre.h pcrecpparg.h config.h Makefile + $(top_srcdir)/pcre.h pcrecpparg.h config.h Makefile $(CXX) -c $(CXXFLAGS) -I. -I$(top_srcdir) $(UTF8) $(UCP) \ $(LINK_SIZE) $(top_srcdir)/pcre_scanner_unittest.cc -pcregrep.@OBJEXT@: $(top_srcdir)/pcregrep.c pcre.h Makefile config.h +pcregrep.@OBJEXT@: $(top_srcdir)/pcregrep.c $(top_srcdir)/pcre.h Makefile config.h $(CC) -c $(CFLAGS) -I. -I$(top_srcdir) $(UTF8) $(UCP) \ $(PCREGREP_OSTYPE) $(top_srcdir)/pcregrep.c @@ -450,7 +450,7 @@ pcre_chartables.c: dftables@BUILD_EXEEXT@ dftables.@BUILD_OBJEXT@: $(top_srcdir)/dftables.c \ $(top_srcdir)/pcre_maketables.c $(top_srcdir)/pcre_internal.h \ - pcre.h config.h Makefile + $(top_srcdir)/pcre.h config.h Makefile $(CC_FOR_BUILD) -c $(CFLAGS_FOR_BUILD) -I. $(top_srcdir)/dftables.c dftables@BUILD_EXEEXT@: dftables.@BUILD_OBJEXT@ @@ -466,7 +466,7 @@ install: all @ON_WINDOWS@ wininstall @NOT_ON_WINDOWS@@HAVE_CPP@ $(LIBTOOL) --mode=install $(INSTALL) libpcrecpp.la $(DESTDIR)$(LIBDIR)/libpcrecpp.la @NOT_ON_WINDOWS@ $(LIBTOOL) --finish $(DESTDIR)$(LIBDIR) $(mkinstalldirs) $(DESTDIR)$(INCDIR) - $(INSTALL_DATA) pcre.h $(DESTDIR)$(INCDIR)/pcre.h + $(INSTALL_DATA) $(top_srcdir)/pcre.h $(DESTDIR)$(INCDIR)/pcre.h $(INSTALL_DATA) $(top_srcdir)/pcreposix.h $(DESTDIR)$(INCDIR)/pcreposix.h @HAVE_CPP@ $(INSTALL_DATA) $(top_srcdir)/pcrecpp.h $(DESTDIR)$(INCDIR)/pcrecpp.h @HAVE_CPP@ $(INSTALL_DATA) pcrecpparg.h $(DESTDIR)$(INCDIR)/pcrecpparg.h @@ -576,7 +576,7 @@ clean:; -rm -rf *.@OBJEXT@ *.lo *.a *.la .libs pcretest@EXEEXT@ pcre_str distclean: clean -rm -f pcre_chartables.c libtool pcre-config libpcre.pc \ - pcre.h pcre_stringpiece.h pcrecpparg.h \ + pcre_stringpiece.h pcrecpparg.h \ dftables@EXEEXT@ RunGrepTest RunTest \ Makefile config.h config.status config.log config.cache @@ -426,6 +426,7 @@ PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="dftables.c" +ac_unique_file="pcre.h" # Factoring default headers for most tests. ac_includes_default="\ #include <stdio.h> @@ -1502,6 +1503,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + ac_config_headers="$ac_config_headers config.h" @@ -1514,9 +1516,9 @@ PCRE_POSIXLIB_VERSION=0:0:0 PCRE_CPPLIB_VERSION=0:0:0 -PCRE_MAJOR=`grep '#define PCRE_MAJOR' ./pcre.h | cut -c 29-` -PCRE_MINOR=`grep '#define PCRE_MINOR' ./pcre.h | cut -c 29-` -PCRE_PRERELEASE=`grep '#define PCRE_PRERELEASE' ./pcre.h | cut -c 29-` +PCRE_MAJOR=`grep '#define PCRE_MAJOR' ${srcdir}/pcre.h | cut -c 29-` +PCRE_MINOR=`grep '#define PCRE_MINOR' ${srcdir}/pcre.h | cut -c 29-` +PCRE_PRERELEASE=`grep '#define PCRE_PRERELEASE' ${srcdir}/pcre.h | cut -c 29-` PCRE_VERSION=${PCRE_MAJOR}.${PCRE_MINOR}${PCRE_PRERELEASE} @@ -3544,7 +3546,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 3547 "configure"' > conftest.$ac_ext + echo '#line 3549 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -4921,7 +4923,7 @@ fi # Provide some information about the compiler. -echo "$as_me:4924:" \ +echo "$as_me:4926:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 @@ -6045,11 +6047,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6048: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6050: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6052: \$? = $ac_status" >&5 + echo "$as_me:6054: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -6313,11 +6315,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6316: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6318: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6320: \$? = $ac_status" >&5 + echo "$as_me:6322: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -6417,11 +6419,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6420: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6422: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:6424: \$? = $ac_status" >&5 + echo "$as_me:6426: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8799,7 +8801,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 8802 "configure" +#line 8804 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -8899,7 +8901,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 8902 "configure" +#line 8904 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11239,11 +11241,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11242: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11244: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11246: \$? = $ac_status" >&5 + echo "$as_me:11248: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -11343,11 +11345,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11346: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11348: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:11350: \$? = $ac_status" >&5 + echo "$as_me:11352: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12950,11 +12952,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12953: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12955: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:12957: \$? = $ac_status" >&5 + echo "$as_me:12959: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -13054,11 +13056,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13057: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13059: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13061: \$? = $ac_status" >&5 + echo "$as_me:13063: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15294,11 +15296,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15297: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15299: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15301: \$? = $ac_status" >&5 + echo "$as_me:15303: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -15562,11 +15564,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15565: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15567: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15569: \$? = $ac_status" >&5 + echo "$as_me:15571: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -15666,11 +15668,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15669: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15671: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15673: \$? = $ac_status" >&5 + echo "$as_me:15675: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized diff --git a/configure.ac b/configure.ac index e71e9bf..b76bee1 100644 --- a/configure.ac +++ b/configure.ac @@ -10,6 +10,7 @@ dnl This is required at the start; the name is the name of a file dnl it should be seeing, to verify it is in the same directory. AC_INIT(dftables.c) +AC_CONFIG_SRCDIR([pcre.h]) dnl A safety precaution @@ -33,9 +34,9 @@ PCRE_CPPLIB_VERSION=0:0:0 dnl Find the PCRE version from the pcre.h file. The PCRE_VERSION variable is dnl substituted in pcre-config.in. -PCRE_MAJOR=`grep '#define PCRE_MAJOR' ./pcre.h | cut -c 29-` -PCRE_MINOR=`grep '#define PCRE_MINOR' ./pcre.h | cut -c 29-` -PCRE_PRERELEASE=`grep '#define PCRE_PRERELEASE' ./pcre.h | cut -c 29-` +PCRE_MAJOR=`grep '#define PCRE_MAJOR' ${srcdir}/pcre.h | cut -c 29-` +PCRE_MINOR=`grep '#define PCRE_MINOR' ${srcdir}/pcre.h | cut -c 29-` +PCRE_PRERELEASE=`grep '#define PCRE_PRERELEASE' ${srcdir}/pcre.h | cut -c 29-` PCRE_VERSION=${PCRE_MAJOR}.${PCRE_MINOR}${PCRE_PRERELEASE} dnl Handle --disable-cpp @@ -53,11 +53,12 @@ cannot run ./configure. As it now stands, this file need not be edited in that circumstance. */ #define PCRE_MAJOR 6 -#define PCRE_MINOR 5 +#define PCRE_MINOR 6 #define PCRE_PRERELEASE -#define PCRE_DATE 01-Feb-2006 +#define PCRE_DATE 06-Feb-2006 -/* Win32 uses DLL by default; it needs special stuff for exported functions. */ +/* Win32 uses DLL by default; it needs special stuff for exported functions +when building PCRE. */ #ifdef _WIN32 # ifdef PCRE_DEFINITION @@ -71,7 +72,7 @@ circumstance. */ # endif #endif -/* For other operating systems, we use the standard "extern". */ +/* Otherwise, we use the standard "extern". */ #ifndef PCRE_DATA_SCOPE # ifdef __cplusplus @@ -94,6 +94,10 @@ regular code. */ #ifdef JFRIEDL_DEBUG static int S_arg = -1; +static unsigned int jfriedl_XR = 0; /* repeat regex attempt this many times */ +static unsigned int jfriedl_XT = 0; /* replicate text this many times */ +static const char *jfriedl_prefix = ""; +static const char *jfriedl_postfix = ""; #endif static char *colour_string = (char *)"1;31"; @@ -565,6 +569,56 @@ while (ptr < endptr) while (t < endptr && *t++ != '\n') linelength++; length = multiline? endptr - ptr : linelength; + + /* Extra processing for Jeffrey Friedl's debugging. */ + +#ifdef JFRIEDL_DEBUG + if (jfriedl_XT || jfriedl_XR) + { + #include <sys/time.h> + #include <time.h> + struct timeval start_time, end_time; + struct timezone dummy; + + if (jfriedl_XT) + { + unsigned long newlen = length * jfriedl_XT + strlen(jfriedl_prefix) + strlen(jfriedl_postfix); + const char *orig = ptr; + ptr = malloc(newlen + 1); + if (!ptr) { + printf("out of memory"); + exit(2); + } + endptr = ptr; + strcpy(endptr, jfriedl_prefix); endptr += strlen(jfriedl_prefix); + for (i = 0; i < jfriedl_XT; i++) { + strncpy(endptr, orig, length); + endptr += length; + } + strcpy(endptr, jfriedl_postfix); endptr += strlen(jfriedl_postfix); + length = newlen; + } + + if (gettimeofday(&start_time, &dummy) != 0) + perror("bad gettimeofday"); + + + for (i = 0; i < jfriedl_XR; i++) + match = (pcre_exec(pattern_list[0], hints_list[0], ptr, length, 0, 0, offsets, 99) >= 0); + + if (gettimeofday(&end_time, &dummy) != 0) + perror("bad gettimeofday"); + + double delta = ((end_time.tv_sec + (end_time.tv_usec / 1000000.0)) + - + (start_time.tv_sec + (start_time.tv_usec / 1000000.0))); + + printf("%s TIMER[%.4f]\n", match ? "MATCH" : "FAIL", delta); + return 0; + } +#endif + + /* Run through all the patterns until one matches. Note that we don't include the final newline in the subject string. */ @@ -1294,6 +1348,30 @@ for (i = 1; i < argc; i++) } } + + /* Jeffrey Friedl's debugging harness uses these additional options which + are not in the right form for putting in the option table because they use + only one hyphen, yet are more than one character long. By putting them + separately here, they will not get displayed as part of the help() output, + but I don't think Jeffrey will care about that. */ + +#ifdef JFRIEDL_DEBUG + else if (strcmp(argv[i], "-pre") == 0) { + jfriedl_prefix = argv[++i]; + continue; + } else if (strcmp(argv[i], "-post") == 0) { + jfriedl_postfix = argv[++i]; + continue; + } else if (strcmp(argv[i], "-XT") == 0) { + sscanf(argv[++i], "%d", &jfriedl_XT); + continue; + } else if (strcmp(argv[i], "-XR") == 0) { + sscanf(argv[++i], "%d", &jfriedl_XR); + continue; + } +#endif + + /* One-char options; many that have no data may be in a single argument; we continue till we hit the last one or one that needs data. */ @@ -1333,7 +1411,7 @@ for (i = 1; i < argc; i++) /* If the option type is OP_OP_STRING or OP_OP_NUMBER, it's an option that either has a value or defaults to something. It cannot have data in a separate item. At the moment, the only such options are "colo(u)r" and - Jeffrey Friedl's special debugging option. */ + Jeffrey Friedl's special -S debugging option. */ if (*option_data == 0 && (op->type == OP_OP_STRING || op->type == OP_OP_NUMBER)) @@ -1490,7 +1568,7 @@ if (DEE_option != NULL) } } -/* Check the value for Jeff Friedl's debugging option. */ +/* Check the values for Jeffrey Friedl's debugging options. */ #ifdef JFRIEDL_DEBUG if (S_arg > 9) @@ -1498,6 +1576,11 @@ if (S_arg > 9) fprintf(stderr, "pcregrep: bad value for -S option\n"); return 2; } +if (jfriedl_XT != 0 || jfriedl_XR != 0) + { + if (jfriedl_XT == 0) jfriedl_XT = 1; + if (jfriedl_XR == 0) jfriedl_XR = 1; + } #endif /* Get memory to store the pattern and hints lists. */ diff --git a/pcreposix.h b/pcreposix.h index 525dc2f..31ee037 100644 --- a/pcreposix.h +++ b/pcreposix.h @@ -105,6 +105,33 @@ typedef struct { regoff_t rm_eo; } regmatch_t; +/* Win32 uses DLL by default; it needs special stuff for exported functions +when building PCRE. */ + +#ifndef PCRE_DATA_SCOPE +#ifdef _WIN32 +# ifdef PCRE_DEFINITION +# ifdef DLL_EXPORT +# define PCRE_DATA_SCOPE __declspec(dllexport) +# endif +# else +# ifndef PCRE_STATIC +# define PCRE_DATA_SCOPE extern __declspec(dllimport) +# endif +# endif +#endif +#endif + +/* Otherwise, we use the standard "extern". */ + +#ifndef PCRE_DATA_SCOPE +# ifdef __cplusplus +# define PCRE_DATA_SCOPE extern "C" +# else +# define PCRE_DATA_SCOPE extern +# endif +#endif + /* The functions */ PCRE_DATA_SCOPE int regcomp(regex_t *, const char *, int); |