Commit c4cc91cd authored by Sergei Golubchik's avatar Sergei Golubchik

8.37

parent 553b437d
...@@ -8,7 +8,7 @@ Email domain: cam.ac.uk ...@@ -8,7 +8,7 @@ Email domain: cam.ac.uk
University of Cambridge Computing Service, University of Cambridge Computing Service,
Cambridge, England. Cambridge, England.
Copyright (c) 1997-2014 University of Cambridge Copyright (c) 1997-2015 University of Cambridge
All rights reserved All rights reserved
...@@ -19,7 +19,7 @@ Written by: Zoltan Herczeg ...@@ -19,7 +19,7 @@ Written by: Zoltan Herczeg
Email local part: hzmester Email local part: hzmester
Emain domain: freemail.hu Emain domain: freemail.hu
Copyright(c) 2010-2014 Zoltan Herczeg Copyright(c) 2010-2015 Zoltan Herczeg
All rights reserved. All rights reserved.
...@@ -30,7 +30,7 @@ Written by: Zoltan Herczeg ...@@ -30,7 +30,7 @@ Written by: Zoltan Herczeg
Email local part: hzmester Email local part: hzmester
Emain domain: freemail.hu Emain domain: freemail.hu
Copyright(c) 2009-2014 Zoltan Herczeg Copyright(c) 2009-2015 Zoltan Herczeg
All rights reserved. All rights reserved.
......
ChangeLog for PCRE ChangeLog for PCRE
------------------ ------------------
Version 8.37 28-April-2015
--------------------------
1. When an (*ACCEPT) is triggered inside capturing parentheses, it arranges
for those parentheses to be closed with whatever has been captured so far.
However, it was failing to mark any other groups between the hightest
capture so far and the currrent group as "unset". Thus, the ovector for
those groups contained whatever was previously there. An example is the
pattern /(x)|((*ACCEPT))/ when matched against "abcd".
2. If an assertion condition was quantified with a minimum of zero (an odd
thing to do, but it happened), SIGSEGV or other misbehaviour could occur.
3. If a pattern in pcretest input had the P (POSIX) modifier followed by an
unrecognized modifier, a crash could occur.
4. An attempt to do global matching in pcretest with a zero-length ovector
caused a crash.
5. Fixed a memory leak during matching that could occur for a subpattern
subroutine call (recursive or otherwise) if the number of captured groups
that had to be saved was greater than ten.
6. Catch a bad opcode during auto-possessification after compiling a bad UTF
string with NO_UTF_CHECK. This is a tidyup, not a bug fix, as passing bad
UTF with NO_UTF_CHECK is documented as having an undefined outcome.
7. A UTF pattern containing a "not" match of a non-ASCII character and a
subroutine reference could loop at compile time. Example: /[^\xff]((?1))/.
8. When a pattern is compiled, it remembers the highest back reference so that
when matching, if the ovector is too small, extra memory can be obtained to
use instead. A conditional subpattern whose condition is a check on a
capture having happened, such as, for example in the pattern
/^(?:(a)|b)(?(1)A|B)/, is another kind of back reference, but it was not
setting the highest backreference number. This mattered only if pcre_exec()
was called with an ovector that was too small to hold the capture, and there
was no other kind of back reference (a situation which is probably quite
rare). The effect of the bug was that the condition was always treated as
FALSE when the capture could not be consulted, leading to a incorrect
behaviour by pcre_exec(). This bug has been fixed.
9. A reference to a duplicated named group (either a back reference or a test
for being set in a conditional) that occurred in a part of the pattern where
PCRE_DUPNAMES was not set caused the amount of memory needed for the pattern
to be incorrectly calculated, leading to overwriting.
10. A mutually recursive set of back references such as (\2)(\1) caused a
segfault at study time (while trying to find the minimum matching length).
The infinite loop is now broken (with the minimum length unset, that is,
zero).
11. If an assertion that was used as a condition was quantified with a minimum
of zero, matching went wrong. In particular, if the whole group had
unlimited repetition and could match an empty string, a segfault was
likely. The pattern (?(?=0)?)+ is an example that caused this. Perl allows
assertions to be quantified, but not if they are being used as conditions,
so the above pattern is faulted by Perl. PCRE has now been changed so that
it also rejects such patterns.
12. A possessive capturing group such as (a)*+ with a minimum repeat of zero
failed to allow the zero-repeat case if pcre2_exec() was called with an
ovector too small to capture the group.
13. Fixed two bugs in pcretest that were discovered by fuzzing and reported by
Red Hat Product Security:
(a) A crash if /K and /F were both set with the option to save the compiled
pattern.
(b) Another crash if the option to print captured substrings in a callout
was combined with setting a null ovector, for example \O\C+ as a subject
string.
14. A pattern such as "((?2){0,1999}())?", which has a group containing a
forward reference repeated a large (but limited) number of times within a
repeated outer group that has a zero minimum quantifier, caused incorrect
code to be compiled, leading to the error "internal error:
previously-checked referenced subpattern not found" when an incorrect
memory address was read. This bug was reported as "heap overflow",
discovered by Kai Lu of Fortinet's FortiGuard Labs and given the CVE number
CVE-2015-2325.
23. A pattern such as "((?+1)(\1))/" containing a forward reference subroutine
call within a group that also contained a recursive back reference caused
incorrect code to be compiled. This bug was reported as "heap overflow",
discovered by Kai Lu of Fortinet's FortiGuard Labs, and given the CVE
number CVE-2015-2326.
24. Computing the size of the JIT read-only data in advance has been a source
of various issues, and new ones are still appear unfortunately. To fix
existing and future issues, size computation is eliminated from the code,
and replaced by on-demand memory allocation.
25. A pattern such as /(?i)[A-`]/, where characters in the other case are
adjacent to the end of the range, and the range contained characters with
more than one other case, caused incorrect behaviour when compiled in UTF
mode. In that example, the range a-j was left out of the class.
26. Fix JIT compilation of conditional blocks, which assertion
is converted to (*FAIL). E.g: /(?(?!))/.
27. The pattern /(?(?!)^)/ caused references to random memory. This bug was
discovered by the LLVM fuzzer.
28. The assertion (?!) is optimized to (*FAIL). This was not handled correctly
when this assertion was used as a condition, for example (?(?!)a|b). In
pcre2_match() it worked by luck; in pcre2_dfa_match() it gave an incorrect
error about an unsupported item.
29. For some types of pattern, for example /Z*(|d*){216}/, the auto-
possessification code could take exponential time to complete. A recursion
depth limit of 1000 has been imposed to limit the resources used by this
optimization.
30. A pattern such as /(*UTF)[\S\V\H]/, which contains a negated special class
such as \S in non-UCP mode, explicit wide characters (> 255) can be ignored
because \S ensures they are all in the class. The code for doing this was
interacting badly with the code for computing the amount of space needed to
compile the pattern, leading to a buffer overflow. This bug was discovered
by the LLVM fuzzer.
31. A pattern such as /((?2)+)((?1))/ which has mutual recursion nested inside
other kinds of group caused stack overflow at compile time. This bug was
discovered by the LLVM fuzzer.
32. A pattern such as /(?1)(?#?'){8}(a)/ which had a parenthesized comment
between a subroutine call and its quantifier was incorrectly compiled,
leading to buffer overflow or other errors. This bug was discovered by the
LLVM fuzzer.
33. The illegal pattern /(?(?<E>.*!.*)?)/ was not being diagnosed as missing an
assertion after (?(. The code was failing to check the character after
(?(?< for the ! or = that would indicate a lookbehind assertion. This bug
was discovered by the LLVM fuzzer.
34. A pattern such as /X((?2)()*+){2}+/ which has a possessive quantifier with
a fixed maximum following a group that contains a subroutine reference was
incorrectly compiled and could trigger buffer overflow. This bug was
discovered by the LLVM fuzzer.
35. A mutual recursion within a lookbehind assertion such as (?<=((?2))((?1)))
caused a stack overflow instead of the diagnosis of a non-fixed length
lookbehind assertion. This bug was discovered by the LLVM fuzzer.
36. The use of \K in a positive lookbehind assertion in a non-anchored pattern
(e.g. /(?<=\Ka)/) could make pcregrep loop.
37. There was a similar problem to 36 in pcretest for global matches.
38. If a greedy quantified \X was preceded by \C in UTF mode (e.g. \C\X*),
and a subsequent item in the pattern caused a non-match, backtracking over
the repeated \X did not stop, but carried on past the start of the subject,
causing reference to random memory and/or a segfault. There were also some
other cases where backtracking after \C could crash. This set of bugs was
discovered by the LLVM fuzzer.
39. The function for finding the minimum length of a matching string could take
a very long time if mutual recursion was present many times in a pattern,
for example, /((?2){73}(?2))((?1))/. A better mutual recursion detection
method has been implemented. This infelicity was discovered by the LLVM
fuzzer.
40. Static linking against the PCRE library using the pkg-config module was
failing on missing pthread symbols.
Version 8.36 26-September-2014 Version 8.36 26-September-2014
------------------------------ ------------------------------
......
...@@ -6,7 +6,8 @@ and semantics are as close as possible to those of the Perl 5 language. ...@@ -6,7 +6,8 @@ and semantics are as close as possible to those of the Perl 5 language.
Release 8 of PCRE is distributed under the terms of the "BSD" licence, as Release 8 of PCRE is distributed under the terms of the "BSD" licence, as
specified below. The documentation for PCRE, supplied in the "doc" specified below. The documentation for PCRE, supplied in the "doc"
directory, is distributed under the same terms as the software itself. directory, is distributed under the same terms as the software itself. The data
in the testdata directory is not copyrighted and is in the public domain.
The basic library functions are written in C and are freestanding. Also The basic library functions are written in C and are freestanding. Also
included in the distribution is a set of C++ wrapper functions, and a included in the distribution is a set of C++ wrapper functions, and a
...@@ -24,7 +25,7 @@ Email domain: cam.ac.uk ...@@ -24,7 +25,7 @@ Email domain: cam.ac.uk
University of Cambridge Computing Service, University of Cambridge Computing Service,
Cambridge, England. Cambridge, England.
Copyright (c) 1997-2014 University of Cambridge Copyright (c) 1997-2015 University of Cambridge
All rights reserved. All rights reserved.
...@@ -35,7 +36,7 @@ Written by: Zoltan Herczeg ...@@ -35,7 +36,7 @@ Written by: Zoltan Herczeg
Email local part: hzmester Email local part: hzmester
Emain domain: freemail.hu Emain domain: freemail.hu
Copyright(c) 2010-2014 Zoltan Herczeg Copyright(c) 2010-2015 Zoltan Herczeg
All rights reserved. All rights reserved.
...@@ -46,7 +47,7 @@ Written by: Zoltan Herczeg ...@@ -46,7 +47,7 @@ Written by: Zoltan Herczeg
Email local part: hzmester Email local part: hzmester
Emain domain: freemail.hu Emain domain: freemail.hu
Copyright(c) 2009-2014 Zoltan Herczeg Copyright(c) 2009-2015 Zoltan Herczeg
All rights reserved. All rights reserved.
......
# Makefile.in generated by automake 1.14.1 from Makefile.am. # Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc. # Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
...@@ -19,7 +19,17 @@ ...@@ -19,7 +19,17 @@
VPATH = @srcdir@ VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \ am__make_running_with_option = \
case $${target_option-} in \ case $${target_option-} in \
?) ;; \ ?) ;; \
...@@ -151,18 +161,6 @@ noinst_PROGRAMS = $(am__EXEEXT_2) $(am__EXEEXT_3) $(am__EXEEXT_4) ...@@ -151,18 +161,6 @@ noinst_PROGRAMS = $(am__EXEEXT_2) $(am__EXEEXT_3) $(am__EXEEXT_4)
@WITH_PCRE32_TRUE@am__append_44 = libpcre32.pc @WITH_PCRE32_TRUE@am__append_44 = libpcre32.pc
@WITH_PCRE_CPP_TRUE@am__append_45 = libpcrecpp.pc @WITH_PCRE_CPP_TRUE@am__append_45 = libpcrecpp.pc
subdir = . subdir = .
DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \
$(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/configure $(am__configure_deps) \
$(srcdir)/config.h.in $(srcdir)/libpcre.pc.in \
$(srcdir)/libpcre16.pc.in $(srcdir)/libpcre32.pc.in \
$(srcdir)/libpcreposix.pc.in $(srcdir)/libpcrecpp.pc.in \
$(srcdir)/pcre-config.in $(srcdir)/pcre.h.in \
$(srcdir)/pcre_stringpiece.h.in $(srcdir)/pcrecpparg.h.in \
$(am__dist_noinst_SCRIPTS_DIST) depcomp $(dist_man_MANS) \
$(dist_doc_DATA) $(dist_html_DATA) $(dist_noinst_DATA) \
$(am__include_HEADERS_DIST) test-driver COPYING ar-lib compile \
config.guess config.sub install-sh missing ltmain.sh
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_pthread.m4 \ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_pthread.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
...@@ -171,6 +169,10 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_pthread.m4 \ ...@@ -171,6 +169,10 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_pthread.m4 \
$(top_srcdir)/m4/pcre_visibility.m4 $(top_srcdir)/configure.ac $(top_srcdir)/m4/pcre_visibility.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4) $(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
$(am__configure_deps) $(am__dist_noinst_SCRIPTS_DIST) \
$(dist_doc_DATA) $(dist_html_DATA) $(dist_noinst_DATA) \
$(am__include_HEADERS_DIST) $(am__DIST_COMMON)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d mkinstalldirs = $(install_sh) -d
...@@ -722,6 +724,15 @@ TEST_LOGS = $(am__test_logs2:.test.log=.log) ...@@ -722,6 +724,15 @@ TEST_LOGS = $(am__test_logs2:.test.log=.log)
TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
$(TEST_LOG_FLAGS) $(TEST_LOG_FLAGS)
am__DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.in \
$(srcdir)/config.h.in $(srcdir)/libpcre.pc.in \
$(srcdir)/libpcre16.pc.in $(srcdir)/libpcre32.pc.in \
$(srcdir)/libpcrecpp.pc.in $(srcdir)/libpcreposix.pc.in \
$(srcdir)/pcre-config.in $(srcdir)/pcre.h.in \
$(srcdir)/pcre_stringpiece.h.in $(srcdir)/pcrecpparg.h.in \
AUTHORS COPYING ChangeLog INSTALL NEWS README ar-lib compile \
config.guess config.sub depcomp install-sh ltmain.sh missing \
test-driver
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION) distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir) top_distdir = $(distdir)
...@@ -798,6 +809,7 @@ LIBZ = @LIBZ@ ...@@ -798,6 +809,7 @@ LIBZ = @LIBZ@
LIPO = @LIPO@ LIPO = @LIPO@
LN_S = @LN_S@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@ MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@ MKDIR_P = @MKDIR_P@
...@@ -1326,7 +1338,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) ...@@ -1326,7 +1338,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
$(am__cd) $(top_srcdir) && \ $(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu Makefile $(AUTOMAKE) --gnu Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \ @case '$?' in \
*config.status*) \ *config.status*) \
...@@ -2613,7 +2624,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) ...@@ -2613,7 +2624,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
if test -n "$$am__remaking_logs"; then \ if test -n "$$am__remaking_logs"; then \
echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
"recursion detected" >&2; \ "recursion detected" >&2; \
else \ elif test -n "$$redo_logs"; then \
am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
fi; \ fi; \
if $(am__make_dryrun); then :; else \ if $(am__make_dryrun); then :; else \
...@@ -2836,15 +2847,15 @@ dist-xz: distdir ...@@ -2836,15 +2847,15 @@ dist-xz: distdir
$(am__post_remove_distdir) $(am__post_remove_distdir)
dist-tarZ: distdir dist-tarZ: distdir
@echo WARNING: "Support for shar distribution archives is" \ @echo WARNING: "Support for distribution archives compressed with" \
"deprecated." >&2 "legacy program 'compress' is deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__post_remove_distdir) $(am__post_remove_distdir)
dist-shar: distdir dist-shar: distdir
@echo WARNING: "Support for distribution archives compressed with" \ @echo WARNING: "Support for shar distribution archives is" \
"legacy program 'compress' is deprecated." >&2 "deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__post_remove_distdir) $(am__post_remove_distdir)
...@@ -2879,17 +2890,17 @@ distcheck: dist ...@@ -2879,17 +2890,17 @@ distcheck: dist
esac esac
chmod -R a-w $(distdir) chmod -R a-w $(distdir)
chmod u+w $(distdir) chmod u+w $(distdir)
mkdir $(distdir)/_build $(distdir)/_inst mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
chmod a-w $(distdir) chmod a-w $(distdir)
test -d $(distdir)/_build || exit 0; \ test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& am__cwd=`pwd` \ && am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build \ && $(am__cd) $(distdir)/_build/sub \
&& ../configure \ && ../../configure \
$(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \
--srcdir=.. --prefix="$$dc_install_base" \ --srcdir=../.. --prefix="$$dc_install_base" \
&& $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) check \
...@@ -3110,6 +3121,8 @@ uninstall-man: uninstall-man1 uninstall-man3 ...@@ -3110,6 +3121,8 @@ uninstall-man: uninstall-man1 uninstall-man3
uninstall-man3 uninstall-nodist_includeHEADERS \ uninstall-man3 uninstall-nodist_includeHEADERS \
uninstall-pkgconfigDATA uninstall-pkgconfigDATA
.PRECIOUS: Makefile
# The only difference between pcre.h.in and pcre.h is the setting of the PCRE # The only difference between pcre.h.in and pcre.h is the setting of the PCRE
# version number. Therefore, we can create the generic version just by copying. # version number. Therefore, we can create the generic version just by copying.
......
News about PCRE releases News about PCRE releases
------------------------ ------------------------
Release 8.37 28-April-2015
--------------------------
This is bug-fix release. Note that this library (now called PCRE1) is now being
maintained for bug fixes only. New projects are advised to use the new PCRE2
libraries.
Release 8.36 26-September-2014 Release 8.36 26-September-2014
------------------------------ ------------------------------
......
Building PCRE without using autotools Building PCRE without using autotools
------------------------------------- -------------------------------------
NOTE: This document relates to PCRE releases that use the original API, with
library names libpcre, libpcre16, and libpcre32. January 2015 saw the first
release of a new API, known as PCRE2, with release numbers starting at 10.00
and library names libpcre2-8, libpcre2-16, and libpcre2-32. The old libraries
(now called PCRE1) are still being maintained for bug fixes, but there will be
no new development. New projects are advised to use the new PCRE2 libraries.
This document contains the following sections: This document contains the following sections:
General General
...@@ -761,4 +769,4 @@ There is also a mirror here: ...@@ -761,4 +769,4 @@ There is also a mirror here:
http://www.vsoft-software.com/downloads.html http://www.vsoft-software.com/downloads.html
========================== ==========================
Last Updated: 14 May 2013 Last Updated: 10 February 2015
README file for PCRE (Perl-compatible regular expression library) README file for PCRE (Perl-compatible regular expression library)
----------------------------------------------------------------- -----------------------------------------------------------------
The latest release of PCRE is always available in three alternative formats NOTE: This set of files relates to PCRE releases that use the original API,
with library names libpcre, libpcre16, and libpcre32. January 2015 saw the
first release of a new API, known as PCRE2, with release numbers starting at
10.00 and library names libpcre2-8, libpcre2-16, and libpcre2-32. The old
libraries (now called PCRE1) are still being maintained for bug fixes, but
there will be no new development. New projects are advised to use the new PCRE2
libraries.
The latest release of PCRE1 is always available in three alternative formats
from: from:
ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-xxx.tar.gz ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-xxx.tar.gz
...@@ -990,4 +999,4 @@ pcre_xxx, one with the name pcre16_xx, and a third with the name pcre32_xxx. ...@@ -990,4 +999,4 @@ pcre_xxx, one with the name pcre16_xx, and a third with the name pcre32_xxx.
Philip Hazel Philip Hazel
Email local part: ph10 Email local part: ph10
Email domain: cam.ac.uk Email domain: cam.ac.uk
Last updated: 24 October 2014 Last updated: 10 February 2015
...@@ -506,6 +506,11 @@ echo "---------------------------- Test 106 -----------------------------" >>tes ...@@ -506,6 +506,11 @@ echo "---------------------------- Test 106 -----------------------------" >>tes
(cd $srcdir; echo "a" | $valgrind $pcregrep -M "|a" ) >>testtrygrep 2>&1 (cd $srcdir; echo "a" | $valgrind $pcregrep -M "|a" ) >>testtrygrep 2>&1
echo "RC=$?" >>testtrygrep echo "RC=$?" >>testtrygrep
echo "---------------------------- Test 107 -----------------------------" >>testtrygrep
echo "a" >testtemp1grep
echo "aaaaa" >>testtemp1grep
(cd $srcdir; $valgrind $pcregrep --line-offsets '(?<=\Ka)' $builddir/testtemp1grep) >>testtrygrep 2>&1
echo "RC=$?" >>testtrygrep
# Now compare the results. # Now compare the results.
......
# generated automatically by aclocal 1.14.1 -*- Autoconf -*- # generated automatically by aclocal 1.15 -*- Autoconf -*-
# Copyright (C) 1996-2013 Free Software Foundation, Inc. # Copyright (C) 1996-2014 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
...@@ -235,7 +235,7 @@ AS_VAR_COPY([$1], [pkg_cv_][$1]) ...@@ -235,7 +235,7 @@ AS_VAR_COPY([$1], [pkg_cv_][$1])
AS_VAR_IF([$1], [""], [$5], [$4])dnl AS_VAR_IF([$1], [""], [$5], [$4])dnl
])# PKG_CHECK_VAR ])# PKG_CHECK_VAR
# Copyright (C) 2002-2013 Free Software Foundation, Inc. # Copyright (C) 2002-2014 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
...@@ -247,10 +247,10 @@ AS_VAR_IF([$1], [""], [$5], [$4])dnl ...@@ -247,10 +247,10 @@ AS_VAR_IF([$1], [""], [$5], [$4])dnl
# generated from the m4 files accompanying Automake X.Y. # generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.) # (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION], AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.14' [am__api_version='1.15'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro. dnl require some minimum version. Point them to the right macro.
m4_if([$1], [1.14.1], [], m4_if([$1], [1.15], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
]) ])
...@@ -266,12 +266,12 @@ m4_define([_AM_AUTOCONF_VERSION], []) ...@@ -266,12 +266,12 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.14.1])dnl [AM_AUTOMAKE_VERSION([1.15])dnl
m4_ifndef([AC_AUTOCONF_VERSION], m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# Copyright (C) 2011-2013 Free Software Foundation, Inc. # Copyright (C) 2011-2014 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
...@@ -333,7 +333,7 @@ AC_SUBST([AR])dnl ...@@ -333,7 +333,7 @@ AC_SUBST([AR])dnl
# AM_AUX_DIR_EXPAND -*- Autoconf -*- # AM_AUX_DIR_EXPAND -*- Autoconf -*-
# Copyright (C) 2001-2013 Free Software Foundation, Inc. # Copyright (C) 2001-2014 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
...@@ -378,15 +378,14 @@ AC_SUBST([AR])dnl ...@@ -378,15 +378,14 @@ AC_SUBST([AR])dnl
# configured tree to be moved without reconfiguration. # configured tree to be moved without reconfiguration.
AC_DEFUN([AM_AUX_DIR_EXPAND], AC_DEFUN([AM_AUX_DIR_EXPAND],
[dnl Rely on autoconf to set up CDPATH properly. [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
AC_PREREQ([2.50])dnl # Expand $ac_aux_dir to an absolute path.
# expand $ac_aux_dir to an absolute path am_aux_dir=`cd "$ac_aux_dir" && pwd`
am_aux_dir=`cd $ac_aux_dir && pwd`
]) ])
# AM_CONDITIONAL -*- Autoconf -*- # AM_CONDITIONAL -*- Autoconf -*-
# Copyright (C) 1997-2013 Free Software Foundation, Inc. # Copyright (C) 1997-2014 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
...@@ -417,7 +416,7 @@ AC_CONFIG_COMMANDS_PRE( ...@@ -417,7 +416,7 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]]) Usually this means the macro was only invoked conditionally.]])
fi])]) fi])])
# Copyright (C) 1999-2013 Free Software Foundation, Inc. # Copyright (C) 1999-2014 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
...@@ -608,7 +607,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl ...@@ -608,7 +607,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
# Generate code to set up dependency tracking. -*- Autoconf -*- # Generate code to set up dependency tracking. -*- Autoconf -*-
# Copyright (C) 1999-2013 Free Software Foundation, Inc. # Copyright (C) 1999-2014 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
...@@ -684,7 +683,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], ...@@ -684,7 +683,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# Do all the work for Automake. -*- Autoconf -*- # Do all the work for Automake. -*- Autoconf -*-
# Copyright (C) 1996-2013 Free Software Foundation, Inc. # Copyright (C) 1996-2014 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
...@@ -774,8 +773,8 @@ AC_REQUIRE([AC_PROG_MKDIR_P])dnl ...@@ -774,8 +773,8 @@ AC_REQUIRE([AC_PROG_MKDIR_P])dnl
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
AC_SUBST([mkdir_p], ['$(MKDIR_P)']) AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
# We need awk for the "check" target. The system "awk" is bad on # We need awk for the "check" target (and possibly the TAP driver). The
# some platforms. # system "awk" is bad on some platforms.
AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl
...@@ -848,7 +847,11 @@ to "yes", and re-run configure. ...@@ -848,7 +847,11 @@ to "yes", and re-run configure.
END END
AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
fi fi
fi]) fi
dnl The trailing newline in this macro's definition is deliberate, for
dnl backward compatibility and to allow trailing 'dnl'-style comments
dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
])
dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
...@@ -877,7 +880,7 @@ for _am_header in $config_headers :; do ...@@ -877,7 +880,7 @@ for _am_header in $config_headers :; do
done done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
# Copyright (C) 2001-2013 Free Software Foundation, Inc. # Copyright (C) 2001-2014 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
...@@ -888,7 +891,7 @@ echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_co ...@@ -888,7 +891,7 @@ echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_co
# Define $install_sh. # Define $install_sh.
AC_DEFUN([AM_PROG_INSTALL_SH], AC_DEFUN([AM_PROG_INSTALL_SH],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
if test x"${install_sh}" != xset; then if test x"${install_sh+set}" != xset; then
case $am_aux_dir in case $am_aux_dir in
*\ * | *\ *) *\ * | *\ *)
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
...@@ -898,7 +901,7 @@ if test x"${install_sh}" != xset; then ...@@ -898,7 +901,7 @@ if test x"${install_sh}" != xset; then
fi fi
AC_SUBST([install_sh])]) AC_SUBST([install_sh])])
# Copyright (C) 2003-2013 Free Software Foundation, Inc. # Copyright (C) 2003-2014 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
...@@ -919,7 +922,7 @@ AC_SUBST([am__leading_dot])]) ...@@ -919,7 +922,7 @@ AC_SUBST([am__leading_dot])])
# Check to see how 'make' treats includes. -*- Autoconf -*- # Check to see how 'make' treats includes. -*- Autoconf -*-
# Copyright (C) 2001-2013 Free Software Foundation, Inc. # Copyright (C) 2001-2014 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
...@@ -969,7 +972,7 @@ rm -f confinc confmf ...@@ -969,7 +972,7 @@ rm -f confinc confmf
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
# Copyright (C) 1997-2013 Free Software Foundation, Inc. # Copyright (C) 1997-2014 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
...@@ -1008,7 +1011,7 @@ fi ...@@ -1008,7 +1011,7 @@ fi
# Helper functions for option handling. -*- Autoconf -*- # Helper functions for option handling. -*- Autoconf -*-
# Copyright (C) 2001-2013 Free Software Foundation, Inc. # Copyright (C) 2001-2014 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
...@@ -1037,7 +1040,7 @@ AC_DEFUN([_AM_SET_OPTIONS], ...@@ -1037,7 +1040,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION], AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
# Copyright (C) 1999-2013 Free Software Foundation, Inc. # Copyright (C) 1999-2014 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
...@@ -1084,7 +1087,7 @@ AC_LANG_POP([C])]) ...@@ -1084,7 +1087,7 @@ AC_LANG_POP([C])])
# For backward compatibility. # For backward compatibility.
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
# Copyright (C) 2001-2013 Free Software Foundation, Inc. # Copyright (C) 2001-2014 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
...@@ -1103,7 +1106,7 @@ AC_DEFUN([AM_RUN_LOG], ...@@ -1103,7 +1106,7 @@ AC_DEFUN([AM_RUN_LOG],
# Check to make sure that the build environment is sane. -*- Autoconf -*- # Check to make sure that the build environment is sane. -*- Autoconf -*-
# Copyright (C) 1996-2013 Free Software Foundation, Inc. # Copyright (C) 1996-2014 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
...@@ -1184,7 +1187,7 @@ AC_CONFIG_COMMANDS_PRE( ...@@ -1184,7 +1187,7 @@ AC_CONFIG_COMMANDS_PRE(
rm -f conftest.file rm -f conftest.file
]) ])
# Copyright (C) 2009-2013 Free Software Foundation, Inc. # Copyright (C) 2009-2014 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
...@@ -1244,7 +1247,7 @@ AC_SUBST([AM_BACKSLASH])dnl ...@@ -1244,7 +1247,7 @@ AC_SUBST([AM_BACKSLASH])dnl
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
]) ])
# Copyright (C) 2001-2013 Free Software Foundation, Inc. # Copyright (C) 2001-2014 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
...@@ -1272,7 +1275,7 @@ fi ...@@ -1272,7 +1275,7 @@ fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])]) AC_SUBST([INSTALL_STRIP_PROGRAM])])
# Copyright (C) 2006-2013 Free Software Foundation, Inc. # Copyright (C) 2006-2014 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
...@@ -1291,7 +1294,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) ...@@ -1291,7 +1294,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*- # Check how to create a tarball. -*- Autoconf -*-
# Copyright (C) 2004-2013 Free Software Foundation, Inc. # Copyright (C) 2004-2014 Free Software Foundation, Inc.
# #
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
me=ar-lib me=ar-lib
scriptversion=2012-03-01.08; # UTC scriptversion=2012-03-01.08; # UTC
# Copyright (C) 2010-2013 Free Software Foundation, Inc. # Copyright (C) 2010-2014 Free Software Foundation, Inc.
# Written by Peter Rosin <peda@lysator.liu.se>. # Written by Peter Rosin <peda@lysator.liu.se>.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
scriptversion=2012-10-14.11; # UTC scriptversion=2012-10-14.11; # UTC
# Copyright (C) 1999-2013 Free Software Foundation, Inc. # Copyright (C) 1999-2014 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>. # Written by Tom Tromey <tromey@cygnus.com>.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
......
#! /bin/sh #! /bin/sh
# Attempt to guess a canonical system name. # Attempt to guess a canonical system name.
# Copyright 1992-2013 Free Software Foundation, Inc. # Copyright 1992-2014 Free Software Foundation, Inc.
timestamp='2013-11-29' timestamp='2014-11-04'
# This file is free software; you can redistribute it and/or modify it # This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by # under the terms of the GNU General Public License as published by
...@@ -24,12 +24,12 @@ timestamp='2013-11-29' ...@@ -24,12 +24,12 @@ timestamp='2013-11-29'
# program. This Exception is an additional permission under section 7 # program. This Exception is an additional permission under section 7
# of the GNU General Public License, version 3 ("GPLv3"). # of the GNU General Public License, version 3 ("GPLv3").
# #
# Originally written by Per Bothner. # Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
# #
# You can get the latest version of this script from: # You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
# #
# Please send patches with a ChangeLog entry to config-patches@gnu.org. # Please send patches to <config-patches@gnu.org>.
me=`echo "$0" | sed -e 's,.*/,,'` me=`echo "$0" | sed -e 's,.*/,,'`
...@@ -50,7 +50,7 @@ version="\ ...@@ -50,7 +50,7 @@ version="\
GNU config.guess ($timestamp) GNU config.guess ($timestamp)
Originally written by Per Bothner. Originally written by Per Bothner.
Copyright 1992-2013 Free Software Foundation, Inc. Copyright 1992-2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
...@@ -149,7 +149,7 @@ Linux|GNU|GNU/*) ...@@ -149,7 +149,7 @@ Linux|GNU|GNU/*)
LIBC=gnu LIBC=gnu
#endif #endif
EOF EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
;; ;;
esac esac
...@@ -579,8 +579,9 @@ EOF ...@@ -579,8 +579,9 @@ EOF
else else
IBM_ARCH=powerpc IBM_ARCH=powerpc
fi fi
if [ -x /usr/bin/oslevel ] ; then if [ -x /usr/bin/lslpp ] ; then
IBM_REV=`/usr/bin/oslevel` IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
else else
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
fi fi
...@@ -826,7 +827,7 @@ EOF ...@@ -826,7 +827,7 @@ EOF
*:MINGW*:*) *:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32 echo ${UNAME_MACHINE}-pc-mingw32
exit ;; exit ;;
i*:MSYS*:*) *:MSYS*:*)
echo ${UNAME_MACHINE}-pc-msys echo ${UNAME_MACHINE}-pc-msys
exit ;; exit ;;
i*:windows32*:*) i*:windows32*:*)
...@@ -969,10 +970,10 @@ EOF ...@@ -969,10 +970,10 @@ EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;; ;;
or1k:Linux:*:*) openrisc*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC} echo or1k-unknown-linux-${LIBC}
exit ;; exit ;;
or32:Linux:*:*) or32:Linux:*:* | or1k*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC} echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;; exit ;;
padre:Linux:*:*) padre:Linux:*:*)
...@@ -1371,154 +1372,6 @@ EOF ...@@ -1371,154 +1372,6 @@ EOF
exit ;; exit ;;
esac esac
eval $set_cc_for_build
cat >$dummy.c <<EOF
#ifdef _SEQUENT_
# include <sys/types.h>
# include <sys/utsname.h>
#endif
main ()
{
#if defined (sony)
#if defined (MIPSEB)
/* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
I don't know.... */
printf ("mips-sony-bsd\n"); exit (0);
#else
#include <sys/param.h>
printf ("m68k-sony-newsos%s\n",
#ifdef NEWSOS4
"4"
#else
""
#endif
); exit (0);
#endif
#endif
#if defined (__arm) && defined (__acorn) && defined (__unix)
printf ("arm-acorn-riscix\n"); exit (0);
#endif
#if defined (hp300) && !defined (hpux)
printf ("m68k-hp-bsd\n"); exit (0);
#endif
#if defined (NeXT)
#if !defined (__ARCHITECTURE__)
#define __ARCHITECTURE__ "m68k"
#endif
int version;
version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
if (version < 4)
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
else
printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
exit (0);
#endif
#if defined (MULTIMAX) || defined (n16)
#if defined (UMAXV)
printf ("ns32k-encore-sysv\n"); exit (0);
#else
#if defined (CMU)
printf ("ns32k-encore-mach\n"); exit (0);
#else
printf ("ns32k-encore-bsd\n"); exit (0);
#endif
#endif
#endif
#if defined (__386BSD__)
printf ("i386-pc-bsd\n"); exit (0);
#endif
#if defined (sequent)
#if defined (i386)
printf ("i386-sequent-dynix\n"); exit (0);
#endif
#if defined (ns32000)
printf ("ns32k-sequent-dynix\n"); exit (0);
#endif
#endif
#if defined (_SEQUENT_)
struct utsname un;
uname(&un);
if (strncmp(un.version, "V2", 2) == 0) {
printf ("i386-sequent-ptx2\n"); exit (0);
}
if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
printf ("i386-sequent-ptx1\n"); exit (0);
}
printf ("i386-sequent-ptx\n"); exit (0);
#endif
#if defined (vax)
# if !defined (ultrix)
# include <sys/param.h>
# if defined (BSD)
# if BSD == 43
printf ("vax-dec-bsd4.3\n"); exit (0);
# else
# if BSD == 199006
printf ("vax-dec-bsd4.3reno\n"); exit (0);
# else
printf ("vax-dec-bsd\n"); exit (0);
# endif
# endif
# else
printf ("vax-dec-bsd\n"); exit (0);
# endif
# else
printf ("vax-dec-ultrix\n"); exit (0);
# endif
#endif
#if defined (alliant) && defined (i860)
printf ("i860-alliant-bsd\n"); exit (0);
#endif
exit (1);
}
EOF
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
{ echo "$SYSTEM_NAME"; exit; }
# Apollos put the system type in the environment.
test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
# Convex versions that predate uname can use getsysinfo(1)
if [ -x /usr/convex/getsysinfo ]
then
case `getsysinfo -f cpu_type` in
c1*)
echo c1-convex-bsd
exit ;;
c2*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
exit ;;
c34*)
echo c34-convex-bsd
exit ;;
c38*)
echo c38-convex-bsd
exit ;;
c4*)
echo c4-convex-bsd
exit ;;
esac
fi
cat >&2 <<EOF cat >&2 <<EOF
$0: unable to guess system type $0: unable to guess system type
......
...@@ -162,8 +162,7 @@ sure both macros are undefined; an emulation function will then be used. */ ...@@ -162,8 +162,7 @@ sure both macros are undefined; an emulation function will then be used. */
#define LINK_SIZE 2 #define LINK_SIZE 2
#endif #endif
/* Define to the sub-directory in which libtool stores uninstalled libraries. /* Define to the sub-directory where libtool stores uninstalled libraries. */
*/
/* This is ignored unless you are using libtool. */ /* This is ignored unless you are using libtool. */
#ifndef LT_OBJDIR #ifndef LT_OBJDIR
#define LT_OBJDIR ".libs/" #define LT_OBJDIR ".libs/"
...@@ -236,7 +235,7 @@ sure both macros are undefined; an emulation function will then be used. */ ...@@ -236,7 +235,7 @@ sure both macros are undefined; an emulation function will then be used. */
#define PACKAGE_NAME "PCRE" #define PACKAGE_NAME "PCRE"
/* Define to the full name and version of this package. */ /* Define to the full name and version of this package. */
#define PACKAGE_STRING "PCRE 8.36" #define PACKAGE_STRING "PCRE 8.37"
/* Define to the one symbol short name of this package. */ /* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "pcre" #define PACKAGE_TARNAME "pcre"
...@@ -245,7 +244,7 @@ sure both macros are undefined; an emulation function will then be used. */ ...@@ -245,7 +244,7 @@ sure both macros are undefined; an emulation function will then be used. */
#define PACKAGE_URL "" #define PACKAGE_URL ""
/* Define to the version of this package. */ /* Define to the version of this package. */
#define PACKAGE_VERSION "8.36" #define PACKAGE_VERSION "8.37"
/* The value of PARENS_NEST_LIMIT specifies the maximum depth of nested /* The value of PARENS_NEST_LIMIT specifies the maximum depth of nested
parentheses (of any kind) in a pattern. This limits the amount of system parentheses (of any kind) in a pattern. This limits the amount of system
...@@ -337,7 +336,7 @@ sure both macros are undefined; an emulation function will then be used. */ ...@@ -337,7 +336,7 @@ sure both macros are undefined; an emulation function will then be used. */
/* #undef SUPPORT_VALGRIND */ /* #undef SUPPORT_VALGRIND */
/* Version number of package */ /* Version number of package */
#define VERSION "8.36" #define VERSION "8.37"
/* Define to empty if `const' does not conform to ANSI C. */ /* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */ /* #undef const */
......
...@@ -160,8 +160,7 @@ sure both macros are undefined; an emulation function will then be used. */ ...@@ -160,8 +160,7 @@ sure both macros are undefined; an emulation function will then be used. */
for longer patterns in extreme cases. */ for longer patterns in extreme cases. */
#undef LINK_SIZE #undef LINK_SIZE
/* Define to the sub-directory in which libtool stores uninstalled libraries. /* Define to the sub-directory where libtool stores uninstalled libraries. */
*/
#undef LT_OBJDIR #undef LT_OBJDIR
/* The value of MATCH_LIMIT determines the default number of times the /* The value of MATCH_LIMIT determines the default number of times the
......
#! /bin/sh #! /bin/sh
# Configuration validation subroutine script. # Configuration validation subroutine script.
# Copyright 1992-2013 Free Software Foundation, Inc. # Copyright 1992-2014 Free Software Foundation, Inc.
timestamp='2013-10-01' timestamp='2014-12-03'
# This file is free software; you can redistribute it and/or modify it # This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by # under the terms of the GNU General Public License as published by
...@@ -25,7 +25,7 @@ timestamp='2013-10-01' ...@@ -25,7 +25,7 @@ timestamp='2013-10-01'
# of the GNU General Public License, version 3 ("GPLv3"). # of the GNU General Public License, version 3 ("GPLv3").
# Please send patches with a ChangeLog entry to config-patches@gnu.org. # Please send patches to <config-patches@gnu.org>.
# #
# Configuration subroutine to validate and canonicalize a configuration type. # Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument. # Supply the specified configuration type as an argument.
...@@ -68,7 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>." ...@@ -68,7 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\ version="\
GNU config.sub ($timestamp) GNU config.sub ($timestamp)
Copyright 1992-2013 Free Software Foundation, Inc. Copyright 1992-2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
...@@ -283,8 +283,10 @@ case $basic_machine in ...@@ -283,8 +283,10 @@ case $basic_machine in
| mips64vr5900 | mips64vr5900el \ | mips64vr5900 | mips64vr5900el \
| mipsisa32 | mipsisa32el \ | mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \ | mipsisa32r2 | mipsisa32r2el \
| mipsisa32r6 | mipsisa32r6el \
| mipsisa64 | mipsisa64el \ | mipsisa64 | mipsisa64el \
| mipsisa64r2 | mipsisa64r2el \ | mipsisa64r2 | mipsisa64r2el \
| mipsisa64r6 | mipsisa64r6el \
| mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \ | mipsisa64sr71k | mipsisa64sr71kel \
| mipsr5900 | mipsr5900el \ | mipsr5900 | mipsr5900el \
...@@ -296,11 +298,11 @@ case $basic_machine in ...@@ -296,11 +298,11 @@ case $basic_machine in
| nds32 | nds32le | nds32be \ | nds32 | nds32le | nds32be \
| nios | nios2 | nios2eb | nios2el \ | nios | nios2 | nios2eb | nios2el \
| ns16k | ns32k \ | ns16k | ns32k \
| open8 \ | open8 | or1k | or1knd | or32 \
| or1k | or32 \
| pdp10 | pdp11 | pj | pjl \ | pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \ | powerpc | powerpc64 | powerpc64le | powerpcle \
| pyramid \ | pyramid \
| riscv32 | riscv64 \
| rl78 | rx \ | rl78 | rx \
| score \ | score \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
...@@ -311,6 +313,7 @@ case $basic_machine in ...@@ -311,6 +313,7 @@ case $basic_machine in
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| ubicom32 \ | ubicom32 \
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
| visium \
| we32k \ | we32k \
| x86 | xc16x | xstormy16 | xtensa \ | x86 | xc16x | xstormy16 | xtensa \
| z8k | z80) | z8k | z80)
...@@ -325,6 +328,9 @@ case $basic_machine in ...@@ -325,6 +328,9 @@ case $basic_machine in
c6x) c6x)
basic_machine=tic6x-unknown basic_machine=tic6x-unknown
;; ;;
leon|leon[3-9])
basic_machine=sparc-$basic_machine
;;
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
basic_machine=$basic_machine-unknown basic_machine=$basic_machine-unknown
os=-none os=-none
...@@ -402,8 +408,10 @@ case $basic_machine in ...@@ -402,8 +408,10 @@ case $basic_machine in
| mips64vr5900-* | mips64vr5900el-* \ | mips64vr5900-* | mips64vr5900el-* \
| mipsisa32-* | mipsisa32el-* \ | mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa32r2-* | mipsisa32r2el-* \
| mipsisa32r6-* | mipsisa32r6el-* \
| mipsisa64-* | mipsisa64el-* \ | mipsisa64-* | mipsisa64el-* \
| mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64r2-* | mipsisa64r2el-* \
| mipsisa64r6-* | mipsisa64r6el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipsr5900-* | mipsr5900el-* \ | mipsr5900-* | mipsr5900el-* \
...@@ -415,6 +423,7 @@ case $basic_machine in ...@@ -415,6 +423,7 @@ case $basic_machine in
| nios-* | nios2-* | nios2eb-* | nios2el-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \
| none-* | np1-* | ns16k-* | ns32k-* \ | none-* | np1-* | ns16k-* | ns32k-* \
| open8-* \ | open8-* \
| or1k*-* \
| orion-* \ | orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
...@@ -432,6 +441,7 @@ case $basic_machine in ...@@ -432,6 +441,7 @@ case $basic_machine in
| ubicom32-* \ | ubicom32-* \
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
| vax-* \ | vax-* \
| visium-* \
| we32k-* \ | we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \ | xstormy16-* | xtensa*-* \
...@@ -769,6 +779,9 @@ case $basic_machine in ...@@ -769,6 +779,9 @@ case $basic_machine in
basic_machine=m68k-isi basic_machine=m68k-isi
os=-sysv os=-sysv
;; ;;
leon-*|leon[3-9]-*)
basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
;;
m68knommu) m68knommu)
basic_machine=m68k-unknown basic_machine=m68k-unknown
os=-linux os=-linux
...@@ -824,6 +837,10 @@ case $basic_machine in ...@@ -824,6 +837,10 @@ case $basic_machine in
basic_machine=powerpc-unknown basic_machine=powerpc-unknown
os=-morphos os=-morphos
;; ;;
moxiebox)
basic_machine=moxie-unknown
os=-moxiebox
;;
msdos) msdos)
basic_machine=i386-pc basic_machine=i386-pc
os=-msdos os=-msdos
...@@ -1369,14 +1386,14 @@ case $os in ...@@ -1369,14 +1386,14 @@ case $os in
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
# Remember, each alternative MUST END IN *, to match a version number. # Remember, each alternative MUST END IN *, to match a version number.
;; ;;
-qnx*) -qnx*)
...@@ -1594,9 +1611,6 @@ case $basic_machine in ...@@ -1594,9 +1611,6 @@ case $basic_machine in
mips*-*) mips*-*)
os=-elf os=-elf
;; ;;
or1k-*)
os=-elf
;;
or32-*) or32-*)
os=-coff os=-coff
;; ;;
......
This diff is collapsed.
...@@ -9,17 +9,17 @@ dnl The PCRE_PRERELEASE feature is for identifying release candidates. It might ...@@ -9,17 +9,17 @@ dnl The PCRE_PRERELEASE feature is for identifying release candidates. It might
dnl be defined as -RC2, for example. For real releases, it should be empty. dnl be defined as -RC2, for example. For real releases, it should be empty.
m4_define(pcre_major, [8]) m4_define(pcre_major, [8])
m4_define(pcre_minor, [36]) m4_define(pcre_minor, [37])
m4_define(pcre_prerelease, []) m4_define(pcre_prerelease, [])
m4_define(pcre_date, [2014-09-26]) m4_define(pcre_date, [2015-04-28])
# NOTE: The CMakeLists.txt file searches for the above variables in the first # NOTE: The CMakeLists.txt file searches for the above variables in the first
# 50 lines of this file. Please update that if the variables above are moved. # 50 lines of this file. Please update that if the variables above are moved.
# Libtool shared library interface versions (current:revision:age) # Libtool shared library interface versions (current:revision:age)
m4_define(libpcre_version, [3:4:2]) m4_define(libpcre_version, [3:5:2])
m4_define(libpcre16_version, [2:4:2]) m4_define(libpcre16_version, [2:5:2])
m4_define(libpcre32_version, [0:4:0]) m4_define(libpcre32_version, [0:5:0])
m4_define(libpcreposix_version, [0:3:0]) m4_define(libpcreposix_version, [0:3:0])
m4_define(libpcrecpp_version, [0:1:0]) m4_define(libpcrecpp_version, [0:1:0])
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
scriptversion=2013-05-30.07; # UTC scriptversion=2013-05-30.07; # UTC
# Copyright (C) 1999-2013 Free Software Foundation, Inc. # Copyright (C) 1999-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
......
Building PCRE without using autotools Building PCRE without using autotools
------------------------------------- -------------------------------------
NOTE: This document relates to PCRE releases that use the original API, with
library names libpcre, libpcre16, and libpcre32. January 2015 saw the first
release of a new API, known as PCRE2, with release numbers starting at 10.00
and library names libpcre2-8, libpcre2-16, and libpcre2-32. The old libraries
(now called PCRE1) are still being maintained for bug fixes, but there will be
no new development. New projects are advised to use the new PCRE2 libraries.
This document contains the following sections: This document contains the following sections:
General General
...@@ -761,4 +769,4 @@ There is also a mirror here: ...@@ -761,4 +769,4 @@ There is also a mirror here:
http://www.vsoft-software.com/downloads.html http://www.vsoft-software.com/downloads.html
========================== ==========================
Last Updated: 14 May 2013 Last Updated: 10 February 2015
README file for PCRE (Perl-compatible regular expression library) README file for PCRE (Perl-compatible regular expression library)
----------------------------------------------------------------- -----------------------------------------------------------------
The latest release of PCRE is always available in three alternative formats NOTE: This set of files relates to PCRE releases that use the original API,
with library names libpcre, libpcre16, and libpcre32. January 2015 saw the
first release of a new API, known as PCRE2, with release numbers starting at
10.00 and library names libpcre2-8, libpcre2-16, and libpcre2-32. The old
libraries (now called PCRE1) are still being maintained for bug fixes, but
there will be no new development. New projects are advised to use the new PCRE2
libraries.
The latest release of PCRE1 is always available in three alternative formats
from: from:
ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-xxx.tar.gz ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-xxx.tar.gz
...@@ -990,4 +999,4 @@ pcre_xxx, one with the name pcre16_xx, and a third with the name pcre32_xxx. ...@@ -990,4 +999,4 @@ pcre_xxx, one with the name pcre16_xx, and a third with the name pcre32_xxx.
Philip Hazel Philip Hazel
Email local part: ph10 Email local part: ph10
Email domain: cam.ac.uk Email domain: cam.ac.uk
Last updated: 24 October 2014 Last updated: 10 February 2015
...@@ -13,13 +13,24 @@ from the original man page. If there is any nonsense in it, please consult the ...@@ -13,13 +13,24 @@ from the original man page. If there is any nonsense in it, please consult the
man page, in case the conversion went wrong. man page, in case the conversion went wrong.
<br> <br>
<ul> <ul>
<li><a name="TOC1" href="#SEC1">INTRODUCTION</a> <li><a name="TOC1" href="#SEC1">PLEASE TAKE NOTE</a>
<li><a name="TOC2" href="#SEC2">SECURITY CONSIDERATIONS</a> <li><a name="TOC2" href="#SEC2">INTRODUCTION</a>
<li><a name="TOC3" href="#SEC3">USER DOCUMENTATION</a> <li><a name="TOC3" href="#SEC3">SECURITY CONSIDERATIONS</a>
<li><a name="TOC4" href="#SEC4">AUTHOR</a> <li><a name="TOC4" href="#SEC4">USER DOCUMENTATION</a>
<li><a name="TOC5" href="#SEC5">REVISION</a> <li><a name="TOC5" href="#SEC5">AUTHOR</a>
<li><a name="TOC6" href="#SEC6">REVISION</a>
</ul> </ul>
<br><a name="SEC1" href="#TOC1">INTRODUCTION</a><br> <br><a name="SEC1" href="#TOC1">PLEASE TAKE NOTE</a><br>
<P>
This document relates to PCRE releases that use the original API,
with library names libpcre, libpcre16, and libpcre32. January 2015 saw the
first release of a new API, known as PCRE2, with release numbers starting at
10.00 and library names libpcre2-8, libpcre2-16, and libpcre2-32. The old
libraries (now called PCRE1) are still being maintained for bug fixes, but
there will be no new development. New projects are advised to use the new PCRE2
libraries.
</P>
<br><a name="SEC2" href="#TOC1">INTRODUCTION</a><br>
<P> <P>
The PCRE library is a set of functions that implement regular expression The PCRE library is a set of functions that implement regular expression
pattern matching using the same syntax and semantics as Perl, with just a few pattern matching using the same syntax and semantics as Perl, with just a few
...@@ -115,7 +126,7 @@ clashes. In some environments, it is possible to control which external symbols ...@@ -115,7 +126,7 @@ clashes. In some environments, it is possible to control which external symbols
are exported when a shared library is built, and in these cases the are exported when a shared library is built, and in these cases the
undocumented symbols are not exported. undocumented symbols are not exported.
</P> </P>
<br><a name="SEC2" href="#TOC1">SECURITY CONSIDERATIONS</a><br> <br><a name="SEC3" href="#TOC1">SECURITY CONSIDERATIONS</a><br>
<P> <P>
If you are using PCRE in a non-UTF application that permits users to supply If you are using PCRE in a non-UTF application that permits users to supply
arbitrary patterns for compilation, you should be aware of a feature that arbitrary patterns for compilation, you should be aware of a feature that
...@@ -149,7 +160,7 @@ against this: see the PCRE_EXTRA_MATCH_LIMIT feature in the ...@@ -149,7 +160,7 @@ against this: see the PCRE_EXTRA_MATCH_LIMIT feature in the
<a href="pcreapi.html"><b>pcreapi</b></a> <a href="pcreapi.html"><b>pcreapi</b></a>
page. page.
</P> </P>
<br><a name="SEC3" href="#TOC1">USER DOCUMENTATION</a><br> <br><a name="SEC4" href="#TOC1">USER DOCUMENTATION</a><br>
<P> <P>
The user documentation for PCRE comprises a number of different sections. In The user documentation for PCRE comprises a number of different sections. In
the "man" format, each of these is a separate "man page". In the HTML format, the "man" format, each of these is a separate "man page". In the HTML format,
...@@ -188,7 +199,7 @@ follows: ...@@ -188,7 +199,7 @@ follows:
In the "man" and HTML formats, there is also a short page for each C library In the "man" and HTML formats, there is also a short page for each C library
function, listing its arguments and results. function, listing its arguments and results.
</P> </P>
<br><a name="SEC4" href="#TOC1">AUTHOR</a><br> <br><a name="SEC5" href="#TOC1">AUTHOR</a><br>
<P> <P>
Philip Hazel Philip Hazel
<br> <br>
...@@ -202,11 +213,11 @@ Putting an actual email address here seems to have been a spam magnet, so I've ...@@ -202,11 +213,11 @@ Putting an actual email address here seems to have been a spam magnet, so I've
taken it away. If you want to email me, use my two initials, followed by the taken it away. If you want to email me, use my two initials, followed by the
two digits 10, at the domain cam.ac.uk. two digits 10, at the domain cam.ac.uk.
</P> </P>
<br><a name="SEC5" href="#TOC1">REVISION</a><br> <br><a name="SEC6" href="#TOC1">REVISION</a><br>
<P> <P>
Last updated: 08 January 2014 Last updated: 10 February 2015
<br> <br>
Copyright &copy; 1997-2014 University of Cambridge. Copyright &copy; 1997-2015 University of Cambridge.
<br> <br>
<p> <p>
Return to the <a href="index.html">PCRE index page</a>. Return to the <a href="index.html">PCRE index page</a>.
......
.TH PCRE 3 "08 January 2014" "PCRE 8.35" .TH PCRE 3 "10 February 2015" "PCRE 8.37"
.SH NAME .SH NAME
PCRE - Perl-compatible regular expressions PCRE - Perl-compatible regular expressions (original API)
.SH "PLEASE TAKE NOTE"
.rs
.sp
This document relates to PCRE releases that use the original API,
with library names libpcre, libpcre16, and libpcre32. January 2015 saw the
first release of a new API, known as PCRE2, with release numbers starting at
10.00 and library names libpcre2-8, libpcre2-16, and libpcre2-32. The old
libraries (now called PCRE1) are still being maintained for bug fixes, but
there will be no new development. New projects are advised to use the new PCRE2
libraries.
.
.
.SH INTRODUCTION .SH INTRODUCTION
.rs .rs
.sp .sp
...@@ -213,6 +225,6 @@ two digits 10, at the domain cam.ac.uk. ...@@ -213,6 +225,6 @@ two digits 10, at the domain cam.ac.uk.
.rs .rs
.sp .sp
.nf .nf
Last updated: 08 January 2014 Last updated: 10 February 2015
Copyright (c) 1997-2014 University of Cambridge. Copyright (c) 1997-2015 University of Cambridge.
.fi .fi
...@@ -13,7 +13,18 @@ PCRE(3) Library Functions Manual PCRE(3) ...@@ -13,7 +13,18 @@ PCRE(3) Library Functions Manual PCRE(3)
NAME NAME
PCRE - Perl-compatible regular expressions PCRE - Perl-compatible regular expressions (original API)
PLEASE TAKE NOTE
This document relates to PCRE releases that use the original API, with
library names libpcre, libpcre16, and libpcre32. January 2015 saw the
first release of a new API, known as PCRE2, with release numbers start-
ing at 10.00 and library names libpcre2-8, libpcre2-16, and
libpcre2-32. The old libraries (now called PCRE1) are still being main-
tained for bug fixes, but there will be no new development. New
projects are advised to use the new PCRE2 libraries.
INTRODUCTION INTRODUCTION
...@@ -179,8 +190,8 @@ AUTHOR ...@@ -179,8 +190,8 @@ AUTHOR
REVISION REVISION
Last updated: 08 January 2014 Last updated: 10 February 2015
Copyright (c) 1997-2014 University of Cambridge. Copyright (c) 1997-2015 University of Cambridge.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
......
This diff is collapsed.
...@@ -9,4 +9,5 @@ Name: libpcre ...@@ -9,4 +9,5 @@ Name: libpcre
Description: PCRE - Perl compatible regular expressions C library with 8 bit character support Description: PCRE - Perl compatible regular expressions C library with 8 bit character support
Version: @PACKAGE_VERSION@ Version: @PACKAGE_VERSION@
Libs: -L${libdir} -lpcre Libs: -L${libdir} -lpcre
Libs.private: @PTHREAD_CFLAGS@ @PTHREAD_LIBS@
Cflags: -I${includedir} @PCRE_STATIC_CFLAG@ Cflags: -I${includedir} @PCRE_STATIC_CFLAG@
...@@ -9,4 +9,5 @@ Name: libpcre16 ...@@ -9,4 +9,5 @@ Name: libpcre16
Description: PCRE - Perl compatible regular expressions C library with 16 bit character support Description: PCRE - Perl compatible regular expressions C library with 16 bit character support
Version: @PACKAGE_VERSION@ Version: @PACKAGE_VERSION@
Libs: -L${libdir} -lpcre16 Libs: -L${libdir} -lpcre16
Libs.private: @PTHREAD_CFLAGS@ @PTHREAD_LIBS@
Cflags: -I${includedir} @PCRE_STATIC_CFLAG@ Cflags: -I${includedir} @PCRE_STATIC_CFLAG@
...@@ -9,4 +9,5 @@ Name: libpcre32 ...@@ -9,4 +9,5 @@ Name: libpcre32
Description: PCRE - Perl compatible regular expressions C library with 32 bit character support Description: PCRE - Perl compatible regular expressions C library with 32 bit character support
Version: @PACKAGE_VERSION@ Version: @PACKAGE_VERSION@
Libs: -L${libdir} -lpcre32 Libs: -L${libdir} -lpcre32
Libs.private: @PTHREAD_CFLAGS@ @PTHREAD_LIBS@
Cflags: -I${includedir} @PCRE_STATIC_CFLAG@ Cflags: -I${includedir} @PCRE_STATIC_CFLAG@
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
# #
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
# Foundation, Inc.
# Written by Gary V. Vaughan, 2004 # Written by Gary V. Vaughan, 2004
# #
# This file is free software; the Free Software Foundation gives # This file is free software; the Free Software Foundation gives
...@@ -33,7 +34,7 @@ m4_define([_lt_join], ...@@ -33,7 +34,7 @@ m4_define([_lt_join],
# ------------ # ------------
# Manipulate m4 lists. # Manipulate m4 lists.
# These macros are necessary as long as will still need to support # These macros are necessary as long as will still need to support
# Autoconf-2.59 which quotes differently. # Autoconf-2.59, which quotes differently.
m4_define([lt_car], [[$1]]) m4_define([lt_car], [[$1]])
m4_define([lt_cdr], m4_define([lt_cdr],
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
...@@ -44,7 +45,7 @@ m4_define([lt_unquote], $1) ...@@ -44,7 +45,7 @@ m4_define([lt_unquote], $1)
# lt_append(MACRO-NAME, STRING, [SEPARATOR]) # lt_append(MACRO-NAME, STRING, [SEPARATOR])
# ------------------------------------------ # ------------------------------------------
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
# Note that neither SEPARATOR nor STRING are expanded; they are appended # Note that neither SEPARATOR nor STRING are expanded; they are appended
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
# No SEPARATOR is output if MACRO-NAME was previously undefined (different # No SEPARATOR is output if MACRO-NAME was previously undefined (different
......
# ltversion.m4 -- version numbers -*- Autoconf -*- # ltversion.m4 -- version numbers -*- Autoconf -*-
# #
# Copyright (C) 2004 Free Software Foundation, Inc. # Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
# Written by Scott James Remnant, 2004 # Written by Scott James Remnant, 2004
# #
# This file is free software; the Free Software Foundation gives # This file is free software; the Free Software Foundation gives
...@@ -9,15 +9,15 @@ ...@@ -9,15 +9,15 @@
# @configure_input@ # @configure_input@
# serial 3337 ltversion.m4 # serial 4179 ltversion.m4
# This file is part of GNU Libtool # This file is part of GNU Libtool
m4_define([LT_PACKAGE_VERSION], [2.4.2]) m4_define([LT_PACKAGE_VERSION], [2.4.6])
m4_define([LT_PACKAGE_REVISION], [1.3337]) m4_define([LT_PACKAGE_REVISION], [2.4.6])
AC_DEFUN([LTVERSION_VERSION], AC_DEFUN([LTVERSION_VERSION],
[macro_version='2.4.2' [macro_version='2.4.6'
macro_revision='1.3337' macro_revision='2.4.6'
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
_LT_DECL(, macro_revision, 0) _LT_DECL(, macro_revision, 0)
]) ])
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
# #
# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. # Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
# Foundation, Inc.
# Written by Scott James Remnant, 2004. # Written by Scott James Remnant, 2004.
# #
# This file is free software; the Free Software Foundation gives # This file is free software; the Free Software Foundation gives
...@@ -11,7 +12,7 @@ ...@@ -11,7 +12,7 @@
# These exist entirely to fool aclocal when bootstrapping libtool. # These exist entirely to fool aclocal when bootstrapping libtool.
# #
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
# which have later been changed to m4_define as they aren't part of the # which have later been changed to m4_define as they aren't part of the
# exported API, or moved to Autoconf or Automake where they belong. # exported API, or moved to Autoconf or Automake where they belong.
# #
...@@ -25,7 +26,7 @@ ...@@ -25,7 +26,7 @@
# included after everything else. This provides aclocal with the # included after everything else. This provides aclocal with the
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
# because those macros already exist, or will be overwritten later. # because those macros already exist, or will be overwritten later.
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
# #
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
# Yes, that means every name once taken will need to remain here until # Yes, that means every name once taken will need to remain here until
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
scriptversion=2013-10-28.13; # UTC scriptversion=2013-10-28.13; # UTC
# Copyright (C) 1996-2013 Free Software Foundation, Inc. # Copyright (C) 1996-2014 Free Software Foundation, Inc.
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
......
...@@ -42,9 +42,9 @@ POSSIBILITY OF SUCH DAMAGE. ...@@ -42,9 +42,9 @@ POSSIBILITY OF SUCH DAMAGE.
/* The current PCRE version information. */ /* The current PCRE version information. */
#define PCRE_MAJOR 8 #define PCRE_MAJOR 8
#define PCRE_MINOR 36 #define PCRE_MINOR 37
#define PCRE_PRERELEASE #define PCRE_PRERELEASE
#define PCRE_DATE 2014-09-26 #define PCRE_DATE 2015-04-28
/* When an application links to a PCRE DLL in Windows, the symbols that are /* 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 imported have to be identified as such. When building PCRE, the appropriate
......
This diff is collapsed.
...@@ -2736,9 +2736,10 @@ for (;;) ...@@ -2736,9 +2736,10 @@ for (;;)
condcode == OP_DNRREF) condcode == OP_DNRREF)
return PCRE_ERROR_DFA_UCOND; return PCRE_ERROR_DFA_UCOND;
/* The DEFINE condition is always false */ /* The DEFINE condition is always false, and the assertion (?!) is
converted to OP_FAIL. */
if (condcode == OP_DEF) if (condcode == OP_DEF || condcode == OP_FAIL)
{ ADD_ACTIVE(state_offset + codelink + LINK_SIZE + 1, 0); } { ADD_ACTIVE(state_offset + codelink + LINK_SIZE + 1, 0); }
/* The only supported version of OP_RREF is for the value RREF_ANY, /* The only supported version of OP_RREF is for the value RREF_ANY,
......
This diff is collapsed.
...@@ -2446,6 +2446,7 @@ typedef struct compile_data { ...@@ -2446,6 +2446,7 @@ typedef struct compile_data {
BOOL had_pruneorskip; /* (*PRUNE) or (*SKIP) encountered */ BOOL had_pruneorskip; /* (*PRUNE) or (*SKIP) encountered */
BOOL check_lookbehind; /* Lookbehinds need later checking */ BOOL check_lookbehind; /* Lookbehinds need later checking */
BOOL dupnames; /* Duplicate names exist */ BOOL dupnames; /* Duplicate names exist */
BOOL iscondassert; /* Next assert is a condition */
int nltype; /* Newline type */ int nltype; /* Newline type */
int nllen; /* Newline string length */ int nllen; /* Newline string length */
pcre_uchar nl[4]; /* Newline string when fixed length */ pcre_uchar nl[4]; /* Newline string when fixed length */
...@@ -2459,6 +2460,13 @@ typedef struct branch_chain { ...@@ -2459,6 +2460,13 @@ typedef struct branch_chain {
pcre_uchar *current_branch; pcre_uchar *current_branch;
} branch_chain; } branch_chain;
/* Structure for mutual recursion detection. */
typedef struct recurse_check {
struct recurse_check *prev;
const pcre_uchar *group;
} recurse_check;
/* Structure for items in a linked list that represents an explicit recursive /* Structure for items in a linked list that represents an explicit recursive
call within the pattern; used by pcre_exec(). */ call within the pattern; used by pcre_exec(). */
......
This diff is collapsed.
...@@ -51,8 +51,6 @@ POSSIBILITY OF SUCH DAMAGE. ...@@ -51,8 +51,6 @@ POSSIBILITY OF SUCH DAMAGE.
#include "pcre_internal.h" #include "pcre_internal.h"
#define PCRE_BUG 0x80000000
/* /*
Letter characters: Letter characters:
\xe6\x92\xad = 0x64ad = 25773 (kanji) \xe6\x92\xad = 0x64ad = 25773 (kanji)
...@@ -69,6 +67,9 @@ POSSIBILITY OF SUCH DAMAGE. ...@@ -69,6 +67,9 @@ POSSIBILITY OF SUCH DAMAGE.
\xc3\x89 = 0xc9 = 201 (E') \xc3\x89 = 0xc9 = 201 (E')
\xc3\xa1 = 0xe1 = 225 (a') \xc3\xa1 = 0xe1 = 225 (a')
\xc3\x81 = 0xc1 = 193 (A') \xc3\x81 = 0xc1 = 193 (A')
\x53 = 0x53 = S
\x73 = 0x73 = s
\xc5\xbf = 0x17f = 383 (long S)
\xc8\xba = 0x23a = 570 \xc8\xba = 0x23a = 570
\xe2\xb1\xa5 = 0x2c65 = 11365 \xe2\xb1\xa5 = 0x2c65 = 11365
\xe1\xbd\xb8 = 0x1f78 = 8056 \xe1\xbd\xb8 = 0x1f78 = 8056
...@@ -78,6 +79,10 @@ POSSIBILITY OF SUCH DAMAGE. ...@@ -78,6 +79,10 @@ POSSIBILITY OF SUCH DAMAGE.
\xc7\x84 = 0x1c4 = 452 \xc7\x84 = 0x1c4 = 452
\xc7\x85 = 0x1c5 = 453 \xc7\x85 = 0x1c5 = 453
\xc7\x86 = 0x1c6 = 454 \xc7\x86 = 0x1c6 = 454
Caseless sets:
ucp_Armenian - \x{531}-\x{556} -> \x{561}-\x{586}
ucp_Coptic - \x{2c80}-\x{2ce3} -> caseless: XOR 0x1
ucp_Latin - \x{ff21}-\x{ff3a} -> \x{ff41]-\x{ff5a}
Mark property: Mark property:
\xcc\x8d = 0x30d = 781 \xcc\x8d = 0x30d = 781
...@@ -626,6 +631,9 @@ static struct regression_test_case regression_test_cases[] = { ...@@ -626,6 +631,9 @@ static struct regression_test_case regression_test_cases[] = {
{ MUA, 0, "(?P<Name>a)?(?P<Name2>b)?(?(Name)c|d)+?dd", "bcabcacdb bdddd" }, { MUA, 0, "(?P<Name>a)?(?P<Name2>b)?(?(Name)c|d)+?dd", "bcabcacdb bdddd" },
{ MUA, 0, "(?P<Name>a)?(?P<Name2>b)?(?(Name)c|d)+l", "ababccddabdbccd abcccl" }, { MUA, 0, "(?P<Name>a)?(?P<Name2>b)?(?(Name)c|d)+l", "ababccddabdbccd abcccl" },
{ MUA, 0, "((?:a|aa)(?(1)aaa))x", "aax" }, { MUA, 0, "((?:a|aa)(?(1)aaa))x", "aax" },
{ MUA, 0, "(?(?!)a|b)", "ab" },
{ MUA, 0, "(?(?!)a)", "ab" },
{ MUA, 0 | F_NOMATCH, "(?(?!)a|b)", "ac" },
/* Set start of match. */ /* Set start of match. */
{ MUA, 0, "(?:\\Ka)*aaaab", "aaaaaaaa aaaaaaabb" }, { MUA, 0, "(?:\\Ka)*aaaab", "aaaaaaaa aaaaaaabb" },
...@@ -944,7 +952,7 @@ static void setstack16(pcre16_extra *extra) ...@@ -944,7 +952,7 @@ static void setstack16(pcre16_extra *extra)
pcre16_assign_jit_stack(extra, callback16, getstack16()); pcre16_assign_jit_stack(extra, callback16, getstack16());
} }
#endif /* SUPPORT_PCRE8 */ #endif /* SUPPORT_PCRE16 */
#ifdef SUPPORT_PCRE32 #ifdef SUPPORT_PCRE32
static pcre32_jit_stack *stack32; static pcre32_jit_stack *stack32;
...@@ -967,7 +975,7 @@ static void setstack32(pcre32_extra *extra) ...@@ -967,7 +975,7 @@ static void setstack32(pcre32_extra *extra)
pcre32_assign_jit_stack(extra, callback32, getstack32()); pcre32_assign_jit_stack(extra, callback32, getstack32());
} }
#endif /* SUPPORT_PCRE8 */ #endif /* SUPPORT_PCRE32 */
#ifdef SUPPORT_PCRE16 #ifdef SUPPORT_PCRE16
...@@ -1177,7 +1185,7 @@ static int regression_tests(void) ...@@ -1177,7 +1185,7 @@ static int regression_tests(void)
#elif defined SUPPORT_PCRE16 #elif defined SUPPORT_PCRE16
pcre16_config(PCRE_CONFIG_UTF16, &utf); pcre16_config(PCRE_CONFIG_UTF16, &utf);
pcre16_config(PCRE_CONFIG_UNICODE_PROPERTIES, &ucp); pcre16_config(PCRE_CONFIG_UNICODE_PROPERTIES, &ucp);
#elif defined SUPPORT_PCRE16 #elif defined SUPPORT_PCRE32
pcre32_config(PCRE_CONFIG_UTF32, &utf); pcre32_config(PCRE_CONFIG_UTF32, &utf);
pcre32_config(PCRE_CONFIG_UNICODE_PROPERTIES, &ucp); pcre32_config(PCRE_CONFIG_UNICODE_PROPERTIES, &ucp);
#endif #endif
......
...@@ -70,7 +70,7 @@ Arguments: ...@@ -70,7 +70,7 @@ Arguments:
code pointer to start of group (the bracket) code pointer to start of group (the bracket)
startcode pointer to start of the whole pattern's code startcode pointer to start of the whole pattern's code
options the compiling options options the compiling options
int RECURSE depth recurses chain of recurse_check to catch mutual recursion
Returns: the minimum length Returns: the minimum length
-1 if \C in UTF-8 mode or (*ACCEPT) was encountered -1 if \C in UTF-8 mode or (*ACCEPT) was encountered
...@@ -80,12 +80,13 @@ Returns: the minimum length ...@@ -80,12 +80,13 @@ Returns: the minimum length
static int static int
find_minlength(const REAL_PCRE *re, const pcre_uchar *code, find_minlength(const REAL_PCRE *re, const pcre_uchar *code,
const pcre_uchar *startcode, int options, int recurse_depth) const pcre_uchar *startcode, int options, recurse_check *recurses)
{ {
int length = -1; int length = -1;
/* PCRE_UTF16 has the same value as PCRE_UTF8. */ /* PCRE_UTF16 has the same value as PCRE_UTF8. */
BOOL utf = (options & PCRE_UTF8) != 0; BOOL utf = (options & PCRE_UTF8) != 0;
BOOL had_recurse = FALSE; BOOL had_recurse = FALSE;
recurse_check this_recurse;
register int branchlength = 0; register int branchlength = 0;
register pcre_uchar *cc = (pcre_uchar *)code + 1 + LINK_SIZE; register pcre_uchar *cc = (pcre_uchar *)code + 1 + LINK_SIZE;
...@@ -130,7 +131,7 @@ for (;;) ...@@ -130,7 +131,7 @@ for (;;)
case OP_SBRAPOS: case OP_SBRAPOS:
case OP_ONCE: case OP_ONCE:
case OP_ONCE_NC: case OP_ONCE_NC:
d = find_minlength(re, cc, startcode, options, recurse_depth); d = find_minlength(re, cc, startcode, options, recurses);
if (d < 0) return d; if (d < 0) return d;
branchlength += d; branchlength += d;
do cc += GET(cc, 1); while (*cc == OP_ALT); do cc += GET(cc, 1); while (*cc == OP_ALT);
...@@ -393,7 +394,7 @@ for (;;) ...@@ -393,7 +394,7 @@ for (;;)
ce = cs = (pcre_uchar *)PRIV(find_bracket)(startcode, utf, GET2(slot, 0)); ce = cs = (pcre_uchar *)PRIV(find_bracket)(startcode, utf, GET2(slot, 0));
if (cs == NULL) return -2; if (cs == NULL) return -2;
do ce += GET(ce, 1); while (*ce == OP_ALT); do ce += GET(ce, 1); while (*ce == OP_ALT);
if (cc > cs && cc < ce) if (cc > cs && cc < ce) /* Simple recursion */
{ {
d = 0; d = 0;
had_recurse = TRUE; had_recurse = TRUE;
...@@ -401,8 +402,22 @@ for (;;) ...@@ -401,8 +402,22 @@ for (;;)
} }
else else
{ {
int dd = find_minlength(re, cs, startcode, options, recurse_depth); recurse_check *r = recurses;
if (dd < d) d = dd; for (r = recurses; r != NULL; r = r->prev) if (r->group == cs) break;
if (r != NULL) /* Mutual recursion */
{
d = 0;
had_recurse = TRUE;
break;
}
else
{
int dd;
this_recurse.prev = recurses;
this_recurse.group = cs;
dd = find_minlength(re, cs, startcode, options, &this_recurse);
if (dd < d) d = dd;
}
} }
slot += re->name_entry_size; slot += re->name_entry_size;
} }
...@@ -418,14 +433,26 @@ for (;;) ...@@ -418,14 +433,26 @@ for (;;)
ce = cs = (pcre_uchar *)PRIV(find_bracket)(startcode, utf, GET2(cc, 1)); ce = cs = (pcre_uchar *)PRIV(find_bracket)(startcode, utf, GET2(cc, 1));
if (cs == NULL) return -2; if (cs == NULL) return -2;
do ce += GET(ce, 1); while (*ce == OP_ALT); do ce += GET(ce, 1); while (*ce == OP_ALT);
if (cc > cs && cc < ce) if (cc > cs && cc < ce) /* Simple recursion */
{ {
d = 0; d = 0;
had_recurse = TRUE; had_recurse = TRUE;
} }
else else
{ {
d = find_minlength(re, cs, startcode, options, recurse_depth); recurse_check *r = recurses;
for (r = recurses; r != NULL; r = r->prev) if (r->group == cs) break;
if (r != NULL) /* Mutual recursion */
{
d = 0;
had_recurse = TRUE;
}
else
{
this_recurse.prev = recurses;
this_recurse.group = cs;
d = find_minlength(re, cs, startcode, options, &this_recurse);
}
} }
} }
else d = 0; else d = 0;
...@@ -474,12 +501,21 @@ for (;;) ...@@ -474,12 +501,21 @@ for (;;)
case OP_RECURSE: case OP_RECURSE:
cs = ce = (pcre_uchar *)startcode + GET(cc, 1); cs = ce = (pcre_uchar *)startcode + GET(cc, 1);
do ce += GET(ce, 1); while (*ce == OP_ALT); do ce += GET(ce, 1); while (*ce == OP_ALT);
if ((cc > cs && cc < ce) || recurse_depth > 10) if (cc > cs && cc < ce) /* Simple recursion */
had_recurse = TRUE; had_recurse = TRUE;
else else
{ {
branchlength += find_minlength(re, cs, startcode, options, recurse_check *r = recurses;
recurse_depth + 1); for (r = recurses; r != NULL; r = r->prev) if (r->group == cs) break;
if (r != NULL) /* Mutual recursion */
had_recurse = TRUE;
else
{
this_recurse.prev = recurses;
this_recurse.group = cs;
branchlength += find_minlength(re, cs, startcode, options,
&this_recurse);
}
} }
cc += 1 + LINK_SIZE; cc += 1 + LINK_SIZE;
break; break;
...@@ -1503,7 +1539,7 @@ if ((re->options & PCRE_ANCHORED) == 0 && ...@@ -1503,7 +1539,7 @@ if ((re->options & PCRE_ANCHORED) == 0 &&
/* Find the minimum length of subject string. */ /* Find the minimum length of subject string. */
switch(min = find_minlength(re, code, code, re->options, 0)) switch(min = find_minlength(re, code, code, re->options, NULL))
{ {
case -2: *errorptr = "internal error: missing capturing bracket"; return NULL; case -2: *errorptr = "internal error: missing capturing bracket"; return NULL;
case -3: *errorptr = "internal error: opcode not recognized"; return NULL; case -3: *errorptr = "internal error: opcode not recognized"; return NULL;
......
...@@ -1582,12 +1582,15 @@ while (ptr < endptr) ...@@ -1582,12 +1582,15 @@ while (ptr < endptr)
int endlinelength; int endlinelength;
int mrc = 0; int mrc = 0;
int startoffset = 0; int startoffset = 0;
int prevoffsets[2];
unsigned int options = 0; unsigned int options = 0;
BOOL match; BOOL match;
char *matchptr = ptr; char *matchptr = ptr;
char *t = ptr; char *t = ptr;
size_t length, linelength; size_t length, linelength;
prevoffsets[0] = prevoffsets[1] = -1;
/* At this point, ptr is at the start of a line. We need to find the length /* At this point, ptr is at the start of a line. We need to find the length
of the subject string to pass to pcre_exec(). In multiline mode, it is the of the subject string to pass to pcre_exec(). In multiline mode, it is the
length remainder of the data in the buffer. Otherwise, it is the length of length remainder of the data in the buffer. Otherwise, it is the length of
...@@ -1729,55 +1732,86 @@ while (ptr < endptr) ...@@ -1729,55 +1732,86 @@ while (ptr < endptr)
{ {
if (!invert) if (!invert)
{ {
if (printname != NULL) fprintf(stdout, "%s:", printname); int oldstartoffset = startoffset;
if (number) fprintf(stdout, "%d:", linenumber);
/* Handle --line-offsets */ /* It is possible, when a lookbehind assertion contains \K, for the
same string to be found again. The code below advances startoffset, but
until it is past the "bumpalong" offset that gave the match, the same
substring will be returned. The PCRE1 library does not return the
bumpalong offset, so all we can do is ignore repeated strings. (PCRE2
does this better.) */
if (line_offsets) if (prevoffsets[0] != offsets[0] || prevoffsets[1] != offsets[1])
fprintf(stdout, "%d,%d\n", (int)(matchptr + offsets[0] - ptr), {
offsets[1] - offsets[0]); prevoffsets[0] = offsets[0];
prevoffsets[1] = offsets[1];
/* Handle --file-offsets */ if (printname != NULL) fprintf(stdout, "%s:", printname);
if (number) fprintf(stdout, "%d:", linenumber);
else if (file_offsets) /* Handle --line-offsets */
fprintf(stdout, "%d,%d\n",
(int)(filepos + matchptr + offsets[0] - ptr),
offsets[1] - offsets[0]);
/* Handle --only-matching, which may occur many times */ if (line_offsets)
fprintf(stdout, "%d,%d\n", (int)(matchptr + offsets[0] - ptr),
offsets[1] - offsets[0]);
else /* Handle --file-offsets */
{
BOOL printed = FALSE; else if (file_offsets)
omstr *om; fprintf(stdout, "%d,%d\n",
(int)(filepos + matchptr + offsets[0] - ptr),
offsets[1] - offsets[0]);
/* Handle --only-matching, which may occur many times */
for (om = only_matching; om != NULL; om = om->next) else
{ {
int n = om->groupnum; BOOL printed = FALSE;
if (n < mrc) omstr *om;
for (om = only_matching; om != NULL; om = om->next)
{ {
int plen = offsets[2*n + 1] - offsets[2*n]; int n = om->groupnum;
if (plen > 0) if (n < mrc)
{ {
if (printed) fprintf(stdout, "%s", om_separator); int plen = offsets[2*n + 1] - offsets[2*n];
if (do_colour) fprintf(stdout, "%c[%sm", 0x1b, colour_string); if (plen > 0)
FWRITE(matchptr + offsets[n*2], 1, plen, stdout); {
if (do_colour) fprintf(stdout, "%c[00m", 0x1b); if (printed) fprintf(stdout, "%s", om_separator);
printed = TRUE; if (do_colour) fprintf(stdout, "%c[%sm", 0x1b, colour_string);
FWRITE(matchptr + offsets[n*2], 1, plen, stdout);
if (do_colour) fprintf(stdout, "%c[00m", 0x1b);
printed = TRUE;
}
} }
} }
}
if (printed || printname != NULL || number) fprintf(stdout, "\n"); if (printed || printname != NULL || number) fprintf(stdout, "\n");
}
} }
/* Prepare to repeat to find the next match */ /* Prepare to repeat to find the next match. If the patterned contained
a lookbehind tht included \K, it is possible that the end of the match
might be at or before the actual strting offset we have just used. We
need to start one character further on. Unfortunately, for unanchored
patterns, the actual start offset can be greater that the one that was
set as a result of "bumpalong". PCRE1 does not return the actual start
offset, so we have to check against the original start offset. This may
lead to duplicates - we we need the fudge above to avoid printing them.
(PCRE2 does this better.) */
match = FALSE; match = FALSE;
if (line_buffered) fflush(stdout); if (line_buffered) fflush(stdout);
rc = 0; /* Had some success */ rc = 0; /* Had some success */
startoffset = offsets[1]; /* Restart after the match */ startoffset = offsets[1]; /* Restart after the match */
if (startoffset <= oldstartoffset)
{
if ((size_t)startoffset >= length)
goto END_ONE_MATCH; /* We were at the end */
startoffset = oldstartoffset + 1;
if (utf8)
while ((matchptr[startoffset] & 0xc0) == 0x80) startoffset++;
}
goto ONLY_MATCHING_RESTART; goto ONLY_MATCHING_RESTART;
} }
} }
...@@ -1974,6 +2008,7 @@ while (ptr < endptr) ...@@ -1974,6 +2008,7 @@ while (ptr < endptr)
/* Advance to after the newline and increment the line number. The file /* Advance to after the newline and increment the line number. The file
offset to the current line is maintained in filepos. */ offset to the current line is maintained in filepos. */
END_ONE_MATCH:
ptr += linelength + endlinelength; ptr += linelength + endlinelength;
filepos += (int)(linelength + endlinelength); filepos += (int)(linelength + endlinelength);
linenumber++; linenumber++;
......
...@@ -2257,16 +2257,19 @@ if (callout_extra) ...@@ -2257,16 +2257,19 @@ if (callout_extra)
fprintf(f, "Callout %d: last capture = %d\n", fprintf(f, "Callout %d: last capture = %d\n",
cb->callout_number, cb->capture_last); cb->callout_number, cb->capture_last);
for (i = 0; i < cb->capture_top * 2; i += 2) if (cb->offset_vector != NULL)
{ {
if (cb->offset_vector[i] < 0) for (i = 0; i < cb->capture_top * 2; i += 2)
fprintf(f, "%2d: <unset>\n", i/2);
else
{ {
fprintf(f, "%2d: ", i/2); if (cb->offset_vector[i] < 0)
PCHARSV(cb->subject, cb->offset_vector[i], fprintf(f, "%2d: <unset>\n", i/2);
cb->offset_vector[i+1] - cb->offset_vector[i], f); else
fprintf(f, "\n"); {
fprintf(f, "%2d: ", i/2);
PCHARSV(cb->subject, cb->offset_vector[i],
cb->offset_vector[i+1] - cb->offset_vector[i], f);
fprintf(f, "\n");
}
} }
} }
} }
...@@ -2519,7 +2522,7 @@ re->name_entry_size = swap_uint16(re->name_entry_size); ...@@ -2519,7 +2522,7 @@ re->name_entry_size = swap_uint16(re->name_entry_size);
re->name_count = swap_uint16(re->name_count); re->name_count = swap_uint16(re->name_count);
re->ref_count = swap_uint16(re->ref_count); re->ref_count = swap_uint16(re->ref_count);
if (extra != NULL) if (extra != NULL && (extra->flags & PCRE_EXTRA_STUDY_DATA) != 0)
{ {
pcre_study_data *rsd = (pcre_study_data *)(extra->study_data); pcre_study_data *rsd = (pcre_study_data *)(extra->study_data);
rsd->size = swap_uint32(rsd->size); rsd->size = swap_uint32(rsd->size);
...@@ -2700,7 +2703,7 @@ re->name_entry_size = swap_uint16(re->name_entry_size); ...@@ -2700,7 +2703,7 @@ re->name_entry_size = swap_uint16(re->name_entry_size);
re->name_count = swap_uint16(re->name_count); re->name_count = swap_uint16(re->name_count);
re->ref_count = swap_uint16(re->ref_count); re->ref_count = swap_uint16(re->ref_count);
if (extra != NULL) if (extra != NULL && (extra->flags & PCRE_EXTRA_STUDY_DATA) != 0)
{ {
pcre_study_data *rsd = (pcre_study_data *)(extra->study_data); pcre_study_data *rsd = (pcre_study_data *)(extra->study_data);
rsd->size = swap_uint32(rsd->size); rsd->size = swap_uint32(rsd->size);
...@@ -3453,7 +3456,7 @@ while (!done) ...@@ -3453,7 +3456,7 @@ while (!done)
pcre_extra *extra = NULL; pcre_extra *extra = NULL;
#if !defined NOPOSIX /* There are still compilers that require no indent */ #if !defined NOPOSIX /* There are still compilers that require no indent */
regex_t preg; regex_t preg = { NULL, 0, 0} ;
int do_posix = 0; int do_posix = 0;
#endif #endif
...@@ -5603,6 +5606,12 @@ while (!done) ...@@ -5603,6 +5606,12 @@ while (!done)
if (!do_g && !do_G) break; if (!do_g && !do_G) break;
if (use_offsets == NULL)
{
fprintf(outfile, "Cannot do global matching without an ovector\n");
break;
}
/* If we have matched an empty string, first check to see if we are at /* If we have matched an empty string, first check to see if we are at
the end of the subject. If so, the /g loop is over. Otherwise, mimic what the end of the subject. If so, the /g loop is over. Otherwise, mimic what
Perl's /g options does. This turns out to be rather cunning. First we set Perl's /g options does. This turns out to be rather cunning. First we set
...@@ -5618,9 +5627,33 @@ while (!done) ...@@ -5618,9 +5627,33 @@ while (!done)
g_notempty = PCRE_NOTEMPTY_ATSTART | PCRE_ANCHORED; g_notempty = PCRE_NOTEMPTY_ATSTART | PCRE_ANCHORED;
} }
/* For /g, update the start offset, leaving the rest alone */ /* For /g, update the start offset, leaving the rest alone. There is a
tricky case when \K is used in a positive lookbehind assertion. This can
if (do_g) start_offset = use_offsets[1]; cause the end of the match to be less than or equal to the start offset.
In this case we restart at one past the start offset. This may return the
same match if the original start offset was bumped along during the
match, but eventually the new start offset will hit the actual start
offset. (In PCRE2 the true start offset is available, and this can be
done better. It is not worth doing more than making sure we do not loop
at this stage in the life of PCRE1.) */
if (do_g)
{
if (g_notempty == 0 && use_offsets[1] <= start_offset)
{
if (start_offset >= len) break; /* End of subject */
start_offset++;
if (use_utf)
{
while (start_offset < len)
{
if ((bptr[start_offset] & 0xc0) != 0x80) break;
start_offset++;
}
}
}
else start_offset = use_offsets[1];
}
/* For /G, update the pointer and length */ /* For /G, update the pointer and length */
...@@ -5637,7 +5670,7 @@ while (!done) ...@@ -5637,7 +5670,7 @@ while (!done)
CONTINUE: CONTINUE:
#if !defined NOPOSIX #if !defined NOPOSIX
if (posix || do_posix) regfree(&preg); if ((posix || do_posix) && preg.re_pcre != 0) regfree(&preg);
#endif #endif
if (re != NULL) new_free(re); if (re != NULL) new_free(re);
......
...@@ -96,13 +96,19 @@ ...@@ -96,13 +96,19 @@
#define SLJIT_EXECUTABLE_ALLOCATOR 1 #define SLJIT_EXECUTABLE_ALLOCATOR 1
#endif #endif
/* Return with error when an invalid argument is passed. */
#ifndef SLJIT_ARGUMENT_CHECKS
/* Disabled by default */
#define SLJIT_ARGUMENT_CHECKS 0
#endif
/* Debug checks (assertions, etc.). */ /* Debug checks (assertions, etc.). */
#ifndef SLJIT_DEBUG #ifndef SLJIT_DEBUG
/* Enabled by default */ /* Enabled by default */
#define SLJIT_DEBUG 1 #define SLJIT_DEBUG 1
#endif #endif
/* Verbose operations */ /* Verbose operations. */
#ifndef SLJIT_VERBOSE #ifndef SLJIT_VERBOSE
/* Enabled by default */ /* Enabled by default */
#define SLJIT_VERBOSE 1 #define SLJIT_VERBOSE 1
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -1182,15 +1182,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_enter(struct sljit_compiler *compil ...@@ -1182,15 +1182,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_enter(struct sljit_compiler *compil
CHECK_ERROR(); CHECK_ERROR();
check_sljit_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size); check_sljit_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size);
set_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size);
compiler->options = options;
compiler->scratches = scratches;
compiler->saveds = saveds;
compiler->fscratches = fscratches;
compiler->fsaveds = fsaveds;
#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
compiler->logical_local_size = local_size;
#endif
local_size += (saveds + 1) * sizeof(sljit_sw); local_size += (saveds + 1) * sizeof(sljit_sw);
local_size = (local_size + 7) & ~7; local_size = (local_size + 7) & ~7;
...@@ -1244,15 +1236,7 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_set_context(struct sljit_compiler *compiler, ...@@ -1244,15 +1236,7 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_set_context(struct sljit_compiler *compiler,
{ {
CHECK_ERROR_VOID(); CHECK_ERROR_VOID();
check_sljit_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size); check_sljit_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size);
set_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size);
compiler->options = options;
compiler->scratches = scratches;
compiler->saveds = saveds;
compiler->fscratches = fscratches;
compiler->fsaveds = fsaveds;
#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
compiler->logical_local_size = local_size;
#endif
local_size += (saveds + 1) * sizeof(sljit_sw); local_size += (saveds + 1) * sizeof(sljit_sw);
compiler->local_size = (local_size + 7) & ~7; compiler->local_size = (local_size + 7) & ~7;
......
...@@ -71,18 +71,11 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_enter(struct sljit_compiler *compil ...@@ -71,18 +71,11 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_enter(struct sljit_compiler *compil
sljit_ub *inst; sljit_ub *inst;
CHECK_ERROR(); CHECK_ERROR();
check_sljit_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size); CHECK(check_sljit_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size));
set_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size);
compiler->options = options;
compiler->scratches = scratches;
compiler->saveds = saveds;
compiler->fscratches = fscratches;
compiler->fsaveds = fsaveds;
compiler->args = args; compiler->args = args;
compiler->flags_saved = 0; compiler->flags_saved = 0;
#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
compiler->logical_local_size = local_size;
#endif
size = 1 + (scratches > 7 ? (scratches - 7) : 0) + (saveds <= 3 ? saveds : 3); size = 1 + (scratches > 7 ? (scratches - 7) : 0) + (saveds <= 3 ? saveds : 3);
#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL) #if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL)
...@@ -141,14 +134,33 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_enter(struct sljit_compiler *compil ...@@ -141,14 +134,33 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_enter(struct sljit_compiler *compil
} }
#endif #endif
SLJIT_COMPILE_ASSERT(FIXED_LOCALS_OFFSET >= (2 + 4) * sizeof(sljit_uw), require_at_least_two_words); SLJIT_COMPILE_ASSERT(SLJIT_LOCALS_OFFSET >= (2 + 4) * sizeof(sljit_uw), require_at_least_two_words);
#if defined(__APPLE__) #if defined(__APPLE__)
/* Ignore pushed registers and FIXED_LOCALS_OFFSET when /* Ignore pushed registers and SLJIT_LOCALS_OFFSET when computing the aligned local size. */
computing the aligned local size. */
saveds = (2 + (scratches > 7 ? (scratches - 7) : 0) + (saveds <= 3 ? saveds : 3)) * sizeof(sljit_uw); saveds = (2 + (scratches > 7 ? (scratches - 7) : 0) + (saveds <= 3 ? saveds : 3)) * sizeof(sljit_uw);
local_size = ((FIXED_LOCALS_OFFSET + saveds + local_size + 15) & ~15) - saveds; local_size = ((SLJIT_LOCALS_OFFSET + saveds + local_size + 15) & ~15) - saveds;
#else #else
local_size = FIXED_LOCALS_OFFSET + ((local_size + sizeof(sljit_uw) - 1) & ~(sizeof(sljit_uw) - 1)); if (options & SLJIT_DOUBLE_ALIGNMENT) {
local_size = SLJIT_LOCALS_OFFSET + ((local_size + 7) & ~7);
inst = (sljit_ub*)ensure_buf(compiler, 1 + 17);
FAIL_IF(!inst);
INC_SIZE(17);
inst[0] = MOV_r_rm;
inst[1] = MOD_REG | (reg_map[TMP_REG1] << 3) | reg_map[SLJIT_SP];
inst[2] = GROUP_F7;
inst[3] = MOD_REG | (0 << 3) | reg_map[SLJIT_SP];
*(sljit_sw*)(inst + 4) = 0x4;
inst[8] = JNE_i8;
inst[9] = 6;
inst[10] = GROUP_BINARY_81;
inst[11] = MOD_REG | (5 << 3) | reg_map[SLJIT_SP];
*(sljit_sw*)(inst + 12) = 0x4;
inst[16] = PUSH_r + reg_map[TMP_REG1];
}
else
local_size = SLJIT_LOCALS_OFFSET + ((local_size + 3) & ~3);
#endif #endif
compiler->local_size = local_size; compiler->local_size = local_size;
...@@ -157,10 +169,10 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_enter(struct sljit_compiler *compil ...@@ -157,10 +169,10 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_enter(struct sljit_compiler *compil
#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL) #if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL)
FAIL_IF(emit_do_imm(compiler, MOV_r_i32 + reg_map[SLJIT_R0], local_size)); FAIL_IF(emit_do_imm(compiler, MOV_r_i32 + reg_map[SLJIT_R0], local_size));
#else #else
local_size -= FIXED_LOCALS_OFFSET; local_size -= SLJIT_LOCALS_OFFSET;
FAIL_IF(emit_do_imm(compiler, MOV_r_i32 + reg_map[SLJIT_R0], local_size)); FAIL_IF(emit_do_imm(compiler, MOV_r_i32 + reg_map[SLJIT_R0], local_size));
FAIL_IF(emit_non_cum_binary(compiler, SUB_r_rm, SUB_rm_r, SUB, SUB_EAX_i32, FAIL_IF(emit_non_cum_binary(compiler, SUB_r_rm, SUB_rm_r, SUB, SUB_EAX_i32,
SLJIT_SP, 0, SLJIT_SP, 0, SLJIT_IMM, FIXED_LOCALS_OFFSET)); SLJIT_SP, 0, SLJIT_SP, 0, SLJIT_IMM, SLJIT_LOCALS_OFFSET));
#endif #endif
FAIL_IF(sljit_emit_ijump(compiler, SLJIT_CALL1, SLJIT_IMM, SLJIT_FUNC_OFFSET(sljit_grow_stack))); FAIL_IF(sljit_emit_ijump(compiler, SLJIT_CALL1, SLJIT_IMM, SLJIT_FUNC_OFFSET(sljit_grow_stack)));
} }
...@@ -171,29 +183,26 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_enter(struct sljit_compiler *compil ...@@ -171,29 +183,26 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_enter(struct sljit_compiler *compil
SLJIT_SP, 0, SLJIT_SP, 0, SLJIT_IMM, local_size); SLJIT_SP, 0, SLJIT_SP, 0, SLJIT_IMM, local_size);
} }
SLJIT_API_FUNC_ATTRIBUTE void sljit_set_context(struct sljit_compiler *compiler, SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_set_context(struct sljit_compiler *compiler,
sljit_si options, sljit_si args, sljit_si scratches, sljit_si saveds, sljit_si options, sljit_si args, sljit_si scratches, sljit_si saveds,
sljit_si fscratches, sljit_si fsaveds, sljit_si local_size) sljit_si fscratches, sljit_si fsaveds, sljit_si local_size)
{ {
CHECK_ERROR_VOID(); CHECK_ERROR();
check_sljit_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size); CHECK(check_sljit_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size));
set_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size);
compiler->options = options;
compiler->scratches = scratches;
compiler->saveds = saveds;
compiler->fscratches = fscratches;
compiler->fsaveds = fsaveds;
compiler->args = args; compiler->args = args;
#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
compiler->logical_local_size = local_size;
#endif
#if defined(__APPLE__) #if defined(__APPLE__)
saveds = (2 + (scratches > 7 ? (scratches - 7) : 0) + (saveds <= 3 ? saveds : 3)) * sizeof(sljit_uw); saveds = (2 + (scratches > 7 ? (scratches - 7) : 0) + (saveds <= 3 ? saveds : 3)) * sizeof(sljit_uw);
compiler->local_size = ((FIXED_LOCALS_OFFSET + saveds + local_size + 15) & ~15) - saveds; compiler->local_size = ((SLJIT_LOCALS_OFFSET + saveds + local_size + 15) & ~15) - saveds;
#else #else
compiler->local_size = FIXED_LOCALS_OFFSET + ((local_size + sizeof(sljit_uw) - 1) & ~(sizeof(sljit_uw) - 1)); if (options & SLJIT_DOUBLE_ALIGNMENT)
compiler->local_size = SLJIT_LOCALS_OFFSET + ((local_size + 7) & ~7);
else
compiler->local_size = SLJIT_LOCALS_OFFSET + ((local_size + 3) & ~3);
#endif #endif
return SLJIT_SUCCESS;
} }
SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_return(struct sljit_compiler *compiler, sljit_si op, sljit_si src, sljit_sw srcw) SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_return(struct sljit_compiler *compiler, sljit_si op, sljit_si src, sljit_sw srcw)
...@@ -202,7 +211,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_return(struct sljit_compiler *compi ...@@ -202,7 +211,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_return(struct sljit_compiler *compi
sljit_ub *inst; sljit_ub *inst;
CHECK_ERROR(); CHECK_ERROR();
check_sljit_emit_return(compiler, op, src, srcw); CHECK(check_sljit_emit_return(compiler, op, src, srcw));
SLJIT_ASSERT(compiler->args >= 0); SLJIT_ASSERT(compiler->args >= 0);
compiler->flags_saved = 0; compiler->flags_saved = 0;
...@@ -212,6 +221,18 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_return(struct sljit_compiler *compi ...@@ -212,6 +221,18 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_return(struct sljit_compiler *compi
FAIL_IF(emit_cum_binary(compiler, ADD_r_rm, ADD_rm_r, ADD, ADD_EAX_i32, FAIL_IF(emit_cum_binary(compiler, ADD_r_rm, ADD_rm_r, ADD, ADD_EAX_i32,
SLJIT_SP, 0, SLJIT_SP, 0, SLJIT_IMM, compiler->local_size)); SLJIT_SP, 0, SLJIT_SP, 0, SLJIT_IMM, compiler->local_size));
#if !defined(__APPLE__)
if (compiler->options & SLJIT_DOUBLE_ALIGNMENT) {
inst = (sljit_ub*)ensure_buf(compiler, 1 + 3);
FAIL_IF(!inst);
INC_SIZE(3);
inst[0] = MOV_r_rm;
inst[1] = (reg_map[SLJIT_SP] << 3) | 0x4 /* SIB */;
inst[2] = (4 << 3) | reg_map[SLJIT_SP];
}
#endif
size = 2 + (compiler->scratches > 7 ? (compiler->scratches - 7) : 0) + size = 2 + (compiler->scratches > 7 ? (compiler->scratches - 7) : 0) +
(compiler->saveds <= 3 ? compiler->saveds : 3); (compiler->saveds <= 3 ? compiler->saveds : 3);
#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL) #if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL)
...@@ -460,7 +481,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_enter(struct sljit_compiler *c ...@@ -460,7 +481,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_enter(struct sljit_compiler *c
sljit_ub *inst; sljit_ub *inst;
CHECK_ERROR(); CHECK_ERROR();
check_sljit_emit_fast_enter(compiler, dst, dstw); CHECK(check_sljit_emit_fast_enter(compiler, dst, dstw));
ADJUST_LOCAL_OFFSET(dst, dstw); ADJUST_LOCAL_OFFSET(dst, dstw);
CHECK_EXTRA_REGS(dst, dstw, (void)0); CHECK_EXTRA_REGS(dst, dstw, (void)0);
...@@ -491,7 +512,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_return(struct sljit_compiler * ...@@ -491,7 +512,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_return(struct sljit_compiler *
sljit_ub *inst; sljit_ub *inst;
CHECK_ERROR(); CHECK_ERROR();
check_sljit_emit_fast_return(compiler, src, srcw); CHECK(check_sljit_emit_fast_return(compiler, src, srcw));
ADJUST_LOCAL_OFFSET(src, srcw); ADJUST_LOCAL_OFFSET(src, srcw);
CHECK_EXTRA_REGS(src, srcw, (void)0); CHECK_EXTRA_REGS(src, srcw, (void)0);
......
...@@ -95,17 +95,10 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_enter(struct sljit_compiler *compil ...@@ -95,17 +95,10 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_enter(struct sljit_compiler *compil
sljit_ub *inst; sljit_ub *inst;
CHECK_ERROR(); CHECK_ERROR();
check_sljit_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size); CHECK(check_sljit_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size));
set_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size);
compiler->options = options;
compiler->scratches = scratches;
compiler->saveds = saveds;
compiler->fscratches = fscratches;
compiler->fsaveds = fsaveds;
compiler->flags_saved = 0; compiler->flags_saved = 0;
#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
compiler->logical_local_size = local_size;
#endif
/* Including the return address saved by the call instruction. */ /* Including the return address saved by the call instruction. */
saved_register_size = GET_SAVED_REGISTERS_SIZE(scratches, saveds, 1); saved_register_size = GET_SAVED_REGISTERS_SIZE(scratches, saveds, 1);
...@@ -173,7 +166,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_enter(struct sljit_compiler *compil ...@@ -173,7 +166,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_enter(struct sljit_compiler *compil
#endif #endif
} }
local_size = ((local_size + FIXED_LOCALS_OFFSET + saved_register_size + 16 - 1) & ~(16 - 1)) - saved_register_size; local_size = ((local_size + SLJIT_LOCALS_OFFSET + saved_register_size + 15) & ~15) - saved_register_size;
compiler->local_size = local_size; compiler->local_size = local_size;
#ifdef _WIN64 #ifdef _WIN64
...@@ -201,7 +194,8 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_enter(struct sljit_compiler *compil ...@@ -201,7 +194,8 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_enter(struct sljit_compiler *compil
*inst++ = MOV_rm_i32; *inst++ = MOV_rm_i32;
*inst++ = MOD_REG | reg_lmap[SLJIT_R0]; *inst++ = MOD_REG | reg_lmap[SLJIT_R0];
*(sljit_si*)inst = local_size; *(sljit_si*)inst = local_size;
#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG) #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \
|| (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
compiler->skip_checks = 1; compiler->skip_checks = 1;
#endif #endif
FAIL_IF(sljit_emit_ijump(compiler, SLJIT_CALL1, SLJIT_IMM, SLJIT_FUNC_OFFSET(sljit_grow_stack))); FAIL_IF(sljit_emit_ijump(compiler, SLJIT_CALL1, SLJIT_IMM, SLJIT_FUNC_OFFSET(sljit_grow_stack)));
...@@ -243,27 +237,20 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_enter(struct sljit_compiler *compil ...@@ -243,27 +237,20 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_enter(struct sljit_compiler *compil
return SLJIT_SUCCESS; return SLJIT_SUCCESS;
} }
SLJIT_API_FUNC_ATTRIBUTE void sljit_set_context(struct sljit_compiler *compiler, SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_set_context(struct sljit_compiler *compiler,
sljit_si options, sljit_si args, sljit_si scratches, sljit_si saveds, sljit_si options, sljit_si args, sljit_si scratches, sljit_si saveds,
sljit_si fscratches, sljit_si fsaveds, sljit_si local_size) sljit_si fscratches, sljit_si fsaveds, sljit_si local_size)
{ {
sljit_si saved_register_size; sljit_si saved_register_size;
CHECK_ERROR_VOID(); CHECK_ERROR();
check_sljit_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size); CHECK(check_sljit_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size));
set_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size);
compiler->options = options;
compiler->scratches = scratches;
compiler->saveds = saveds;
compiler->fscratches = fscratches;
compiler->fsaveds = fsaveds;
#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
compiler->logical_local_size = local_size;
#endif
/* Including the return address saved by the call instruction. */ /* Including the return address saved by the call instruction. */
saved_register_size = GET_SAVED_REGISTERS_SIZE(scratches, saveds, 1); saved_register_size = GET_SAVED_REGISTERS_SIZE(scratches, saveds, 1);
compiler->local_size = ((local_size + FIXED_LOCALS_OFFSET + saved_register_size + 16 - 1) & ~(16 - 1)) - saved_register_size; compiler->local_size = ((local_size + SLJIT_LOCALS_OFFSET + saved_register_size + 15) & ~15) - saved_register_size;
return SLJIT_SUCCESS;
} }
SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_return(struct sljit_compiler *compiler, sljit_si op, sljit_si src, sljit_sw srcw) SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_return(struct sljit_compiler *compiler, sljit_si op, sljit_si src, sljit_sw srcw)
...@@ -272,7 +259,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_return(struct sljit_compiler *compi ...@@ -272,7 +259,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_return(struct sljit_compiler *compi
sljit_ub *inst; sljit_ub *inst;
CHECK_ERROR(); CHECK_ERROR();
check_sljit_emit_return(compiler, op, src, srcw); CHECK(check_sljit_emit_return(compiler, op, src, srcw));
compiler->flags_saved = 0; compiler->flags_saved = 0;
FAIL_IF(emit_mov_before_return(compiler, op, src, srcw)); FAIL_IF(emit_mov_before_return(compiler, op, src, srcw));
...@@ -607,7 +594,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_enter(struct sljit_compiler *c ...@@ -607,7 +594,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_enter(struct sljit_compiler *c
sljit_ub *inst; sljit_ub *inst;
CHECK_ERROR(); CHECK_ERROR();
check_sljit_emit_fast_enter(compiler, dst, dstw); CHECK(check_sljit_emit_fast_enter(compiler, dst, dstw));
ADJUST_LOCAL_OFFSET(dst, dstw); ADJUST_LOCAL_OFFSET(dst, dstw);
/* For UNUSED dst. Uncommon, but possible. */ /* For UNUSED dst. Uncommon, but possible. */
...@@ -644,7 +631,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_return(struct sljit_compiler * ...@@ -644,7 +631,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_return(struct sljit_compiler *
sljit_ub *inst; sljit_ub *inst;
CHECK_ERROR(); CHECK_ERROR();
check_sljit_emit_fast_return(compiler, src, srcw); CHECK(check_sljit_emit_fast_return(compiler, src, srcw));
ADJUST_LOCAL_OFFSET(src, srcw); ADJUST_LOCAL_OFFSET(src, srcw);
if ((src & SLJIT_IMM) && NOT_HALFWORD(srcw)) { if ((src & SLJIT_IMM) && NOT_HALFWORD(srcw)) {
......
This diff is collapsed.
This diff is collapsed.
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
scriptversion=2013-07-13.22; # UTC scriptversion=2013-07-13.22; # UTC
# Copyright (C) 2011-2013 Free Software Foundation, Inc. # Copyright (C) 2011-2014 Free Software Foundation, Inc.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
...@@ -106,11 +106,14 @@ trap "st=143; $do_exit" 15 ...@@ -106,11 +106,14 @@ trap "st=143; $do_exit" 15
# Test script is run here. # Test script is run here.
"$@" >$log_file 2>&1 "$@" >$log_file 2>&1
estatus=$? estatus=$?
if test $enable_hard_errors = no && test $estatus -eq 99; then if test $enable_hard_errors = no && test $estatus -eq 99; then
estatus=1 tweaked_estatus=1
else
tweaked_estatus=$estatus
fi fi
case $estatus:$expect_failure in case $tweaked_estatus:$expect_failure in
0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
0:*) col=$grn res=PASS recheck=no gcopy=no;; 0:*) col=$grn res=PASS recheck=no gcopy=no;;
77:*) col=$blu res=SKIP recheck=no gcopy=yes;; 77:*) col=$blu res=SKIP recheck=no gcopy=yes;;
...@@ -119,6 +122,12 @@ case $estatus:$expect_failure in ...@@ -119,6 +122,12 @@ case $estatus:$expect_failure in
*:*) col=$red res=FAIL recheck=yes gcopy=yes;; *:*) col=$red res=FAIL recheck=yes gcopy=yes;;
esac esac
# Report the test outcome and exit status in the logs, so that one can
# know whether the test passed or failed simply by looking at the '.log'
# file, without the need of also peaking into the corresponding '.trs'
# file (automake bug#11814).
echo "$res $test_name (exit status: $estatus)" >>$log_file
# Report outcome to console. # Report outcome to console.
echo "${col}${res}${std}: $test_name" echo "${col}${res}${std}: $test_name"
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment