diff --git a/.gitignore b/.gitignore index bb2c96b..ca906c8 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ pcre-8.10.tar.bz2 /pcre-8.20-RC2.tar.bz2 /pcre-8.20-RC3.tar.bz2 /pcre-8.20.tar.bz2 +/pcre-8.21-RC1.tar.bz2 diff --git a/pcre-8.10-multilib.patch b/pcre-8.10-multilib.patch deleted file mode 100644 index d491612..0000000 --- a/pcre-8.10-multilib.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff -Naur pcre-8.10.orig/pcre-config.in pcre-8.10/pcre-config.in ---- pcre-8.10.orig/pcre-config.in 2010-03-02 12:08:45.000000000 +0100 -+++ pcre-8.10/pcre-config.in 2010-07-12 14:15:30.666700210 +0200 -@@ -15,16 +15,6 @@ - exit 1 - fi - --libR= --case `uname -s` in -- *SunOS*) -- libR=" -R@libdir@" -- ;; -- *BSD*) -- libR=" -Wl,-R@libdir@" -- ;; --esac -- - while test $# -gt 0; do - case "$1" in - -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; -@@ -58,14 +48,14 @@ - echo $includes @PCRE_STATIC_CFLAG@ - ;; - --libs-posix) -- echo -L@libdir@$libR -lpcreposix -lpcre -+ echo -lpcreposix -lpcre - ;; - --libs) -- echo -L@libdir@$libR -lpcre -+ echo -lpcre - ;; - --libs-cpp) - if test @enable_cpp@ = yes ; then -- echo -L@libdir@$libR -lpcrecpp -lpcre -+ echo -lpcrecpp -lpcre - else - echo "${usage}" 1>&2 - fi diff --git a/pcre-8.20-caseless_different_length.patch b/pcre-8.20-caseless_different_length.patch deleted file mode 100644 index 88843e5..0000000 --- a/pcre-8.20-caseless_different_length.patch +++ /dev/null @@ -1,150 +0,0 @@ -From 72a4bb52e09d46af0b00dd4064f93e9948fdad51 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= -Date: Fri, 2 Dec 2011 11:36:54 +0100 -Subject: [PATCH] Fix caseless match if cases differ in encoding length -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: -r778 | ph10 | 2011-12-01 18:38:47 +0100 (Čt, 01 pro 2011) | 3 lines - -Fix bug with caseless matching of characters of different lengths when -the shorter is right at the end of the subject. - -Petr Pisar: Changelog entry removed. ---- - pcre_exec.c | 32 ++++++++++++++++---------------- - testdata/testinput6 | 14 ++++++++++++++ - testdata/testoutput6 | 22 ++++++++++++++++++++++ - 3 files changed, 52 insertions(+), 16 deletions(-) - -diff --git a/pcre_exec.c b/pcre_exec.c -index 2e763d1..9881bdd 100644 ---- a/pcre_exec.c -+++ b/pcre_exec.c -@@ -427,7 +427,7 @@ returns a negative (error) response, the outer incarnation must also return the - same response. */ - - /* These macros pack up tests that are used for partial matching, and which --appears several times in the code. We set the "hit end" flag if the pointer is -+appear several times in the code. We set the "hit end" flag if the pointer is - at the end of the subject and also past the start of the subject (i.e. - something has been matched). For hard partial matching, we then return - immediately. The second one is used when we already know we are past the end of -@@ -3039,31 +3039,36 @@ for (;;) - } - break; - -- /* Match a single character, caselessly */ -+ /* Match a single character, caselessly. If we are at the end of the -+ subject, give up immediately. */ - - case OP_CHARI: -+ if (eptr >= md->end_subject) -+ { -+ SCHECK_PARTIAL(); -+ MRRETURN(MATCH_NOMATCH); -+ } -+ - #ifdef SUPPORT_UTF8 - if (utf8) - { - length = 1; - ecode++; - GETCHARLEN(fc, ecode, length); -- -- if (length > md->end_subject - eptr) -- { -- CHECK_PARTIAL(); /* Not SCHECK_PARTIAL() */ -- MRRETURN(MATCH_NOMATCH); -- } -- -+ - /* If the pattern character's value is < 128, we have only one byte, and -- can use the fast lookup table. */ -+ we know that its other case must also be one byte long, so we can use the -+ fast lookup table. We know that there is at least one byte left in the -+ subject. */ - - if (fc < 128) - { - if (md->lcc[*ecode++] != md->lcc[*eptr++]) MRRETURN(MATCH_NOMATCH); - } - -- /* Otherwise we must pick up the subject character */ -+ /* Otherwise we must pick up the subject character. Note that we cannot -+ use the value of "length" to check for sufficient bytes left, because the -+ other case of the character may have more or fewer bytes. */ - - else - { -@@ -3088,11 +3093,6 @@ for (;;) - - /* Non-UTF-8 mode */ - { -- if (md->end_subject - eptr < 1) -- { -- SCHECK_PARTIAL(); /* This one can use SCHECK_PARTIAL() */ -- MRRETURN(MATCH_NOMATCH); -- } - if (md->lcc[ecode[1]] != md->lcc[*eptr++]) MRRETURN(MATCH_NOMATCH); - ecode += 2; - } -diff --git a/testdata/testinput6 b/testdata/testinput6 -index e5fc0e9..6b0d2f7 100644 ---- a/testdata/testinput6 -+++ b/testdata/testinput6 -@@ -802,4 +802,18 @@ - ** Failers - a\xFCb - -+/ⱥ/8i -+ ⱥ -+ Ⱥx -+ Ⱥ -+ -+/[ⱥ]/8i -+ ⱥ -+ Ⱥx -+ Ⱥ -+ -+/Ⱥ/8i -+ Ⱥ -+ ⱥ -+ - /-- End of testinput6 --/ -diff --git a/testdata/testoutput6 b/testdata/testoutput6 -index 1acaa23..68c0a46 100644 ---- a/testdata/testoutput6 -+++ b/testdata/testoutput6 -@@ -1353,4 +1353,26 @@ No match - a\xFCb - No match - -+/ⱥ/8i -+ ⱥ -+ 0: \x{2c65} -+ Ⱥx -+ 0: \x{23a} -+ Ⱥ -+ 0: \x{23a} -+ -+/[ⱥ]/8i -+ ⱥ -+ 0: \x{2c65} -+ Ⱥx -+ 0: \x{23a} -+ Ⱥ -+ 0: \x{23a} -+ -+/Ⱥ/8i -+ Ⱥ -+ 0: \x{23a} -+ ⱥ -+ 0: \x{2c65} -+ - /-- End of testinput6 --/ --- -1.7.7.4 - diff --git a/pcre-8.20-forward_reference.patch b/pcre-8.20-forward_reference.patch deleted file mode 100644 index f01d23a..0000000 --- a/pcre-8.20-forward_reference.patch +++ /dev/null @@ -1,69 +0,0 @@ -Fix repeated forward reference needed character bug - -From: -r762 | ph10 | 2011-11-22 14:36:51 +0100 (Út, 22 lis 2011) | 2 lines - -16. A repeated forward reference in a pattern such as (a)(?2){2}(.) was - incorrectly expecting the subject to contain another "a" after the start. - -Petr Pisar: Changelog removed. -See . - - -Index: testdata/testoutput11 -=================================================================== ---- testdata/testoutput11 (revision 761) -+++ testdata/testoutput11 (revision 762) -@@ -1441,4 +1441,10 @@ - xabcd - 0: c - -+/(a)(?2){2}(.)/ -+ abcd -+ 0: abcd -+ 1: a -+ 2: d -+ - /-- End of testinput11 --/ -Index: testdata/testinput11 -=================================================================== ---- testdata/testinput11 (revision 761) -+++ testdata/testinput11 (revision 762) -@@ -800,4 +800,7 @@ - /(?<=a(*THEN)b)c/ - xabcd - -+/(a)(?2){2}(.)/ -+ abcd -+ - /-- End of testinput11 --/ -Index: pcre_compile.c -=================================================================== ---- pcre_compile.c (revision 761) -+++ pcre_compile.c (revision 762) -@@ -4884,7 +4884,8 @@ - *lengthptr += delta; - } - -- /* This is compiling for real */ -+ /* This is compiling for real. If there is a set first byte for -+ the group, and we have not yet set a "required byte", set it. */ - - else - { -@@ -6015,11 +6016,14 @@ - } - } - -- /* Insert the recursion/subroutine item. */ -+ /* Insert the recursion/subroutine item. It does not have a set first -+ byte (relevant if it is repeated, because it will then be wrapped -+ with ONCE brackets). */ - - *code = OP_RECURSE; - PUT(code, 1, (int)(called - cd->start_code)); - code += 1 + LINK_SIZE; -+ groupsetfirstbyte = FALSE; - } - - /* Can't determine a first byte now */ diff --git a/pcre-8.20-lookbehind-2.patch b/pcre-8.20-lookbehind-2.patch deleted file mode 100644 index 9cf650c..0000000 --- a/pcre-8.20-lookbehind-2.patch +++ /dev/null @@ -1,473 +0,0 @@ -From 5d9a1b3aee83b5068ab2635e474c3d75a0277e1c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= -Date: Wed, 16 Nov 2011 13:18:09 +0100 -Subject: [PATCH] Fixed several items that were being incorrectly rejected as - "not fixed length" in lookbehinds. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From SVN tree: -r747 | ph10 | 2011-11-15 18:35:10 +0100 (Út, 15 lis 2011) | 3 lines - -While fixing 6 above, I noticed that a number of other items were being -incorrectly rejected as "not fixed length". This arose partly because newer -opcodes had not been added to the fixed-length checking code. I have (a) -corrected the bug and added tests for these items, and (b) arranged for an -error to occur if an unknown opcode is encountered while checking for fixed -length instead of just assuming "not fixed length". The items that were -rejected were: (*ACCEPT), (*COMMIT), (*FAIL), (*MARK), (*PRUNE), (*SKIP), -(*THEN), \h, \H, \v, \V, and single character negative classes with fixed -repetitions, e.g. [^a]{3}, with and without PCRE_CASELESS. - -Petr Pisar: Remove change log entry. -See . ---- - pcre_compile.c | 154 ++++++++++++++++++++++++++++++++++++++++++------- - pcre_internal.h | 2 +- - pcreposix.c | 2 + - testdata/testinput1 | 24 ++++++++ - testdata/testinput11 | 27 +++++++++ - testdata/testoutput1 | 36 +++++++++++ - testdata/testoutput11 | 41 +++++++++++++ - 7 files changed, 263 insertions(+), 23 deletions(-) - -diff --git a/pcre_compile.c b/pcre_compile.c -index 588e981..27c8240 100644 ---- a/pcre_compile.c -+++ b/pcre_compile.c -@@ -410,6 +410,8 @@ static const char error_texts[] = - "this version of PCRE is not compiled with PCRE_UCP support\0" - "\\c must be followed by an ASCII character\0" - "\\k is not followed by a braced, angle-bracketed, or quoted name\0" -+ /* 70 */ -+ "internal error: unknown opcode in find_fixedlength()\0" - ; - - /* Table to identify digits and hex digits. This is used when compiling -@@ -1477,6 +1479,7 @@ Returns: the fixed length, - or -1 if there is no fixed length, - or -2 if \C was encountered - or -3 if an OP_RECURSE item was encountered and atend is FALSE -+ or -4 if an unknown opcode was encountered (internal error) - */ - - static int -@@ -1500,8 +1503,7 @@ for (;;) - /* We only need to continue for OP_CBRA (normal capturing bracket) and - OP_BRA (normal non-capturing bracket) because the other variants of these - opcodes are all concerned with unlimited repeated groups, which of course -- are not of fixed length. They will cause a -1 response from the default -- case of this switch. */ -+ are not of fixed length. */ - - case OP_CBRA: - case OP_BRA: -@@ -1515,15 +1517,17 @@ for (;;) - cc += 1 + LINK_SIZE; - break; - -- /* Reached end of a branch; if it's a ket it is the end of a nested -- call. If it's ALT it is an alternation in a nested call. If it is -- END it's the end of the outer call. All can be handled by the same code. -- Note that we must not include the OP_KETRxxx opcodes here, because they -- all imply an unlimited repeat. */ -+ /* Reached end of a branch; if it's a ket it is the end of a nested call. -+ If it's ALT it is an alternation in a nested call. An ACCEPT is effectively -+ an ALT. If it is END it's the end of the outer call. All can be handled by -+ the same code. Note that we must not include the OP_KETRxxx opcodes here, -+ because they all imply an unlimited repeat. */ - - case OP_ALT: - case OP_KET: - case OP_END: -+ case OP_ACCEPT: -+ case OP_ASSERT_ACCEPT: - if (length < 0) length = branchlength; - else if (length != branchlength) return -1; - if (*cc != OP_ALT) return length; -@@ -1557,23 +1561,36 @@ for (;;) - - /* Skip over things that don't match chars */ - -- case OP_REVERSE: -- case OP_CREF: -- case OP_NCREF: -- case OP_RREF: -- case OP_NRREF: -- case OP_DEF: -+ case OP_MARK: -+ case OP_PRUNE_ARG: -+ case OP_SKIP_ARG: -+ case OP_THEN_ARG: -+ cc += cc[1] + _pcre_OP_lengths[*cc]; -+ break; -+ - case OP_CALLOUT: -- case OP_SOD: -- case OP_SOM: -- case OP_SET_SOM: -- case OP_EOD: -- case OP_EODN: - case OP_CIRC: - case OP_CIRCM: -+ case OP_CLOSE: -+ case OP_COMMIT: -+ case OP_CREF: -+ case OP_DEF: - case OP_DOLL: - case OP_DOLLM: -+ case OP_EOD: -+ case OP_EODN: -+ case OP_FAIL: -+ case OP_NCREF: -+ case OP_NRREF: - case OP_NOT_WORD_BOUNDARY: -+ case OP_PRUNE: -+ case OP_REVERSE: -+ case OP_RREF: -+ case OP_SET_SOM: -+ case OP_SKIP: -+ case OP_SOD: -+ case OP_SOM: -+ case OP_THEN: - case OP_WORD_BOUNDARY: - cc += _pcre_OP_lengths[*cc]; - break; -@@ -1595,7 +1612,9 @@ for (;;) - need to skip over a multibyte character in UTF8 mode. */ - - case OP_EXACT: -- case OP_EXACTI: -+ case OP_EXACTI: -+ case OP_NOTEXACT: -+ case OP_NOTEXACTI: - branchlength += GET2(cc,1); - cc += 4; - #ifdef SUPPORT_UTF8 -@@ -1616,6 +1635,10 @@ for (;;) - cc += 2; - /* Fall through */ - -+ case OP_HSPACE: -+ case OP_VSPACE: -+ case OP_NOT_HSPACE: -+ case OP_NOT_VSPACE: - case OP_NOT_DIGIT: - case OP_DIGIT: - case OP_NOT_WHITESPACE: -@@ -1647,6 +1670,8 @@ for (;;) - - switch (*cc) - { -+ case OP_CRPLUS: -+ case OP_CRMINPLUS: - case OP_CRSTAR: - case OP_CRMINSTAR: - case OP_CRQUERY: -@@ -1667,8 +1692,91 @@ for (;;) - - /* Anything else is variable length */ - -- default: -+ case OP_ANYNL: -+ case OP_BRAMINZERO: -+ case OP_BRAPOS: -+ case OP_BRAPOSZERO: -+ case OP_BRAZERO: -+ case OP_CBRAPOS: -+ case OP_EXTUNI: -+ case OP_KETRMAX: -+ case OP_KETRMIN: -+ case OP_KETRPOS: -+ case OP_MINPLUS: -+ case OP_MINPLUSI: -+ case OP_MINQUERY: -+ case OP_MINQUERYI: -+ case OP_MINSTAR: -+ case OP_MINSTARI: -+ case OP_MINUPTO: -+ case OP_MINUPTOI: -+ case OP_NOTMINPLUS: -+ case OP_NOTMINPLUSI: -+ case OP_NOTMINQUERY: -+ case OP_NOTMINQUERYI: -+ case OP_NOTMINSTAR: -+ case OP_NOTMINSTARI: -+ case OP_NOTMINUPTO: -+ case OP_NOTMINUPTOI: -+ case OP_NOTPLUS: -+ case OP_NOTPLUSI: -+ case OP_NOTPOSPLUS: -+ case OP_NOTPOSPLUSI: -+ case OP_NOTPOSQUERY: -+ case OP_NOTPOSQUERYI: -+ case OP_NOTPOSSTAR: -+ case OP_NOTPOSSTARI: -+ case OP_NOTPOSUPTO: -+ case OP_NOTPOSUPTOI: -+ case OP_NOTQUERY: -+ case OP_NOTQUERYI: -+ case OP_NOTSTAR: -+ case OP_NOTSTARI: -+ case OP_NOTUPTO: -+ case OP_NOTUPTOI: -+ case OP_PLUS: -+ case OP_PLUSI: -+ case OP_POSPLUS: -+ case OP_POSPLUSI: -+ case OP_POSQUERY: -+ case OP_POSQUERYI: -+ case OP_POSSTAR: -+ case OP_POSSTARI: -+ case OP_POSUPTO: -+ case OP_POSUPTOI: -+ case OP_QUERY: -+ case OP_QUERYI: -+ case OP_REF: -+ case OP_REFI: -+ case OP_SBRA: -+ case OP_SBRAPOS: -+ case OP_SCBRA: -+ case OP_SCBRAPOS: -+ case OP_SCOND: -+ case OP_SKIPZERO: -+ case OP_STAR: -+ case OP_STARI: -+ case OP_TYPEMINPLUS: -+ case OP_TYPEMINQUERY: -+ case OP_TYPEMINSTAR: -+ case OP_TYPEMINUPTO: -+ case OP_TYPEPLUS: -+ case OP_TYPEPOSPLUS: -+ case OP_TYPEPOSQUERY: -+ case OP_TYPEPOSSTAR: -+ case OP_TYPEPOSUPTO: -+ case OP_TYPEQUERY: -+ case OP_TYPESTAR: -+ case OP_TYPEUPTO: -+ case OP_UPTO: -+ case OP_UPTOI: - return -1; -+ -+ /* Catch unrecognized opcodes so that when new ones are added they -+ are not forgotten, as has happened in the past. */ -+ -+ default: -+ return -4; - } - } - /* Control never gets here */ -@@ -6564,7 +6672,8 @@ for (;;) - } - else if (fixed_length < 0) - { -- *errorcodeptr = (fixed_length == -2)? ERR36 : ERR25; -+ *errorcodeptr = (fixed_length == -2)? ERR36 : -+ (fixed_length == -4)? ERR70: ERR25; - *ptrptr = ptr; - return FALSE; - } -@@ -7363,7 +7472,8 @@ if (cd->check_lookbehind) - DPRINTF(("fixed length = %d\n", fixed_length)); - if (fixed_length < 0) - { -- errorcode = (fixed_length == -2)? ERR36 : ERR25; -+ errorcode = (fixed_length == -2)? ERR36 : -+ (fixed_length == -4)? ERR70 : ERR25; - break; - } - PUT(cc, 1, fixed_length); -diff --git a/pcre_internal.h b/pcre_internal.h -index faf1b76..2d02e5d 100644 ---- a/pcre_internal.h -+++ b/pcre_internal.h -@@ -1665,7 +1665,7 @@ enum { ERR0, ERR1, ERR2, ERR3, ERR4, ERR5, ERR6, ERR7, ERR8, ERR9, - ERR40, ERR41, ERR42, ERR43, ERR44, ERR45, ERR46, ERR47, ERR48, ERR49, - ERR50, ERR51, ERR52, ERR53, ERR54, ERR55, ERR56, ERR57, ERR58, ERR59, - ERR60, ERR61, ERR62, ERR63, ERR64, ERR65, ERR66, ERR67, ERR68, ERR69, -- ERRCOUNT }; -+ ERR70, ERRCOUNT }; - - /* The real format of the start of the pcre block; the index of names and the - code vector run on as long as necessary after the end. We store an explicit -diff --git a/pcreposix.c b/pcreposix.c -index 2061be0..648254b 100644 ---- a/pcreposix.c -+++ b/pcreposix.c -@@ -153,6 +153,8 @@ static const int eint[] = { - REG_INVARG, /* this version of PCRE is not compiled with PCRE_UCP support */ - REG_BADPAT, /* \c must be followed by an ASCII character */ - REG_BADPAT, /* \k is not followed by a braced, angle-bracketed, or quoted name */ -+ /* 70 */ -+ REG_BADPAT, /* internal error: unknown opcode in find_fixedlength() */ - }; - - /* Table of texts corresponding to POSIX error codes */ -diff --git a/testdata/testinput1 b/testdata/testinput1 -index aa9ce42..b24f900 100644 ---- a/testdata/testinput1 -+++ b/testdata/testinput1 -@@ -4261,4 +4261,28 @@ - ** Failers - xaabc - -+/(?<=a\h)c/ -+ xa c -+ -+/(?<=[^a]{2})b/ -+ axxbc -+ aAAbc -+ ** Failers -+ xaabc -+ -+/(?<=[^a]{2})b/i -+ axxbc -+ ** Failers -+ aAAbc -+ xaabc -+ -+/(?<=a\H)c/ -+ abc -+ -+/(?<=a\V)c/ -+ abc -+ -+/(?<=a\v)c/ -+ a\nc -+ - /-- End of testinput1 --/ -diff --git a/testdata/testinput11 b/testdata/testinput11 -index 198dbf2..37ee38b 100644 ---- a/testdata/testinput11 -+++ b/testdata/testinput11 -@@ -767,4 +767,31 @@ name)/K - - /------------------------------/ - -+/(?<=a(*ACCEPT)b)c/ -+ xacd -+ -+/(?<=(a(*ACCEPT)b))c/ -+ xacd -+ -+/(?<=(a(*COMMIT)b))c/ -+ xabcd -+ ** Failers -+ xacd -+ -+/(? -Date: Tue, 15 Nov 2011 16:34:01 +0100 -Subject: [PATCH] Caseless matching of backreferences with fixed length - repetitions was broken. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From development SVN tree: - -r746 | ph10 | 2011-11-15 16:07:02 +0100 (Út, 15 lis 2011) | 2 lines - -6. Lookbehinds such as (?<=a{2}b) that contained a fixed repetition were - erroneously being rejected as "not fixed length" if PCRE_CASELESS was set. - This bug was probably introduced by change 9 of 8.13. - -Petr Pisar: Changelog entry removed. -See . ---- - pcre_compile.c | 1 + - testdata/testinput1 | 10 ++++++++++ - testdata/testoutput1 | 16 ++++++++++++++++ - 3 files changed, 27 insertions(+), 0 deletions(-) - -diff --git a/pcre_compile.c b/pcre_compile.c -index 3fc7c82..588e981 100644 ---- a/pcre_compile.c -+++ b/pcre_compile.c -@@ -1595,6 +1595,7 @@ for (;;) - need to skip over a multibyte character in UTF8 mode. */ - - case OP_EXACT: -+ case OP_EXACTI: - branchlength += GET2(cc,1); - cc += 4; - #ifdef SUPPORT_UTF8 -diff --git a/testdata/testinput1 b/testdata/testinput1 -index c913ee4..aa9ce42 100644 ---- a/testdata/testinput1 -+++ b/testdata/testinput1 -@@ -4251,4 +4251,14 @@ - /[:a]xxx[b:]/ - :xxx: - -+/(?<=a{2})b/i -+ xaabc -+ ** Failers -+ xabc -+ -+/(?flags & PCRE_EXTRA_EXECUTABLE_JIT) != 0 - && extra_data->executable_jit != NULL -+ && (extra_data->flags & PCRE_EXTRA_TABLES) == 0 - && (options & ~(PCRE_NO_UTF8_CHECK | PCRE_NOTBOL | PCRE_NOTEOL | - PCRE_NOTEMPTY | PCRE_NOTEMPTY_ATSTART)) == 0) - return _pcre_jit_exec(re, extra_data->executable_jit, subject, length, -Index: sljit/sljitLir.h -=================================================================== ---- sljit/sljitLir.h (revision 741) -+++ sljit/sljitLir.h (revision 742) -@@ -56,6 +56,9 @@ - - mainly position independent code - - Optimizations (perhaps later) - - Only for basic blocks (when no labels inserted between LIR instructions) -+ -+ For valgrind users: -+ - pass --smc-check=all argument to valgrind, since JIT is a "self-modifying code" - */ - - #if !(defined SLJIT_NO_DEFAULT_CONFIG && SLJIT_NO_DEFAULT_CONFIG) -@@ -87,6 +90,7 @@ - - #define SLJIT_UNUSED 0 - -+/* Temporary (scratch) registers may not preserve their values across function calls. */ - #define SLJIT_TEMPORARY_REG1 1 - #define SLJIT_TEMPORARY_REG2 2 - #define SLJIT_TEMPORARY_REG3 3 -@@ -95,6 +99,7 @@ - #define SLJIT_TEMPORARY_EREG1 4 - #define SLJIT_TEMPORARY_EREG2 5 - -+/* General (saved) registers preserve their values across function calls. */ - #define SLJIT_GENERAL_REG1 6 - #define SLJIT_GENERAL_REG2 7 - #define SLJIT_GENERAL_REG3 8 -Index: sljit/sljitNativePPC_common.c -=================================================================== ---- sljit/sljitNativePPC_common.c (revision 741) -+++ sljit/sljitNativePPC_common.c (revision 742) -@@ -37,6 +37,18 @@ - Both for ppc-32 and ppc-64. */ - typedef sljit_ui sljit_ins; - -+static void ppc_cache_flush(sljit_ins *from, sljit_ins *to) -+{ -+ while (from < to) { -+#ifdef __GNUC__ -+ asm volatile ( "icbi 0, %0" : : "r"(from) ); -+#else -+#error "Must implement icbi" -+#endif -+ from++; -+ } -+} -+ - #define TMP_REG1 (SLJIT_NO_REGISTERS + 1) - #define TMP_REG2 (SLJIT_NO_REGISTERS + 2) - #define TMP_REG3 (SLJIT_NO_REGISTERS + 3) -Index: sljit/sljitConfigInternal.h -=================================================================== ---- sljit/sljitConfigInternal.h (revision 741) -+++ sljit/sljitConfigInternal.h (revision 742) -@@ -178,13 +178,23 @@ - - #ifndef SLJIT_CACHE_FLUSH - --#if !(defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) && !(defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) -- /* Just call __ARM_NR_cacheflush on Linux. */ -+#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) || (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) -+ -+/* The __clear_cache() implementation of GCC is a dummy function on PowerPC. */ - #define SLJIT_CACHE_FLUSH(from, to) \ -+ ppc_cache_flush((from), (to)) -+ -+#elif (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) || (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) -+ -+/* Not required to implement on archs with unified caches. */ -+#define SLJIT_CACHE_FLUSH(from, to) -+ -+#else -+ -+/* Calls __ARM_NR_cacheflush on ARM-Linux. */ -+#define SLJIT_CACHE_FLUSH(from, to) \ - __clear_cache((char*)(from), (char*)(to)) --#else -- /* Not required to implement on archs with unified caches. */ --#define SLJIT_CACHE_FLUSH(from, to) -+ - #endif - - #endif /* !SLJIT_CACHE_FLUSH */ diff --git a/pcre-8.21-Make-pcre-config-libs-cpp-aware-of-cross-compilation.patch b/pcre-8.21-Make-pcre-config-libs-cpp-aware-of-cross-compilation.patch new file mode 100644 index 0000000..9473d45 --- /dev/null +++ b/pcre-8.21-Make-pcre-config-libs-cpp-aware-of-cross-compilation.patch @@ -0,0 +1,25 @@ +From abedf373e5a7032af6a37cc7f96aac15bf5c26dd Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Tue, 6 Dec 2011 19:13:31 +0100 +Subject: [PATCH] Make pcre-config --libs-cpp aware of cross-compilation + +--- + pcre-config.in | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/pcre-config.in b/pcre-config.in +index aeee182..00c5395 100644 +--- a/pcre-config.in ++++ b/pcre-config.in +@@ -58,7 +58,7 @@ while test $# -gt 0; do + ;; + --libs-cpp) + if test @enable_cpp@ = yes ; then +- echo -L@libdir@$libR -lpcrecpp -lpcre ++ echo $libS$libR -lpcrecpp -lpcre + else + echo "${usage}" 1>&2 + fi +-- +1.7.7.4 + diff --git a/pcre-8.21-multilib.patch b/pcre-8.21-multilib.patch new file mode 100644 index 0000000..345e624 --- /dev/null +++ b/pcre-8.21-multilib.patch @@ -0,0 +1,37 @@ +From 1d5ce3e2e6341b01609aefab20786a8638fee17a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Tue, 6 Dec 2011 18:44:11 +0100 +Subject: [PATCH] Fix multilib + +Do not set RPATH nor add explicit -L path to compiler. +--- + pcre-config.in | 12 ------------ + 1 files changed, 0 insertions(+), 12 deletions(-) + +diff --git a/pcre-config.in b/pcre-config.in +index ccbf210..aeee182 100644 +--- a/pcre-config.in ++++ b/pcre-config.in +@@ -16,19 +16,7 @@ if test $# -eq 0; then + fi + + libR= +-case `uname -s` in +- *SunOS*) +- libR=" -R@libdir@" +- ;; +- *BSD*) +- libR=" -Wl,-R@libdir@" +- ;; +-esac +- + libS= +-if test @libdir@ != /usr/lib ; then +- libS=-L@libdir@ +-fi + + while test $# -gt 0; do + case "$1" in +-- +1.7.7.4 + diff --git a/pcre.spec b/pcre.spec index 280f0cf..814a113 100644 --- a/pcre.spec +++ b/pcre.spec @@ -1,27 +1,20 @@ -# This is stable release: %%global rcversion RC3 +# This is stable release: +%global rcversion RC1 Name: pcre -Version: 8.20 -Release: %{?rcversion:0.}7%{?rcversion:.%rcversion}%{?dist} +Version: 8.21 +Release: %{?rcversion:0.}1%{?rcversion:.%rcversion}%{?dist} %global myversion %{version}%{?rcversion:-%rcversion} Summary: Perl-compatible regular expression library Group: System Environment/Libraries License: BSD URL: http://www.pcre.org/ Source: ftp://ftp.csx.cam.ac.uk/pub/software/programming/%{name}/%{?rcversion:Testing/}%{name}-%{myversion}.tar.bz2 -Patch0: pcre-8.10-multilib.patch +# Upstream thinks RPATH is good idea. +Patch0: pcre-8.21-multilib.patch +# Consolidate pcre-config --libs-cpp, sent to upstream. +Patch1: pcre-8.21-Make-pcre-config-libs-cpp-aware-of-cross-compilation.patch # Refused by upstream, bug #675477 -Patch1: pcre-8.20-refused_spelling_terminated.patch -# Fix look-behind regression, in upstream after 8.20. -Patch2: pcre-8.20-lookbehind.patch -# Fix other look-behind regression, in upstream after 8.20. -Patch3: pcre-8.20-lookbehind-2.patch -# Fix repeated forward reference, in upstream after 8.20. -Patch4: pcre-8.20-forward_reference.patch -# Fix cache-flush in JIT on PPC, in upstream after 8.20. -Patch5: pcre-8.20-ppcjit.patch -# Fix case-less match if cases differ in encoding length, in upstream after -# 8.20. -Patch6: pcre-8.20-caseless_different_length.patch +Patch2: pcre-8.20-refused_spelling_terminated.patch BuildRequires: readline-devel # New libtool to get rid of rpath BuildRequires: autoconf, automake, libtool @@ -60,13 +53,9 @@ Utilities demonstrating PCRE capabilities like pcregrep or pcretest. %setup -q -n %{name}-%{myversion} # Get rid of rpath %patch0 -p1 -b .multilib +%patch1 -p1 -b .cpp libtoolize --copy --force && autoreconf -%patch1 -p1 -b .terminated_typos -%patch2 -p1 -b .lookbehind -%patch3 -p1 -b .lookbehind2 -%patch4 -p0 -b .forward_reference -%patch5 -p0 -b .ppcjit -%patch6 -p1 -b .caseless_different_length +%patch2 -p1 -b .terminated_typos # One contributor's name is non-UTF-8 for F in ChangeLog; do iconv -f latin1 -t utf8 "$F" >"${F}.utf8" @@ -137,6 +126,9 @@ make check %{_mandir}/man1/pcretest.* %changelog +* Tue Dec 06 2011 Petr Pisar - 8.21-0.1.RC1 +- 8.21-RC1 bump + * Fri Dec 02 2011 Petr Pisar - 8.20-7 - Fix case-less match if cases differ in encoding length (bug #756675) diff --git a/sources b/sources index 0e7ae60..f6f6c08 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a1931c70e1273e3450d5036fe273d25c pcre-8.20.tar.bz2 +3aaead13e66d3ad4caa2795a2080e08e pcre-8.21-RC1.tar.bz2