diff options
author | wiz <wiz> | 2006-02-04 17:13:49 +0000 |
---|---|---|
committer | wiz <wiz> | 2006-02-04 17:13:49 +0000 |
commit | 2d68c6acf10f568fcdaab671daee2a05ada35d74 (patch) | |
tree | 0a1448e00c71e9b07ed24457adf0c77edfdee91f /devel/pcre | |
parent | 7a650958c5e7c5bc55b396ce2c6b48197473725e (diff) | |
download | pkgsrc-2d68c6acf10f568fcdaab671daee2a05ada35d74.tar.gz |
Update to 6.5:
Version 6.5 01-Feb-06
---------------------
1. When using the partial match feature with pcre_dfa_exec(), it was not
anchoring the second and subsequent partial matches at the new starting
point. This could lead to incorrect results. For example, with the pattern
/1234/, partially matching against "123" and then "a4" gave a match.
2. Changes to pcregrep:
(a) All non-match returns from pcre_exec() were being treated as failures
to match the line. Now, unless the error is PCRE_ERROR_NOMATCH, an
error message is output. Some extra information is given for the
PCRE_ERROR_MATCHLIMIT and PCRE_ERROR_RECURSIONLIMIT errors, which are
probably the only errors that are likely to be caused by users (by
specifying a regex that has nested indefinite repeats, for instance).
If there are more than 20 of these errors, pcregrep is abandoned.
(b) A binary zero was treated as data while matching, but terminated the
output line if it was written out. This has been fixed: binary zeroes
are now no different to any other data bytes.
(c) Whichever of the LC_ALL or LC_CTYPE environment variables is set is
used to set a locale for matching. The --locale=xxxx long option has
been added (no short equivalent) to specify a locale explicitly on the
pcregrep command, overriding the environment variables.
(d) When -B was used with -n, some line numbers in the output were one less
than they should have been.
(e) Added the -o (--only-matching) option.
(f) If -A or -C was used with -c (count only), some lines of context were
accidentally printed for the final match.
(g) Added the -H (--with-filename) option.
(h) The combination of options -rh failed to suppress file names for files
that were found from directory arguments.
(i) Added the -D (--devices) and -d (--directories) options.
(j) Added the -F (--fixed-strings) option.
(k) Allow "-" to be used as a file name for -f as well as for a data file.
(l) Added the --colo(u)r option.
(m) Added Jeffrey Friedl's -S testing option, but within #ifdefs so that it
is not present by default.
3. A nasty bug was discovered in the handling of recursive patterns, that is,
items such as (?R) or (?1), when the recursion could match a number of
alternatives. If it matched one of the alternatives, but subsequently,
outside the recursion, there was a failure, the code tried to back up into
the recursion. However, because of the way PCRE is implemented, this is not
possible, and the result was an incorrect result from the match.
In order to prevent this happening, the specification of recursion has
been changed so that all such subpatterns are automatically treated as
atomic groups. Thus, for example, (?R) is treated as if it were (?>(?R)).
4. I had overlooked the fact that, in some locales, there are characters for
which isalpha() is true but neither isupper() nor islower() are true. In
the fr_FR locale, for instance, the \xAA and \xBA characters (ordmasculine
and ordfeminine) are like this. This affected the treatment of \w and \W
when they appeared in character classes, but not when they appeared outside
a character class. The bit map for "word" characters is now created
separately from the results of isalnum() instead of just taking it from the
upper, lower, and digit maps. (Plus the underscore character, of course.)
5. The above bug also affected the handling of POSIX character classes such as
[[:alpha:]] and [[:alnum:]]. These do not have their own bit maps in PCRE's
permanent tables. Instead, the bit maps for such a class were previously
created as the appropriate unions of the upper, lower, and digit bitmaps.
Now they are created by subtraction from the [[:word:]] class, which has
its own bitmap.
6. The [[:blank:]] character class matches horizontal, but not vertical space.
It is created by subtracting the vertical space characters (\x09, \x0a,
\x0b, \x0c) from the [[:space:]] bitmap. Previously, however, the
subtraction was done in the overall bitmap for a character class, meaning
that a class such as [\x0c[:blank:]] was incorrect because \x0c would not
be recognized. This bug has been fixed.
7. Patches from the folks at Google:
(a) pcrecpp.cc: "to handle a corner case that may or may not happen in
real life, but is still worth protecting against".
(b) pcrecpp.cc: "corrects a bug when negative radixes are used with
regular expressions".
(c) pcre_scanner.cc: avoid use of std::count() because not all systems
have it.
(d) Split off pcrecpparg.h from pcrecpp.h and had the former built by
"configure" and the latter not, in order to fix a problem somebody had
with compiling the Arg class on HP-UX.
(e) Improve the error-handling of the C++ wrapper a little bit.
(f) New tests for checking recursion limiting.
8. The pcre_memmove() function, which is used only if the environment does not
have a standard memmove() function (and is therefore rarely compiled),
contained two bugs: (a) use of int instead of size_t, and (b) it was not
returning a result (though PCRE never actually uses the result).
9. In the POSIX regexec() interface, if nmatch is specified as a ridiculously
large number - greater than INT_MAX/(3*sizeof(int)) - REG_ESPACE is
returned instead of calling malloc() with an overflowing number that would
most likely cause subsequent chaos.
10. The debugging option of pcretest was not showing the NO_AUTO_CAPTURE flag.
11. The POSIX flag REG_NOSUB is now supported. When a pattern that was compiled
with this option is matched, the nmatch and pmatch options of regexec() are
ignored.
12. Added REG_UTF8 to the POSIX interface. This is not defined by POSIX, but is
provided in case anyone wants to the the POSIX interface with UTF-8
strings.
13. Added CXXLDFLAGS to the Makefile parameters to provide settings only on the
C++ linking (needed for some HP-UX environments).
14. Avoid compiler warnings in get_ucpname() when compiled without UCP support
(unused parameter) and in the pcre_printint() function (omitted "default"
switch label when the default is to do nothing).
15. Added some code to make it possible, when PCRE is compiled as a C++
library, to replace subject pointers for pcre_exec() with a smart pointer
class, thus making it possible to process discontinuous strings.
16. The two macros PCRE_EXPORT and PCRE_DATA_SCOPE are confusing, and perform
much the same function. They were added by different people who were trying
to make PCRE easy to compile on non-Unix systems. It has been suggested
that PCRE_EXPORT be abolished now that there is more automatic apparatus
for compiling on Windows systems. I have therefore replaced it with
PCRE_DATA_SCOPE. This is set automatically for Windows; if not set it
defaults to "extern" for C or "extern C" for C++, which works fine on
Unix-like systems. It is now possible to override the value of PCRE_DATA_
SCOPE with something explicit in config.h. In addition:
(a) pcreposix.h still had just "extern" instead of either of these macros;
I have replaced it with PCRE_DATA_SCOPE.
(b) Functions such as _pcre_xclass(), which are internal to the library,
but external in the C sense, all had PCRE_EXPORT in their definitions.
This is apparently wrong for the Windows case, so I have removed it.
(It makes no difference on Unix-like systems.)
17. Added a new limit, MATCH_LIMIT_RECURSION, which limits the depth of nesting
of recursive calls to match(). This is different to MATCH_LIMIT because
that limits the total number of calls to match(), not all of which increase
the depth of recursion. Limiting the recursion depth limits the amount of
stack (or heap if NO_RECURSE is set) that is used. The default can be set
when PCRE is compiled, and changed at run time. A patch from Google adds
this functionality to the C++ interface.
18. Changes to the handling of Unicode character properties:
(a) Updated the table to Unicode 4.1.0.
(b) Recognize characters that are not in the table as "Cn" (undefined).
(c) I revised the way the table is implemented to a much improved format
which includes recognition of ranges. It now supports the ranges that
are defined in UnicodeData.txt, and it also amalgamates other
characters into ranges. This has reduced the number of entries in the
table from around 16,000 to around 3,000, thus reducing its size
considerably. I realized I did not need to use a tree structure after
all - a binary chop search is just as efficient. Having reduced the
number of entries, I extended their size from 6 bytes to 8 bytes to
allow for more data.
(d) Added support for Unicode script names via properties such as \p{Han}.
19. In UTF-8 mode, a backslash followed by a non-Ascii character was not
matching that character.
20. When matching a repeated Unicode property with a minimum greater than zero,
(for example \pL{2,}), PCRE could look past the end of the subject if it
reached it while seeking the minimum number of characters. This could
happen only if some of the characters were more than one byte long, because
there is a check for at least the minimum number of bytes.
21. Refactored the implementation of \p and \P so as to be more general, to
allow for more different types of property in future. This has changed the
compiled form incompatibly. Anybody with saved compiled patterns that use
\p or \P will have to recompile them.
22. Added "Any" and "L&" to the supported property types.
23. Recognize \x{...} as a code point specifier, even when not in UTF-8 mode,
but give a compile time error if the value is greater than 0xff.
24. The man pages for pcrepartial, pcreprecompile, and pcre_compile2 were
accidentally not being installed or uninstalled.
25. The pcre.h file was built from pcre.h.in, but the only changes that were
made were to insert the current release number. This seemed silly, because
it made things harder for people building PCRE on systems that don't run
"configure". I have turned pcre.h into a distributed file, no longer built
by "configure", with the version identification directly included. There is
no longer a pcre.h.in file.
However, this change necessitated a change to the pcre-config script as
well. It is built from pcre-config.in, and one of the substitutions was the
release number. I have updated configure.ac so that ./configure now finds
the release number by grepping pcre.h.
26. Added the ability to run the tests under valgrind.
Diffstat (limited to 'devel/pcre')
-rw-r--r-- | devel/pcre/Makefile | 5 | ||||
-rw-r--r-- | devel/pcre/PLIST | 6 | ||||
-rw-r--r-- | devel/pcre/distinfo | 15 | ||||
-rw-r--r-- | devel/pcre/patches/patch-aa | 8 | ||||
-rw-r--r-- | devel/pcre/patches/patch-ab | 4 | ||||
-rw-r--r-- | devel/pcre/patches/patch-ac | 26 | ||||
-rw-r--r-- | devel/pcre/patches/patch-ad | 12 | ||||
-rw-r--r-- | devel/pcre/patches/patch-ae | 13 |
8 files changed, 19 insertions, 70 deletions
diff --git a/devel/pcre/Makefile b/devel/pcre/Makefile index af1d8eac023..b03c4eb121b 100644 --- a/devel/pcre/Makefile +++ b/devel/pcre/Makefile @@ -1,7 +1,6 @@ -# $NetBSD: Makefile,v 1.28 2005/12/05 20:50:06 rillig Exp $ +# $NetBSD: Makefile,v 1.29 2006/02/04 17:13:49 wiz Exp $ -DISTNAME= pcre-6.4 -PKGREVISION= 1 +DISTNAME= pcre-6.5 CATEGORIES= devel MASTER_SITES= ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ \ ftp://pcre.sourceforge.net/pub/pcre/ diff --git a/devel/pcre/PLIST b/devel/pcre/PLIST index e72832101de..23a409ae92c 100644 --- a/devel/pcre/PLIST +++ b/devel/pcre/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.6 2005/08/03 17:43:13 wiz Exp $ +@comment $NetBSD: PLIST,v 1.7 2006/02/04 17:13:49 wiz Exp $ bin/pcre-config bin/pcregrep bin/pcretest @@ -6,6 +6,7 @@ include/pcre.h include/pcre_scanner.h include/pcre_stringpiece.h include/pcrecpp.h +include/pcrecpparg.h include/pcreposix.h lib/libpcre.la lib/libpcrecpp.la @@ -15,6 +16,7 @@ man/man1/pcregrep.1 man/man1/pcretest.1 man/man3/pcre.3 man/man3/pcre_compile.3 +man/man3/pcre_compile2.3 man/man3/pcre_config.3 man/man3/pcre_copy_named_substring.3 man/man3/pcre_copy_substring.3 @@ -38,7 +40,9 @@ man/man3/pcrecallout.3 man/man3/pcrecompat.3 man/man3/pcrecpp.3 man/man3/pcrematching.3 +man/man3/pcrepartial.3 man/man3/pcrepattern.3 man/man3/pcreperform.3 man/man3/pcreposix.3 +man/man3/pcreprecompile.3 man/man3/pcresample.3 diff --git a/devel/pcre/distinfo b/devel/pcre/distinfo index b9f8e136b31..c823d2ce06e 100644 --- a/devel/pcre/distinfo +++ b/devel/pcre/distinfo @@ -1,10 +1,7 @@ -$NetBSD: distinfo,v 1.17 2005/11/24 19:34:01 wiz Exp $ +$NetBSD: distinfo,v 1.18 2006/02/04 17:13:49 wiz Exp $ -SHA1 (pcre-6.4.tar.bz2) = 778fb963b7ec24e0dce34c8e21b8633b32a02704 -RMD160 (pcre-6.4.tar.bz2) = c2e48a301fa08ce255aa60ecb5a8961a8266aa53 -Size (pcre-6.4.tar.bz2) = 566309 bytes -SHA1 (patch-aa) = e32943de7fb5dad5d40e1fc8e942be7439b43907 -SHA1 (patch-ab) = 1bb79ce010f30fdd4ab3b579faa45fa06c01ce90 -SHA1 (patch-ac) = 14e67eb1b7c4d343b0b3acf62484b5c556b7a739 -SHA1 (patch-ad) = 771d41edfa41c8600fcb90cf676a3d767c59aae9 -SHA1 (patch-ae) = 561cb7239ebe019de58f92ae9d8a24a620250de9 +SHA1 (pcre-6.5.tar.bz2) = 386b569a5d69d25e9642495663fe2de24df2f985 +RMD160 (pcre-6.5.tar.bz2) = d098f9a07b6523c8aff442d8d1c032dd50b6b2fe +Size (pcre-6.5.tar.bz2) = 556392 bytes +SHA1 (patch-aa) = 3662056f2ebd7a84fa667999464fdd6f00f95924 +SHA1 (patch-ab) = fb350f9ecc978b69ce75055edc6ba9560d62fdbb diff --git a/devel/pcre/patches/patch-aa b/devel/pcre/patches/patch-aa index c2caebb9bec..bdaa2b538f4 100644 --- a/devel/pcre/patches/patch-aa +++ b/devel/pcre/patches/patch-aa @@ -1,8 +1,8 @@ -$NetBSD: patch-aa,v 1.8 2005/10/31 20:33:24 tv Exp $ +$NetBSD: patch-aa,v 1.9 2006/02/04 17:13:49 wiz Exp $ ---- Makefile.in.orig 2005-09-12 04:45:39.000000000 -0400 +--- Makefile.in.orig 2006-02-02 12:04:11.000000000 +0100 +++ Makefile.in -@@ -105,7 +105,7 @@ LTCOMPILE = $(LIBTOOL) --mode=compile $( +@@ -106,7 +106,7 @@ LTCOMPILE = $(LIBTOOL) --mode=compile $( LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) -c $(CXXFLAGS) -I. -I$(top_srcdir) $(NEWLINE) $(LINK_SIZE) $(MATCH_LIMIT) $(NO_RECURSE) $(EBCDIC) @ON_WINDOWS@LINK = $(CC) $(LDFLAGS) -I. -I$(top_srcdir) -L.libs @NOT_ON_WINDOWS@LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -I. -I$(top_srcdir) @@ -10,4 +10,4 @@ $NetBSD: patch-aa,v 1.8 2005/10/31 20:33:24 tv Exp $ +LINKLIB = $(LIBTOOL) --mode=link --tag=CC $(CC) -export-symbols-regex '^[^_]' $(LDFLAGS) -I. -I$(top_srcdir) LINK_FOR_BUILD = $(LIBTOOL) --mode=link $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -I. -I$(top_srcdir) @ON_WINDOWS@CXXLINK = $(CXX) $(LDFLAGS) -I. -I$(top_srcdir) -L.libs - @NOT_ON_WINDOWS@CXXLINK = $(LIBTOOL) --mode=link $(CXX) $(LDFLAGS) -I. -I$(top_srcdir) + @NOT_ON_WINDOWS@CXXLINK = $(LIBTOOL) --mode=link $(CXX) $(LDFLAGS) $(CXXLDFLAGS) -I. -I$(top_srcdir) diff --git a/devel/pcre/patches/patch-ab b/devel/pcre/patches/patch-ab index 9a792c2654d..a97e6c155d0 100644 --- a/devel/pcre/patches/patch-ab +++ b/devel/pcre/patches/patch-ab @@ -1,6 +1,6 @@ -$NetBSD: patch-ab,v 1.2 2004/09/28 15:59:49 wiz Exp $ +$NetBSD: patch-ab,v 1.3 2006/02/04 17:13:49 wiz Exp $ ---- pcre-config.in.orig 2004-09-13 16:20:00.000000000 +0200 +--- pcre-config.in.orig 2006-02-02 12:04:11.000000000 +0100 +++ pcre-config.in @@ -17,6 +17,9 @@ case `uname -s` in *SunOS*) diff --git a/devel/pcre/patches/patch-ac b/devel/pcre/patches/patch-ac deleted file mode 100644 index d9738b9260a..00000000000 --- a/devel/pcre/patches/patch-ac +++ /dev/null @@ -1,26 +0,0 @@ -$NetBSD: patch-ac,v 1.1 2005/11/24 19:34:01 wiz Exp $ - ---- pcre_scanner.cc.orig 2005-09-12 10:45:39.000000000 +0200 -+++ pcre_scanner.cc -@@ -30,7 +30,6 @@ - // Author: Sanjay Ghemawat - - #include <vector> --#include <algorithm> // for count() - #include <assert.h> - #include "config.h" - #include "pcre_scanner.h" -@@ -90,7 +89,12 @@ void Scanner::EnableSkip() { - int Scanner::LineNumber() const { - // TODO: Make it more efficient by keeping track of the last point - // where we computed line numbers and counting newlines since then. -- return 1 + std::count(data_.data(), input_.data(), '\n'); -+ // We could use std:count, but not all systems have it (HPUX). :-( -+ int count = 1; -+ for (const char* p = data_.data(); p < input_.data(); ++p) -+ if (*p == '\n') -+ ++count; -+ return count; - } - - int Scanner::Offset() const { diff --git a/devel/pcre/patches/patch-ad b/devel/pcre/patches/patch-ad deleted file mode 100644 index e522e2defd0..00000000000 --- a/devel/pcre/patches/patch-ad +++ /dev/null @@ -1,12 +0,0 @@ -$NetBSD: patch-ad,v 1.1 2005/11/24 19:34:01 wiz Exp $ - ---- pcre_scanner_unittest.cc.orig 2005-09-12 10:45:39.000000000 +0200 -+++ pcre_scanner_unittest.cc -@@ -68,6 +68,7 @@ static void TestScanner() { - s.Consume(re, &var, &number); - CHECK_EQ(var, "alpha"); - CHECK_EQ(number, 1); -+ CHECK_EQ(s.LineNumber(), 3); - s.GetNextComments(&comments); - CHECK_EQ(comments.size(), 1); - CHECK_EQ(comments[0].as_string(), " // this sets alpha\n"); diff --git a/devel/pcre/patches/patch-ae b/devel/pcre/patches/patch-ae deleted file mode 100644 index 30c6377dda3..00000000000 --- a/devel/pcre/patches/patch-ae +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-ae,v 1.1 2005/11/24 19:34:01 wiz Exp $ - ---- pcrecpp_unittest.cc.orig 2005-09-12 10:45:39.000000000 +0200 -+++ pcrecpp_unittest.cc -@@ -1022,7 +1022,7 @@ int main(int argc, char** argv) { - } - - // Test that recursion is stopped: there will be some errors reported -- int matchlimit = 5000; -+ int matchlimit = 500; - int bytes = 15 * 1024; // enough to crash if there was no match limit - TestRecursion(bytes, ".", matchlimit); - TestRecursion(bytes, "a", matchlimit); |