summaryrefslogtreecommitdiff
path: root/ext/pcre
diff options
context:
space:
mode:
authorScott MacVicar <scottmac@php.net>2011-05-13 07:00:45 +0000
committerScott MacVicar <scottmac@php.net>2011-05-13 07:00:45 +0000
commit27fc1b889a9cf823df3bc071d0ae34bced8bce4b (patch)
tree944759dac09d1ff7863c545e18205a01fb8fd17c /ext/pcre
parent66ce68e7a42b63060353c86f28eef5efa05858fd (diff)
downloadphp-git-27fc1b889a9cf823df3bc071d0ae34bced8bce4b.tar.gz
Update bundled PCRE to 8.12
Diffstat (limited to 'ext/pcre')
-rw-r--r--ext/pcre/pcrelib/ChangeLog34
-rw-r--r--ext/pcre/pcrelib/NEWS7
-rw-r--r--ext/pcre/pcrelib/config.h6
-rw-r--r--ext/pcre/pcrelib/doc/pcre.txt1
-rw-r--r--ext/pcre/pcrelib/pcre.h4
-rw-r--r--ext/pcre/pcrelib/pcre_internal.h4
-rw-r--r--ext/pcre/pcrelib/testdata/grepoutput192
-rw-r--r--ext/pcre/pcrelib/testdata/testinput16
-rw-r--r--ext/pcre/pcrelib/testdata/testinput102
-rw-r--r--ext/pcre/pcrelib/testdata/testinput2113
-rw-r--r--ext/pcre/pcrelib/testdata/testinput46
-rw-r--r--ext/pcre/pcrelib/testdata/testinput62
-rw-r--r--ext/pcre/pcrelib/testdata/testinput747
-rw-r--r--ext/pcre/pcrelib/testdata/testinput815
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput18
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput1029
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput2213
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput415
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput62
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput787
-rw-r--r--ext/pcre/pcrelib/testdata/testoutput828
-rw-r--r--ext/pcre/upgrade-pcre.php5
22 files changed, 755 insertions, 71 deletions
diff --git a/ext/pcre/pcrelib/ChangeLog b/ext/pcre/pcrelib/ChangeLog
index 32cd0029b8..8a30140360 100644
--- a/ext/pcre/pcrelib/ChangeLog
+++ b/ext/pcre/pcrelib/ChangeLog
@@ -1,6 +1,40 @@
ChangeLog for PCRE
------------------
+Version 8.12 15-Jan-2011
+------------------------
+
+1. Fixed some typos in the markup of the man pages, and wrote a script that
+ checks for such things as part of the documentation building process.
+
+2. On a big-endian 64-bit system, pcregrep did not correctly process the
+ --match-limit and --recursion-limit options (added for 8.11). In
+ particular, this made one of the standard tests fail. (The integer value
+ went into the wrong half of a long int.)
+
+3. If the --colour option was given to pcregrep with -v (invert match), it
+ did strange things, either producing crazy output, or crashing. It should,
+ of course, ignore a request for colour when reporting lines that do not
+ match.
+
+4. Another pcregrep bug caused similar problems if --colour was specified with
+ -M (multiline) and the pattern match finished with a line ending.
+
+5. In pcregrep, when a pattern that ended with a literal newline sequence was
+ matched in multiline mode, the following line was shown as part of the
+ match. This seems wrong, so I have changed it.
+
+6. Another pcregrep bug in multiline mode, when --colour was specified, caused
+ the check for further matches in the same line (so they could be coloured)
+ to overrun the end of the current line. If another match was found, it was
+ incorrectly shown (and then shown again when found in the next line).
+
+7. If pcregrep was compiled under Windows, there was a reference to the
+ function pcregrep_exit() before it was defined. I am assuming this was
+ the cause of the "error C2371: 'pcregrep_exit' : redefinition;" that was
+ reported by a user. I've moved the definition above the reference.
+
+
Version 8.11 10-Dec-2010
------------------------
diff --git a/ext/pcre/pcrelib/NEWS b/ext/pcre/pcrelib/NEWS
index fdc4ba1e67..5f2b29bd22 100644
--- a/ext/pcre/pcrelib/NEWS
+++ b/ext/pcre/pcrelib/NEWS
@@ -1,6 +1,13 @@
News about PCRE releases
------------------------
+Release 8.12 15-Jan-2011
+------------------------
+
+This release fixes some bugs in pcregrep, one of which caused the tests to fail
+on 64-bit big-endian systems. There are no changes to the code of the library.
+
+
Release 8.11 10-Dec-2010
------------------------
diff --git a/ext/pcre/pcrelib/config.h b/ext/pcre/pcrelib/config.h
index b7e02b326f..46e0625fa0 100644
--- a/ext/pcre/pcrelib/config.h
+++ b/ext/pcre/pcrelib/config.h
@@ -282,7 +282,7 @@ them both to 0; an emulation function will be used. */
#define PACKAGE_NAME "PCRE"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "PCRE 8.11"
+#define PACKAGE_STRING "PCRE 8.12"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "pcre"
@@ -291,7 +291,7 @@ them both to 0; an emulation function will be used. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
-#define PACKAGE_VERSION "8.11"
+#define PACKAGE_VERSION "8.12"
/* If you are compiling for a system other than a Unix-like system or
@@ -347,7 +347,7 @@ them both to 0; an emulation function will be used. */
/* Version number of package */
#ifndef VERSION
-#define VERSION "8.11"
+#define VERSION "8.12"
#endif
/* Define to empty if `const' does not conform to ANSI C. */
diff --git a/ext/pcre/pcrelib/doc/pcre.txt b/ext/pcre/pcrelib/doc/pcre.txt
index 5d769dfb0c..ac4254ec99 100644
--- a/ext/pcre/pcrelib/doc/pcre.txt
+++ b/ext/pcre/pcrelib/doc/pcre.txt
@@ -6512,6 +6512,7 @@ SAVING AND RE-USING PRECOMPILED PCRE PATTERNS
SAVING A COMPILED PATTERN
+
The value returned by pcre_compile() points to a single block of memory
that holds the compiled pattern and associated data. You can find the
length of this block in bytes by calling pcre_fullinfo() with an argu-
diff --git a/ext/pcre/pcrelib/pcre.h b/ext/pcre/pcrelib/pcre.h
index ec454ee60d..21c4673724 100644
--- a/ext/pcre/pcrelib/pcre.h
+++ b/ext/pcre/pcrelib/pcre.h
@@ -42,9 +42,9 @@ POSSIBILITY OF SUCH DAMAGE.
/* The current PCRE version information. */
#define PCRE_MAJOR 8
-#define PCRE_MINOR 11
+#define PCRE_MINOR 12
#define PCRE_PRERELEASE
-#define PCRE_DATE 2010-12-10
+#define PCRE_DATE 2011-01-15
/* When an application links to a PCRE DLL in Windows, the symbols that are
imported have to be identified as such. When building PCRE, the appropriate
diff --git a/ext/pcre/pcrelib/pcre_internal.h b/ext/pcre/pcrelib/pcre_internal.h
index 6ec0b7a541..5f736d13ac 100644
--- a/ext/pcre/pcrelib/pcre_internal.h
+++ b/ext/pcre/pcrelib/pcre_internal.h
@@ -192,9 +192,7 @@ stdint.h is available, include it; it may define INT64_MAX. Systems that do not
have stdint.h (e.g. Solaris) may have inttypes.h. The macro int64_t may be set
by "configure". */
-#ifdef PHP_WIN32
-#include "win32/php_stdint.h"
-#elif HAVE_STDINT_H
+#if HAVE_STDINT_H
#include <stdint.h>
#elif HAVE_INTTYPES_H
#include <inttypes.h>
diff --git a/ext/pcre/pcrelib/testdata/grepoutput b/ext/pcre/pcrelib/testdata/grepoutput
index da7a370270..a0392509c0 100644
--- a/ext/pcre/pcrelib/testdata/grepoutput
+++ b/ext/pcre/pcrelib/testdata/grepoutput
@@ -2,15 +2,19 @@
PATTERN at the start of a line.
In the middle of a line, PATTERN appears.
Check up on PATTERN near the end.
+RC=0
---------------------------- Test 2 ------------------------------
PATTERN at the start of a line.
+RC=0
---------------------------- Test 3 ------------------------------
7:PATTERN at the start of a line.
8:In the middle of a line, PATTERN appears.
10:This pattern is in lower case.
608:Check up on PATTERN near the end.
+RC=0
---------------------------- Test 4 ------------------------------
4
+RC=0
---------------------------- Test 5 ------------------------------
./testdata/grepinput:7:PATTERN at the start of a line.
./testdata/grepinput:8:In the middle of a line, PATTERN appears.
@@ -19,6 +23,7 @@ PATTERN at the start of a line.
./testdata/grepinputx:3:Here is the pattern again.
./testdata/grepinputx:5:Pattern
./testdata/grepinputx:42:This line contains pattern not on a line by itself.
+RC=0
---------------------------- Test 6 ------------------------------
7:PATTERN at the start of a line.
8:In the middle of a line, PATTERN appears.
@@ -27,11 +32,14 @@ PATTERN at the start of a line.
3:Here is the pattern again.
5:Pattern
42:This line contains pattern not on a line by itself.
+RC=0
---------------------------- Test 7 ------------------------------
./testdata/grepinput
./testdata/grepinputx
+RC=0
---------------------------- Test 8 ------------------------------
./testdata/grepinput
+RC=0
---------------------------- Test 9 ------------------------------
RC=0
---------------------------- Test 10 -----------------------------
@@ -78,33 +86,43 @@ RC=1
40:twenty
41:
43:This is the last line of this file.
+RC=0
---------------------------- Test 12 -----------------------------
Pattern
+RC=0
---------------------------- Test 13 -----------------------------
Here is the pattern again.
That time it was on a line by itself.
This line contains pattern not on a line by itself.
+RC=0
---------------------------- Test 14 -----------------------------
./testdata/grepinputx:To pat or not to pat, that is the question.
+RC=0
---------------------------- Test 15 -----------------------------
pcregrep: Error in command-line regex at offset 4: nothing to repeat
+RC=2
---------------------------- Test 16 -----------------------------
pcregrep: Failed to open ./testdata/nonexistfile: No such file or directory
+RC=2
---------------------------- Test 17 -----------------------------
features should be added at the end, because some of the tests involve the
output of line numbers, and we don't want these to change.
+RC=0
---------------------------- Test 18 -----------------------------
4:features should be added at the end, because some of the tests involve the
output of line numbers, and we don't want these to change.
583:brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
-------------------------------------------------------------------------------
+RC=0
---------------------------- Test 19 -----------------------------
Pattern
+RC=0
---------------------------- Test 20 -----------------------------
10:complete pair
of lines
16:complete pair
of lines
+RC=0
---------------------------- Test 21 -----------------------------
24:four
25-five
@@ -115,6 +133,7 @@ of lines
35-fifteen
36-sixteen
37-seventeen
+RC=0
---------------------------- Test 22 -----------------------------
21-one
22-two
@@ -125,6 +144,7 @@ of lines
32-twelve
33-thirteen
34:fourteen
+RC=0
---------------------------- Test 23 -----------------------------
one
two
@@ -141,6 +161,7 @@ fourteen
fifteen
sixteen
seventeen
+RC=0
---------------------------- Test 24 -----------------------------
four
five
@@ -162,6 +183,7 @@ twenty
This line contains pattern not on a line by itself.
This is the last line of this file.
+RC=0
---------------------------- Test 25 -----------------------------
15-
16-complete pair
@@ -183,6 +205,7 @@ This is the last line of this file.
32-twelve
33-thirteen
34:fourteen
+RC=0
---------------------------- Test 26 -----------------------------
complete pair
@@ -213,6 +236,7 @@ twenty
This line contains pattern not on a line by itself.
This is the last line of this file.
+RC=0
---------------------------- Test 27 -----------------------------
four
five
@@ -234,6 +258,7 @@ twenty
This line contains pattern not on a line by itself.
This is the last line of this file.
+RC=0
---------------------------- Test 28 -----------------------------
14-of lines all by themselves.
15-
@@ -256,6 +281,7 @@ This is the last line of this file.
32-twelve
33-thirteen
34:fourteen
+RC=0
---------------------------- Test 29 -----------------------------
of lines all by themselves.
@@ -287,6 +313,7 @@ twenty
This line contains pattern not on a line by itself.
This is the last line of this file.
+RC=0
---------------------------- Test 30 -----------------------------
./testdata/grepinput-4-features should be added at the end, because some of the tests involve the
./testdata/grepinput-5-output of line numbers, and we don't want these to change.
@@ -311,6 +338,7 @@ This is the last line of this file.
./testdata/grepinputx-40-twenty
./testdata/grepinputx-41-
./testdata/grepinputx:42:This line contains pattern not on a line by itself.
+RC=0
---------------------------- Test 31 -----------------------------
./testdata/grepinput:7:PATTERN at the start of a line.
./testdata/grepinput:8:In the middle of a line, PATTERN appears.
@@ -332,8 +360,10 @@ This is the last line of this file.
--
./testdata/grepinputx:42:This line contains pattern not on a line by itself.
./testdata/grepinputx-43-This is the last line of this file.
+RC=0
---------------------------- Test 32 -----------------------------
./testdata/grepinputx
+RC=0
---------------------------- Test 33 -----------------------------
pcregrep: Failed to open ./testdata/grepnonexist: No such file or directory
RC=2
@@ -343,6 +373,7 @@ RC=2
./testdata/grepinputx
RC=0
---------------------------- Test 36 -----------------------------
+./testdata/grepinput3
./testdata/grepinput8
./testdata/grepinputx
RC=0
@@ -351,99 +382,214 @@ aaaaa0
aaaaa2
RC=0
======== STDERR ========
-pcregrep: pcre_exec() error -8 while matching this text:
+pcregrep: pcre_exec() gave error -8 while matching this text:
+
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-pcregrep: error -8 means that a resource limit was exceeded
-pcregrep: check your regex for nested unlimited loops
-pcregrep: pcre_exec() error -8 while matching this text:
+
+pcregrep: pcre_exec() gave error -8 while matching this text:
+
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+
+pcregrep: Error -8 or -21 means that a resource limit was exceeded.
+pcregrep: Check your regex for nested unlimited loops.
---------------------------- Test 38 ------------------------------
This line contains a binary zero here >
+RC=0
---------------------------- Test 39 ------------------------------
This is a line before the binary zero.
This line contains a binary zero here >
+RC=0
---------------------------- Test 40 ------------------------------
This line contains a binary zero here >
This is a line after the binary zero.
+RC=0
---------------------------- Test 41 ------------------------------
before the binary zero
after the binary zero
----------------------------- Test 41 ------------------------------
+RC=0
+---------------------------- Test 42 ------------------------------
./testdata/grepinput:595:before the binary zero
./testdata/grepinput:597:after the binary zero
----------------------------- Test 42 ------------------------------
+RC=0
+---------------------------- Test 43 ------------------------------
595:before
595:zero
596:zero
597:after
597:zero
----------------------------- Test 43 ------------------------------
+RC=0
+---------------------------- Test 44 ------------------------------
595:before
595:zero
596:zero
597:zero
----------------------------- Test 44 ------------------------------
+RC=0
+---------------------------- Test 45 ------------------------------
10:pattern
595:binary
596:binary
597:binary
----------------------------- Test 45 ------------------------------
-pcregrep: Error in 2nd command-line regex at offset 9: missing )
+RC=0
---------------------------- Test 46 ------------------------------
-AB.VE
+pcregrep: Error in 2nd command-line regex at offset 9: missing )
+RC=2
---------------------------- Test 47 ------------------------------
+AB.VE
+RC=0
+---------------------------- Test 48 ------------------------------
ABOVE the elephant
AB.VE
AB.VE the turtle
----------------------------- Test 48 ------------------------------
+RC=0
+---------------------------- Test 49 ------------------------------
ABOVE the elephant
AB.VE
AB.VE the turtle
PUT NEW DATA ABOVE THIS LINE.
----------------------------- Test 49 ------------------------------
+RC=0
---------------------------- Test 50 ------------------------------
+RC=1
+---------------------------- Test 51 ------------------------------
over the lazy dog.
This time it jumps and jumps and jumps.
----------------------------- Test 51 ------------------------------
+RC=0
+---------------------------- Test 52 ------------------------------
fox jumps
This time it jumps and jumps and jumps.
----------------------------- Test 52 ------------------------------
+RC=0
+---------------------------- Test 53 ------------------------------
36972,6
36990,4
37024,4
37066,5
37083,4
----------------------------- Test 53 ------------------------------
+RC=0
+---------------------------- Test 54 ------------------------------
595:15,6
595:33,4
596:28,4
597:15,5
597:32,4
----------------------------- Test 54 -----------------------------
+RC=0
+---------------------------- Test 55 -----------------------------
Here is the pattern again.
That time it was on a line by itself.
This line contains pattern not on a line by itself.
----------------------------- Test 55 -----------------------------
+RC=0
+---------------------------- Test 56 -----------------------------
./testdata/grepinput:456
+./testdata/grepinput3:0
./testdata/grepinput8:0
./testdata/grepinputv:1
./testdata/grepinputx:0
----------------------------- Test 56 -----------------------------
+RC=0
+---------------------------- Test 57 -----------------------------
./testdata/grepinput:456
./testdata/grepinputv:1
----------------------------- Test 57 -----------------------------
-PATTERN at the start of a line.
-In the middle of a line, PATTERN appears.
-Check up on PATTERN near the end.
+RC=0
---------------------------- Test 58 -----------------------------
PATTERN at the start of a line.
In the middle of a line, PATTERN appears.
Check up on PATTERN near the end.
+RC=0
---------------------------- Test 59 -----------------------------
PATTERN at the start of a line.
In the middle of a line, PATTERN appears.
Check up on PATTERN near the end.
+RC=0
---------------------------- Test 60 -----------------------------
PATTERN at the start of a line.
In the middle of a line, PATTERN appears.
Check up on PATTERN near the end.
+RC=0
+---------------------------- Test 61 -----------------------------
+PATTERN at the start of a line.
+In the middle of a line, PATTERN appears.
+Check up on PATTERN near the end.
+RC=0
+---------------------------- Test 62 -----------------------------
+pcregrep: pcre_exec() gave error -8 while matching text that starts:
+
+This is a file of miscellaneous text that is used as test data for checking
+that the pcregrep command is working correctly. The file must be more than 24K
+long so that it needs more than a single read
+
+pcregrep: Error -8 or -21 means that a resource limit was exceeded.
+pcregrep: Check your regex for nested unlimited loops.
+RC=1
+---------------------------- Test 63 -----------------------------
+pcregrep: pcre_exec() gave error -21 while matching text that starts:
+
+This is a file of miscellaneous text that is used as test data for checking
+that the pcregrep command is working correctly. The file must be more than 24K
+long so that it needs more than a single read
+
+pcregrep: Error -8 or -21 means that a resource limit was exceeded.
+pcregrep: Check your regex for nested unlimited loops.
+RC=1
+---------------------------- Test 64 ------------------------------
+appears
+RC=0
+---------------------------- Test 65 ------------------------------
+pear
+RC=0
+---------------------------- Test 66 ------------------------------
+RC=0
+---------------------------- Test 67 ------------------------------
+RC=0
+---------------------------- Test 68 ------------------------------
+pear
+RC=0
+---------------------------- Test 69 -----------------------------
+1:This is a second file of input for the pcregrep tests.
+2:
+4:
+5:Pattern
+6:That time it was on a line by itself.
+7:
+8:To pat or not to pat, that is the question.
+9:
+10:complete pair
+11:of lines
+12:
+13:That was a complete pair
+14:of lines all by themselves.
+15:
+16:complete pair
+17:of lines
+18:
+19:And there they were again, to check line numbers.
+20:
+21:one
+22:two
+23:three
+24:four
+25:five
+26:six
+27:seven
+28:eight
+29:nine
+30:ten
+31:eleven
+32:twelve
+33:thirteen
+34:fourteen
+35:fifteen
+36:sixteen
+37:seventeen
+38:eighteen
+39:nineteen
+40:twenty
+41:
+43:This is the last line of this file.
+RC=0
+---------------------------- Test 70 -----------------------------
+triple: t1_txt s1_tag s_txt p_tag p_txt o_tag o_txt
+
+triple: t3_txt s2_tag s_txt p_tag p_txt o_tag o_txt
+
+triple: t4_txt s1_tag s_txt p_tag p_txt o_tag o_txt
+
+triple: t6_txt s2_tag s_txt p_tag p_txt o_tag o_txt
+
+RC=0
diff --git a/ext/pcre/pcrelib/testdata/testinput1 b/ext/pcre/pcrelib/testdata/testinput1
index d999d2948a..97e5c366ef 100644
--- a/ext/pcre/pcrelib/testdata/testinput1
+++ b/ext/pcre/pcrelib/testdata/testinput1
@@ -4073,4 +4073,10 @@
** Failers
XABX
+/[\x00-\xff\s]+/
+ \x0a\x0b\x0c\x0d
+
+/^\c/
+ ?
+
/-- End of testinput1 --/
diff --git a/ext/pcre/pcrelib/testdata/testinput10 b/ext/pcre/pcrelib/testdata/testinput10
index 99afab88bd..7210cc5f8e 100644
--- a/ext/pcre/pcrelib/testdata/testinput10
+++ b/ext/pcre/pcrelib/testdata/testinput10
@@ -132,4 +132,6 @@ is required for these tests. --/
/[[:^alpha:]\S]+/8WB
+/abc(d|e)(*THEN)x(123(*THEN)4|567(b|q)(*THEN)xx)/B
+
/-- End of testinput10 --/
diff --git a/ext/pcre/pcrelib/testdata/testinput2 b/ext/pcre/pcrelib/testdata/testinput2
index cc94bed4e8..7cc8761650 100644
--- a/ext/pcre/pcrelib/testdata/testinput2
+++ b/ext/pcre/pcrelib/testdata/testinput2
@@ -5,7 +5,7 @@
either because PCRE can't be compatible, or there is a possible Perl
bug. --/
-/-- Originally, the Perl 5.10 and 5.11 things were in here too, but now I have
+/-- Originally, the Perl >= 5.10 things were in here too, but now I have
separated many (most?) of them out into test 11. However, there may still
be some that were overlooked. --/
@@ -2346,6 +2346,15 @@ a random value. /Ix
a\nb
a\r\nb
a\x85b
+
+/(*ANY).*/g
+ abc\r\ndef
+
+/(*ANYCRLF).*/g
+ abc\r\ndef
+
+/(*CRLF).*/g
+ abc\r\ndef
/a\Rb/I<bsr_anycrlf>
a\rb
@@ -2575,6 +2584,12 @@ a random value. /Ix
abc\Y
abcxypqr
abcxypqr\Y
+
+/(*NO_START_OPT)xyz/C
+ abcxyz
+
+/xyz/CY
+ abcxyz
/^"((?(?=[a])[^"])|b)*"$/C
"ab"
@@ -3170,9 +3185,9 @@ a random value. /Ix
xxxxabcde\P
xxxxabcde\P\P
-/-- This is not in the Perl 5.10 test because Perl seems currently to be broken
- and not behaving as specified in that it *does* bumpalong after hitting
- (*COMMIT). --/
+/-- This is not in the Perl >= 5.10 test because Perl seems currently to be
+ broken and not behaving as specified in that it *does* bumpalong after
+ hitting (*COMMIT). --/
/(?1)(A(*COMMIT)|B)D/
ABD
@@ -3216,7 +3231,7 @@ a random value. /Ix
/^(?&t)*(?(DEFINE)(?<t>.))$/BZ
-/ -- The first four of these are not in the Perl 5.10 test because Perl
+/ -- The first four of these are not in the Perl >= 5.10 test because Perl
documents that the use of \K in assertions is "not well defined". The
last is here because Perl gives the match as "b" rather than "ab". I
believe this to be a Perl bug. --/
@@ -3464,22 +3479,22 @@ with \Y. ---/
abcde
/A\NB./BZ
- ACBD
- ** Failers
- A\nB
- ACB\n
+ ACBD
+ *** Failers
+ A\nB
+ ACB\n
/A\NB./sBZ
- ACBD
- ACB\n
- ** Failers
- A\nB
+ ACBD
+ ACB\n
+ *** Failers
+ A\nB
/A\NB/<crlf>
- A\nB
- A\rB
- ** Failers
- A\r\nB
+ A\nB
+ A\rB
+ ** Failers
+ A\r\nB
/\R+b/BZ
@@ -3491,4 +3506,68 @@ with \Y. ---/
/\s*\R/BZ
+/-- Perl treats this one differently, not failing the second string. I believe
+ that is a bug in Perl. --/
+
+/^((abc|abcx)(*THEN)y|abcd)/
+ abcd
+ *** Failers
+ abcxy
+
+/(?<=abc)def/
+ abc\P\P
+
+/abc$/
+ abc
+ abc\P
+ abc\P\P
+
+/abc$/m
+ abc
+ abc\n
+ abc\P\P
+ abc\n\P\P
+ abc\P
+ abc\n\P
+
+/abc\z/
+ abc
+ abc\P
+ abc\P\P
+
+/abc\Z/
+ abc
+ abc\P
+ abc\P\P
+
+/abc\b/
+ abc
+ abc\P
+ abc\P\P
+
+/abc\B/
+ abc
+ abc\P
+ abc\P\P
+
+/.+/
+ abc\>0
+ abc\>1
+ abc\>2
+ abc\>3
+ abc\>4
+ abc\>-4
+
+/^\cģ/
+
+/(?P<abn>(?P=abn)xxx)/BZ
+
+/(a\1z)/BZ
+
+/(?P<abn>(?P=abn)(?<badstufxxx)/BZ
+
+/(?P<abn>(?P=axn)xxx)/BZ
+
+/(?P<abn>(?P=axn)xxx)(?<axn>yy)/BZ
+
/-- End of testinput2 --/
diff --git a/ext/pcre/pcrelib/testdata/testinput4 b/ext/pcre/pcrelib/testdata/testinput4
index 12f4c7e3b6..e2bae423b8 100644
--- a/ext/pcre/pcrelib/testdata/testinput4
+++ b/ext/pcre/pcrelib/testdata/testinput4
@@ -463,7 +463,8 @@
/a\Cb/8
aXb
a\nb
- *** Failers
+
+/a\C\Cb/8
a\x{100}b
/[z-\x{100}]/8i
@@ -640,4 +641,7 @@
a\x{c0}aaaa/
a\x{c0}a\x{c0}aaa/
+/A*/g8
+ AAB\x{123}BAA
+
/-- End of testinput4 --/
diff --git a/ext/pcre/pcrelib/testdata/testinput6 b/ext/pcre/pcrelib/testdata/testinput6
index e923e00996..503a5bc764 100644
--- a/ext/pcre/pcrelib/testdata/testinput6
+++ b/ext/pcre/pcrelib/testdata/testinput6
@@ -1,5 +1,5 @@
/-- This set of tests is for Unicode property support. It is compatible with
- Perl 5.10, but not 5.8 because it tests some extra properties that are
+ Perl >= 5.10, but not 5.8 because it tests some extra properties that are
not in the earlier release. --/
/^\pC\pL\pM\pN\pP\pS\pZ</8
diff --git a/ext/pcre/pcrelib/testdata/testinput7 b/ext/pcre/pcrelib/testdata/testinput7
index 5d27311927..66748873c5 100644
--- a/ext/pcre/pcrelib/testdata/testinput7
+++ b/ext/pcre/pcrelib/testdata/testinput7
@@ -4411,6 +4411,9 @@
abc\Y
abcxypqr
abcxypqr\Y
+
+/(*NO_START_OPT)xyz/C
+ abcxyz
/(?C)ab/
ab
@@ -4560,4 +4563,48 @@
/^(?(?!a(*SKIP)b))/
ac
+/(?<=abc)def/
+ abc\P\P
+
+/abc$/
+ abc
+ abc\P
+ abc\P\P
+
+/abc$/m
+ abc
+ abc\n
+ abc\P\P
+ abc\n\P\P
+ abc\P
+ abc\n\P
+
+/abc\z/
+ abc
+ abc\P
+ abc\P\P
+
+/abc\Z/
+ abc
+ abc\P
+ abc\P\P
+
+/abc\b/
+ abc
+ abc\P
+ abc\P\P
+
+/abc\B/
+ abc
+ abc\P
+ abc\P\P
+
+/.+/
+ abc\>0
+ abc\>1
+ abc\>2
+ abc\>3
+ abc\>4
+ abc\>-4
+
/-- End of testinput7 --/
diff --git a/ext/pcre/pcrelib/testdata/testinput8 b/ext/pcre/pcrelib/testdata/testinput8
index 1c6f684b43..55d2fd3c06 100644
--- a/ext/pcre/pcrelib/testdata/testinput8
+++ b/ext/pcre/pcrelib/testdata/testinput8
@@ -63,6 +63,9 @@
Ã
ÃÃÃ
ÃÃÃ\?
+ \xe1\x88
+ \P\xe1\x88
+ \P\P\xe1\x88
/a.b/8
acb
@@ -685,4 +688,16 @@
xxxxabcde\P
xxxxabcde\P\P
+/\bthe cat\b/8
+ the cat\P
+ the cat\P\P
+
+/a+/8
+ a\x{123}aa\>1
+ a\x{123}aa\>2
+ a\x{123}aa\>3
+ a\x{123}aa\>4
+ a\x{123}aa\>5
+ a\x{123}aa\>6
+
/-- End of testinput8 --/
diff --git a/ext/pcre/pcrelib/testdata/testoutput1 b/ext/pcre/pcrelib/testdata/testoutput1
index 2fd033cc3f..6ab67a7254 100644
--- a/ext/pcre/pcrelib/testdata/testoutput1
+++ b/ext/pcre/pcrelib/testdata/testoutput1
@@ -6658,4 +6658,12 @@ No match
XABX
No match
+/[\x00-\xff\s]+/
+ \x0a\x0b\x0c\x0d
+ 0: \x0a\x0b\x0c\x0d
+
+/^\c/
+ ?
+ 0: ?
+
/-- End of testinput1 --/
diff --git a/ext/pcre/pcrelib/testdata/testoutput10 b/ext/pcre/pcrelib/testdata/testoutput10
index 4994584ddf..b88474c7ba 100644
--- a/ext/pcre/pcrelib/testdata/testoutput10
+++ b/ext/pcre/pcrelib/testdata/testoutput10
@@ -707,4 +707,33 @@ Memory allocation (code space): 40
18 End
------------------------------------------------------------------
+/abc(d|e)(*THEN)x(123(*THEN)4|567(b|q)(*THEN)xx)/B
+------------------------------------------------------------------
+ 0 79 Bra
+ 3 abc
+ 9 7 CBra 1
+ 14 d
+ 16 5 Alt
+ 19 e
+ 21 12 Ket
+ 24 *THEN 24
+ 27 x
+ 29 16 CBra 2
+ 34 123
+ 40 *THEN 11
+ 43 4
+ 45 31 Alt
+ 48 567
+ 54 7 CBra 3
+ 59 b
+ 61 5 Alt
+ 64 q
+ 66 12 Ket
+ 69 *THEN 24
+ 72 xx
+ 76 47 Ket
+ 79 79 Ket
+ 82 End
+------------------------------------------------------------------
+
/-- End of testinput10 --/
diff --git a/ext/pcre/pcrelib/testdata/testoutput2 b/ext/pcre/pcrelib/testdata/testoutput2
index 2baa6e923e..531d617f00 100644
--- a/ext/pcre/pcrelib/testdata/testoutput2
+++ b/ext/pcre/pcrelib/testdata/testoutput2
@@ -5,7 +5,7 @@
either because PCRE can't be compatible, or there is a possible Perl
bug. --/
-/-- Originally, the Perl 5.10 and 5.11 things were in here too, but now I have
+/-- Originally, the Perl >= 5.10 things were in here too, but now I have
separated many (most?) of them out into test 11. However, there may still
be some that were overlooked. --/
@@ -8787,6 +8787,27 @@ No match
No match
a\x85b
No match
+
+/(*ANY).*/g
+ abc\r\ndef
+ 0: abc
+ 0:
+ 0: def
+ 0:
+
+/(*ANYCRLF).*/g
+ abc\r\ndef
+ 0: abc
+ 0:
+ 0: def
+ 0:
+
+/(*CRLF).*/g
+ abc\r\ndef
+ 0: abc
+ 0:
+ 0: def
+ 0:
/a\Rb/I<bsr_anycrlf>
Capturing subpattern count = 0
@@ -9273,6 +9294,30 @@ No match
+0 ^ x
+0 ^ x
No match
+
+/(*NO_START_OPT)xyz/C
+ abcxyz
+--->abcxyz
++15 ^ x
++15 ^ x
++15 ^ x
++15 ^ x
++16 ^^ y
++17 ^ ^ z
++18 ^ ^
+ 0: xyz
+
+/xyz/CY
+ abcxyz
+--->abcxyz
+ +0 ^ x
+ +0 ^ x
+ +0 ^ x
+ +0 ^ x
+ +1 ^^ y
+ +2 ^ ^ z
+ +3 ^ ^
+ 0: xyz
/^"((?(?=[a])[^"])|b)*"$/C
"ab"
@@ -10459,9 +10504,9 @@ Partial match: abca
xxxxabcde\P\P
Partial match: abcde
-/-- This is not in the Perl 5.10 test because Perl seems currently to be broken
- and not behaving as specified in that it *does* bumpalong after hitting
- (*COMMIT). --/
+/-- This is not in the Perl >= 5.10 test because Perl seems currently to be
+ broken and not behaving as specified in that it *does* bumpalong after
+ hitting (*COMMIT). --/
/(?1)(A(*COMMIT)|B)D/
ABD
@@ -10664,7 +10709,7 @@ No match
End
------------------------------------------------------------------
-/ -- The first four of these are not in the Perl 5.10 test because Perl
+/ -- The first four of these are not in the Perl >= 5.10 test because Perl
documents that the use of \K in assertions is "not well defined". The
last is here because Perl gives the match as "b" rather than "ab". I
believe this to be a Perl bug. --/
@@ -11043,13 +11088,13 @@ No match
Ket
End
------------------------------------------------------------------
- ACBD
+ ACBD
0: ACBD
- ** Failers
+ *** Failers
No match
- A\nB
+ A\nB
No match
- ACB\n
+ ACB\n
No match
/A\NB./sBZ
@@ -11062,23 +11107,23 @@ No match
Ket
End
------------------------------------------------------------------
- ACBD
+ ACBD
0: ACBD
- ACB\n
+ ACB\n
0: ACB\x0a
- ** Failers
+ *** Failers
No match
- A\nB
+ A\nB
No match
/A\NB/<crlf>
- A\nB
+ A\nB
0: A\x0aB
- A\rB
+ A\rB
0: A\x0dB
- ** Failers
+ ** Failers
No match
- A\r\nB
+ A\r\nB
No match
/\R+b/BZ
@@ -11126,4 +11171,138 @@ No match
End
------------------------------------------------------------------
+/-- Perl treats this one differently, not failing the second string. I believe
+ that is a bug in Perl. --/
+
+/^((abc|abcx)(*THEN)y|abcd)/
+ abcd
+ 0: abcd
+ 1: abcd
+ *** Failers
+No match
+ abcxy
+No match
+
+/(?<=abc)def/
+ abc\P\P
+Partial match: abc
+
+/abc$/
+ abc
+ 0: abc
+ abc\P
+ 0: abc
+ abc\P\P
+Partial match: abc
+
+/abc$/m
+ abc
+ 0: abc
+ abc\n
+ 0: abc
+ abc\P\P
+Partial match: abc
+ abc\n\P\P
+ 0: abc
+ abc\P
+ 0: abc
+ abc\n\P
+ 0: abc
+
+/abc\z/
+ abc
+ 0: abc
+ abc\P
+ 0: abc
+ abc\P\P
+Partial match: abc
+
+/abc\Z/
+ abc
+ 0: abc
+ abc\P
+ 0: abc
+ abc\P\P
+Partial match: abc
+
+/abc\b/
+ abc
+ 0: abc
+ abc\P
+ 0: abc
+ abc\P\P
+Partial match: abc
+
+/abc\B/
+ abc
+No match
+ abc\P
+Partial match: abc
+ abc\P\P
+Partial match: abc
+
+/.+/
+ abc\>0
+ 0: abc
+ abc\>1
+ 0: bc
+ abc\>2
+ 0: c
+ abc\>3
+No match
+ abc\>4
+Error -24
+ abc\>-4
+Error -24
+
+/^\cģ/
+Failed: \c must be followed by an ASCII character at offset 3
+
+/(?P<abn>(?P=abn)xxx)/BZ
+------------------------------------------------------------------
+ Bra
+ Once
+ CBra 1
+ \1
+ xxx
+ Ket
+ Ket
+ Ket
+ End
+------------------------------------------------------------------
+
+/(a\1z)/BZ
+------------------------------------------------------------------
+ Bra
+ Once
+ CBra 1
+ a
+ \1
+ z
+ Ket
+ Ket
+ Ket
+ End
+------------------------------------------------------------------
+
+/(?P<abn>(?P=abn)(?<badstufxxx)/BZ
+Failed: syntax error in subpattern name (missing terminator) at offset 29
+
+/(?P<abn>(?P=axn)xxx)/BZ
+Failed: reference to non-existent subpattern at offset 15
+
+/(?P<abn>(?P=axn)xxx)(?<axn>yy)/BZ
+------------------------------------------------------------------
+ Bra
+ CBra 1
+ \2
+ xxx
+ Ket
+ CBra 2
+ yy
+ Ket
+ Ket
+ End
+------------------------------------------------------------------
+
/-- End of testinput2 --/
diff --git a/ext/pcre/pcrelib/testdata/testoutput4 b/ext/pcre/pcrelib/testdata/testoutput4
index 128afe4386..4591026d40 100644
--- a/ext/pcre/pcrelib/testdata/testoutput4
+++ b/ext/pcre/pcrelib/testdata/testoutput4
@@ -802,10 +802,10 @@ No match
0: aXb
a\nb
0: a\x{0a}b
- *** Failers
-No match
+
+/a\C\Cb/8
a\x{100}b
-No match
+ 0: a\x{100}b
/[z-\x{100}]/8i
z
@@ -1119,4 +1119,13 @@ No match
0: a\x{c0}a\x{c0}
1: a\x{c0}
+/A*/g8
+ AAB\x{123}BAA
+ 0: AA
+ 0:
+ 0:
+ 0:
+ 0: AA
+ 0:
+
/-- End of testinput4 --/
diff --git a/ext/pcre/pcrelib/testdata/testoutput6 b/ext/pcre/pcrelib/testdata/testoutput6
index e000083b06..6a9ec839d9 100644
--- a/ext/pcre/pcrelib/testdata/testoutput6
+++ b/ext/pcre/pcrelib/testdata/testoutput6
@@ -1,5 +1,5 @@
/-- This set of tests is for Unicode property support. It is compatible with
- Perl 5.10, but not 5.8 because it tests some extra properties that are
+ Perl >= 5.10, but not 5.8 because it tests some extra properties that are
not in the earlier release. --/
/^\pC\pL\pM\pN\pP\pS\pZ</8
diff --git a/ext/pcre/pcrelib/testdata/testoutput7 b/ext/pcre/pcrelib/testdata/testoutput7
index 2aab80d74b..123ba82c4b 100644
--- a/ext/pcre/pcrelib/testdata/testoutput7
+++ b/ext/pcre/pcrelib/testdata/testoutput7
@@ -7319,6 +7319,18 @@ No match
+0 ^ x
+0 ^ x
No match
+
+/(*NO_START_OPT)xyz/C
+ abcxyz
+--->abcxyz
++15 ^ x
++15 ^ x
++15 ^ x
++15 ^ x
++16 ^^ y
++17 ^ ^ z
++18 ^ ^
+ 0: xyz
/(?C)ab/
ab
@@ -7610,4 +7622,79 @@ Error -16
ac
Error -16
+/(?<=abc)def/
+ abc\P\P
+Partial match: abc
+
+/abc$/
+ abc
+ 0: abc
+ abc\P
+ 0: abc
+ abc\P\P
+Partial match: abc
+
+/abc$/m
+ abc
+ 0: abc
+ abc\n
+ 0: abc
+ abc\P\P
+Partial match: abc
+ abc\n\P\P
+ 0: abc
+ abc\P
+ 0: abc
+ abc\n\P
+ 0: abc
+
+/abc\z/
+ abc
+ 0: abc
+ abc\P
+ 0: abc
+ abc\P\P
+Partial match: abc
+
+/abc\Z/
+ abc
+ 0: abc
+ abc\P
+ 0: abc
+ abc\P\P
+Partial match: abc
+
+/abc\b/
+ abc
+ 0: abc
+ abc\P
+ 0: abc
+ abc\P\P
+Partial match: abc
+
+/abc\B/
+ abc
+No match
+ abc\P
+Partial match: abc
+ abc\P\P
+Partial match: abc
+
+/.+/
+ abc\>0
+ 0: abc
+ 1: ab
+ 2: a
+ abc\>1
+ 0: bc
+ 1: b
+ abc\>2
+ 0: c
+ abc\>3
+No match
+ abc\>4
+Error -24
+ abc\>-4
+Error -24
+
/-- End of testinput7 --/
diff --git a/ext/pcre/pcrelib/testdata/testoutput8 b/ext/pcre/pcrelib/testdata/testoutput8
index 0cc87d79d0..f4f5343ef2 100644
--- a/ext/pcre/pcrelib/testdata/testoutput8
+++ b/ext/pcre/pcrelib/testdata/testoutput8
@@ -105,6 +105,12 @@ Error -10
Error -10
ÃÃÃ\?
No match
+ \xe1\x88
+Error -10
+ \P\xe1\x88
+Error -10
+ \P\P\xe1\x88
+Error -25
/a.b/8
acb
@@ -1320,4 +1326,26 @@ Partial match: abc1
xxxxabcde\P\P
Partial match: abcde
+/\bthe cat\b/8
+ the cat\P
+ 0: the cat
+ the cat\P\P
+Partial match: the cat
+
+/a+/8
+ a\x{123}aa\>1
+ 0: aa
+ 1: a
+ a\x{123}aa\>2
+Error -11
+ a\x{123}aa\>3
+ 0: aa
+ 1: a
+ a\x{123}aa\>4
+ 0: a
+ a\x{123}aa\>5
+No match
+ a\x{123}aa\>6
+Error -24
+
/-- End of testinput8 --/
diff --git a/ext/pcre/upgrade-pcre.php b/ext/pcre/upgrade-pcre.php
index 338b2079f7..a48f8d7604 100644
--- a/ext/pcre/upgrade-pcre.php
+++ b/ext/pcre/upgrade-pcre.php
@@ -103,6 +103,11 @@ foreach ($diff as $file) {
// the config.h needs special care
$prepend_config_h = '
#include <php_compat.h>
+
+#ifndef PHP_WIN32
+# include <php_config.h>
+#endif
+
#undef PACKAGE_NAME
#undef PACKAGE_VERSION
#undef PACKAGE_TARNAME