summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Morrow <andrew.morrow@10gen.com>2019-11-27 16:22:40 +0000
committerevergreen <evergreen@mongodb.com>2019-11-27 16:22:40 +0000
commit57c71a5642d8fc5f73b47999dde687db8efd4d5e (patch)
tree2ebb3d58959713e1faefc134b6e99e9e40724d56
parent2c1ef409e145a8adfb845415e17033de7ed170d7 (diff)
downloadmongo-57c71a5642d8fc5f73b47999dde687db8efd4d5e.tar.gz
SERVER-38002 Upgrade PCRE to 8.42
(cherry picked from commit f092df120770a750ce1049a6ff91956dba05639a) (cherry picked from commit 06c8454002da4ca1abc312755b5a3946a75b4e13)
-rw-r--r--src/third_party/SConscript2
-rw-r--r--src/third_party/pcre-8.41/INSTALL370
-rw-r--r--src/third_party/pcre-8.41/build_posix/config.h348
-rwxr-xr-xsrc/third_party/pcre-8.42/132html (renamed from src/third_party/pcre-8.41/132html)0
-rw-r--r--src/third_party/pcre-8.42/AUTHORS (renamed from src/third_party/pcre-8.41/AUTHORS)6
-rw-r--r--src/third_party/pcre-8.42/COPYING (renamed from src/third_party/pcre-8.41/COPYING)0
-rw-r--r--src/third_party/pcre-8.42/ChangeLog (renamed from src/third_party/pcre-8.41/ChangeLog)53
-rwxr-xr-xsrc/third_party/pcre-8.42/CheckMan (renamed from src/third_party/pcre-8.41/CheckMan)0
-rwxr-xr-xsrc/third_party/pcre-8.42/CleanTxt (renamed from src/third_party/pcre-8.41/CleanTxt)0
-rwxr-xr-xsrc/third_party/pcre-8.42/Detrail (renamed from src/third_party/pcre-8.41/Detrail)0
-rw-r--r--src/third_party/pcre-8.42/HACKING (renamed from src/third_party/pcre-8.41/HACKING)0
-rw-r--r--src/third_party/pcre-8.42/INSTALL368
-rw-r--r--src/third_party/pcre-8.42/LICENCE (renamed from src/third_party/pcre-8.41/LICENCE)6
-rw-r--r--src/third_party/pcre-8.42/NEWS (renamed from src/third_party/pcre-8.41/NEWS)6
-rw-r--r--src/third_party/pcre-8.42/NON-AUTOTOOLS-BUILD (renamed from src/third_party/pcre-8.41/NON-AUTOTOOLS-BUILD)15
-rw-r--r--src/third_party/pcre-8.42/NON-UNIX-USE (renamed from src/third_party/pcre-8.41/NON-UNIX-USE)0
-rwxr-xr-xsrc/third_party/pcre-8.42/PrepareRelease (renamed from src/third_party/pcre-8.41/PrepareRelease)0
-rw-r--r--src/third_party/pcre-8.42/README (renamed from src/third_party/pcre-8.41/README)0
-rwxr-xr-xsrc/third_party/pcre-8.42/RunGrepTest (renamed from src/third_party/pcre-8.41/RunGrepTest)0
-rwxr-xr-xsrc/third_party/pcre-8.42/RunTest (renamed from src/third_party/pcre-8.41/RunTest)0
-rw-r--r--src/third_party/pcre-8.42/RunTest.bat (renamed from src/third_party/pcre-8.41/RunTest.bat)0
-rw-r--r--src/third_party/pcre-8.42/SConscript (renamed from src/third_party/pcre-8.41/SConscript)0
-rwxr-xr-xsrc/third_party/pcre-8.42/ar-lib (renamed from src/third_party/pcre-8.41/ar-lib)2
-rw-r--r--src/third_party/pcre-8.42/build_posix/config.h (renamed from src/third_party/pcre-8.41/build_solaris/config.h)8
-rwxr-xr-xsrc/third_party/pcre-8.42/build_windows/config.h (renamed from src/third_party/pcre-8.41/build_windows/config.h)0
-rw-r--r--src/third_party/pcre-8.42/dftables.c (renamed from src/third_party/pcre-8.41/dftables.c)0
-rw-r--r--src/third_party/pcre-8.42/libpcre.pc.in (renamed from src/third_party/pcre-8.41/libpcre.pc.in)0
-rw-r--r--src/third_party/pcre-8.42/libpcre16.pc.in (renamed from src/third_party/pcre-8.41/libpcre16.pc.in)0
-rw-r--r--src/third_party/pcre-8.42/libpcre32.pc.in (renamed from src/third_party/pcre-8.41/libpcre32.pc.in)0
-rw-r--r--src/third_party/pcre-8.42/libpcrecpp.pc.in (renamed from src/third_party/pcre-8.41/libpcrecpp.pc.in)0
-rw-r--r--src/third_party/pcre-8.42/libpcreposix.pc.in (renamed from src/third_party/pcre-8.41/libpcreposix.pc.in)0
-rw-r--r--src/third_party/pcre-8.42/makevp.bat (renamed from src/third_party/pcre-8.41/makevp.bat)0
-rw-r--r--src/third_party/pcre-8.42/makevp_c.txt (renamed from src/third_party/pcre-8.41/makevp_c.txt)0
-rw-r--r--src/third_party/pcre-8.42/makevp_l.txt (renamed from src/third_party/pcre-8.41/makevp_l.txt)0
-rw-r--r--src/third_party/pcre-8.42/patches/0001-SERVER-38002-Fix-typo-in-HAVE_STRTOLL-define.patch29
-rw-r--r--src/third_party/pcre-8.42/pcre-config.in (renamed from src/third_party/pcre-8.41/pcre-config.in)0
-rw-r--r--src/third_party/pcre-8.42/pcre.h (renamed from src/third_party/pcre-8.41/pcre.h)12
-rw-r--r--src/third_party/pcre-8.42/pcre.h.generic (renamed from src/third_party/pcre-8.41/pcre.h.generic)12
-rw-r--r--src/third_party/pcre-8.42/pcre.h.in (renamed from src/third_party/pcre-8.41/pcre.h.in)8
-rw-r--r--src/third_party/pcre-8.42/pcre16_byte_order.c (renamed from src/third_party/pcre-8.41/pcre16_byte_order.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre16_chartables.c (renamed from src/third_party/pcre-8.41/pcre16_chartables.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre16_compile.c (renamed from src/third_party/pcre-8.41/pcre16_compile.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre16_config.c (renamed from src/third_party/pcre-8.41/pcre16_config.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre16_dfa_exec.c (renamed from src/third_party/pcre-8.41/pcre16_dfa_exec.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre16_exec.c (renamed from src/third_party/pcre-8.41/pcre16_exec.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre16_fullinfo.c (renamed from src/third_party/pcre-8.41/pcre16_fullinfo.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre16_get.c (renamed from src/third_party/pcre-8.41/pcre16_get.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre16_globals.c (renamed from src/third_party/pcre-8.41/pcre16_globals.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre16_jit_compile.c (renamed from src/third_party/pcre-8.41/pcre16_jit_compile.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre16_maketables.c (renamed from src/third_party/pcre-8.41/pcre16_maketables.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre16_newline.c (renamed from src/third_party/pcre-8.41/pcre16_newline.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre16_ord2utf16.c (renamed from src/third_party/pcre-8.41/pcre16_ord2utf16.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre16_printint.c (renamed from src/third_party/pcre-8.41/pcre16_printint.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre16_refcount.c (renamed from src/third_party/pcre-8.41/pcre16_refcount.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre16_string_utils.c (renamed from src/third_party/pcre-8.41/pcre16_string_utils.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre16_study.c (renamed from src/third_party/pcre-8.41/pcre16_study.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre16_tables.c (renamed from src/third_party/pcre-8.41/pcre16_tables.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre16_ucd.c (renamed from src/third_party/pcre-8.41/pcre16_ucd.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre16_utf16_utils.c (renamed from src/third_party/pcre-8.41/pcre16_utf16_utils.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre16_valid_utf16.c (renamed from src/third_party/pcre-8.41/pcre16_valid_utf16.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre16_version.c (renamed from src/third_party/pcre-8.41/pcre16_version.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre16_xclass.c (renamed from src/third_party/pcre-8.41/pcre16_xclass.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre32_byte_order.c (renamed from src/third_party/pcre-8.41/pcre32_byte_order.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre32_chartables.c (renamed from src/third_party/pcre-8.41/pcre32_chartables.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre32_compile.c (renamed from src/third_party/pcre-8.41/pcre32_compile.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre32_config.c (renamed from src/third_party/pcre-8.41/pcre32_config.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre32_dfa_exec.c (renamed from src/third_party/pcre-8.41/pcre32_dfa_exec.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre32_exec.c (renamed from src/third_party/pcre-8.41/pcre32_exec.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre32_fullinfo.c (renamed from src/third_party/pcre-8.41/pcre32_fullinfo.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre32_get.c (renamed from src/third_party/pcre-8.41/pcre32_get.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre32_globals.c (renamed from src/third_party/pcre-8.41/pcre32_globals.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre32_jit_compile.c (renamed from src/third_party/pcre-8.41/pcre32_jit_compile.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre32_maketables.c (renamed from src/third_party/pcre-8.41/pcre32_maketables.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre32_newline.c (renamed from src/third_party/pcre-8.41/pcre32_newline.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre32_ord2utf32.c (renamed from src/third_party/pcre-8.41/pcre32_ord2utf32.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre32_printint.c (renamed from src/third_party/pcre-8.41/pcre32_printint.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre32_refcount.c (renamed from src/third_party/pcre-8.41/pcre32_refcount.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre32_string_utils.c (renamed from src/third_party/pcre-8.41/pcre32_string_utils.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre32_study.c (renamed from src/third_party/pcre-8.41/pcre32_study.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre32_tables.c (renamed from src/third_party/pcre-8.41/pcre32_tables.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre32_ucd.c (renamed from src/third_party/pcre-8.41/pcre32_ucd.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre32_utf32_utils.c (renamed from src/third_party/pcre-8.41/pcre32_utf32_utils.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre32_valid_utf32.c (renamed from src/third_party/pcre-8.41/pcre32_valid_utf32.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre32_version.c (renamed from src/third_party/pcre-8.41/pcre32_version.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre32_xclass.c (renamed from src/third_party/pcre-8.41/pcre32_xclass.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre_byte_order.c (renamed from src/third_party/pcre-8.41/pcre_byte_order.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre_chartables.c (renamed from src/third_party/pcre-8.41/pcre_chartables.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre_chartables.c.dist (renamed from src/third_party/pcre-8.41/pcre_chartables.c.dist)0
-rw-r--r--src/third_party/pcre-8.42/pcre_compile.c (renamed from src/third_party/pcre-8.41/pcre_compile.c)2
-rw-r--r--src/third_party/pcre-8.42/pcre_config.c (renamed from src/third_party/pcre-8.41/pcre_config.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre_dfa_exec.c (renamed from src/third_party/pcre-8.41/pcre_dfa_exec.c)4
-rw-r--r--src/third_party/pcre-8.42/pcre_exec.c (renamed from src/third_party/pcre-8.41/pcre_exec.c)8
-rw-r--r--src/third_party/pcre-8.42/pcre_fullinfo.c (renamed from src/third_party/pcre-8.41/pcre_fullinfo.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre_get.c (renamed from src/third_party/pcre-8.41/pcre_get.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre_globals.c (renamed from src/third_party/pcre-8.41/pcre_globals.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre_internal.h (renamed from src/third_party/pcre-8.41/pcre_internal.h)0
-rw-r--r--src/third_party/pcre-8.42/pcre_jit_compile.c (renamed from src/third_party/pcre-8.41/pcre_jit_compile.c)407
-rw-r--r--src/third_party/pcre-8.42/pcre_jit_test.c (renamed from src/third_party/pcre-8.41/pcre_jit_test.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre_maketables.c (renamed from src/third_party/pcre-8.41/pcre_maketables.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre_newline.c (renamed from src/third_party/pcre-8.41/pcre_newline.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre_ord2utf8.c (renamed from src/third_party/pcre-8.41/pcre_ord2utf8.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre_printint.c (renamed from src/third_party/pcre-8.41/pcre_printint.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre_refcount.c (renamed from src/third_party/pcre-8.41/pcre_refcount.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre_scanner.cc (renamed from src/third_party/pcre-8.41/pcre_scanner.cc)0
-rw-r--r--src/third_party/pcre-8.42/pcre_scanner.h (renamed from src/third_party/pcre-8.41/pcre_scanner.h)0
-rw-r--r--src/third_party/pcre-8.42/pcre_scanner_unittest.cc (renamed from src/third_party/pcre-8.41/pcre_scanner_unittest.cc)0
-rw-r--r--src/third_party/pcre-8.42/pcre_string_utils.c (renamed from src/third_party/pcre-8.41/pcre_string_utils.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre_stringpiece.cc (renamed from src/third_party/pcre-8.41/pcre_stringpiece.cc)0
-rw-r--r--src/third_party/pcre-8.42/pcre_stringpiece.h (renamed from src/third_party/pcre-8.41/pcre_stringpiece.h)0
-rw-r--r--src/third_party/pcre-8.42/pcre_stringpiece.h.in (renamed from src/third_party/pcre-8.41/pcre_stringpiece.h.in)0
-rw-r--r--src/third_party/pcre-8.42/pcre_stringpiece_unittest.cc (renamed from src/third_party/pcre-8.41/pcre_stringpiece_unittest.cc)0
-rw-r--r--src/third_party/pcre-8.42/pcre_study.c (renamed from src/third_party/pcre-8.41/pcre_study.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre_tables.c (renamed from src/third_party/pcre-8.41/pcre_tables.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre_ucd.c (renamed from src/third_party/pcre-8.41/pcre_ucd.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre_valid_utf8.c (renamed from src/third_party/pcre-8.41/pcre_valid_utf8.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre_version.c (renamed from src/third_party/pcre-8.41/pcre_version.c)0
-rw-r--r--src/third_party/pcre-8.42/pcre_xclass.c (renamed from src/third_party/pcre-8.41/pcre_xclass.c)0
-rw-r--r--src/third_party/pcre-8.42/pcrecpp.cc (renamed from src/third_party/pcre-8.41/pcrecpp.cc)0
-rw-r--r--src/third_party/pcre-8.42/pcrecpp.h (renamed from src/third_party/pcre-8.41/pcrecpp.h)0
-rw-r--r--src/third_party/pcre-8.42/pcrecpp_internal.h (renamed from src/third_party/pcre-8.41/pcrecpp_internal.h)0
-rw-r--r--src/third_party/pcre-8.42/pcrecpp_unittest.cc (renamed from src/third_party/pcre-8.41/pcrecpp_unittest.cc)0
-rw-r--r--src/third_party/pcre-8.42/pcrecpparg.h (renamed from src/third_party/pcre-8.41/pcrecpparg.h)0
-rw-r--r--src/third_party/pcre-8.42/pcrecpparg.h.in (renamed from src/third_party/pcre-8.41/pcrecpparg.h.in)0
-rw-r--r--src/third_party/pcre-8.42/pcredemo.c (renamed from src/third_party/pcre-8.41/pcredemo.c)0
-rw-r--r--src/third_party/pcre-8.42/pcregexp.pas (renamed from src/third_party/pcre-8.41/pcregexp.pas)0
-rw-r--r--src/third_party/pcre-8.42/pcregrep.c (renamed from src/third_party/pcre-8.41/pcregrep.c)55
-rw-r--r--src/third_party/pcre-8.42/pcreposix.c (renamed from src/third_party/pcre-8.41/pcreposix.c)6
-rw-r--r--src/third_party/pcre-8.42/pcreposix.h (renamed from src/third_party/pcre-8.41/pcreposix.h)0
-rw-r--r--src/third_party/pcre-8.42/pcretest.c (renamed from src/third_party/pcre-8.41/pcretest.c)0
-rwxr-xr-xsrc/third_party/pcre-8.42/perltest.pl (renamed from src/third_party/pcre-8.41/perltest.pl)0
-rw-r--r--src/third_party/pcre-8.42/ucp.h (renamed from src/third_party/pcre-8.41/ucp.h)0
-rw-r--r--src/third_party/scripts/pcre_get_sources.sh12
132 files changed, 840 insertions, 899 deletions
diff --git a/src/third_party/SConscript b/src/third_party/SConscript
index 30443b6e783..7f1f1d06b10 100644
--- a/src/third_party/SConscript
+++ b/src/third_party/SConscript
@@ -6,7 +6,7 @@ Import("wiredtiger")
boostSuffix = "-1.60.0"
snappySuffix = '-1.1.3'
zlibSuffix = '-1.2.11'
-pcreSuffix = "-8.41"
+pcreSuffix = "-8.42"
mozjsSuffix = '-45'
yamlSuffix = '-0.6.2'
icuSuffix = '-57.1'
diff --git a/src/third_party/pcre-8.41/INSTALL b/src/third_party/pcre-8.41/INSTALL
deleted file mode 100644
index 2099840756e..00000000000
--- a/src/third_party/pcre-8.41/INSTALL
+++ /dev/null
@@ -1,370 +0,0 @@
-Installation Instructions
-*************************
-
-Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
-Inc.
-
- Copying and distribution of this file, with or without modification,
-are permitted in any medium without royalty provided the copyright
-notice and this notice are preserved. This file is offered as-is,
-without warranty of any kind.
-
-Basic Installation
-==================
-
- Briefly, the shell command `./configure && make && make install'
-should configure, build, and install this package. The following
-more-detailed instructions are generic; see the `README' file for
-instructions specific to this package. Some packages provide this
-`INSTALL' file but do not implement all of the features documented
-below. The lack of an optional feature in a given package is not
-necessarily a bug. More recommendations for GNU packages can be found
-in *note Makefile Conventions: (standards)Makefile Conventions.
-
- The `configure' shell script attempts to guess correct values for
-various system-dependent variables used during compilation. It uses
-those values to create a `Makefile' in each directory of the package.
-It may also create one or more `.h' files containing system-dependent
-definitions. Finally, it creates a shell script `config.status' that
-you can run in the future to recreate the current configuration, and a
-file `config.log' containing compiler output (useful mainly for
-debugging `configure').
-
- It can also use an optional file (typically called `config.cache'
-and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring. Caching is
-disabled by default to prevent problems with accidental use of stale
-cache files.
-
- If you need to do unusual things to compile the package, please try
-to figure out how `configure' could check whether to do them, and mail
-diffs or instructions to the address given in the `README' so they can
-be considered for the next release. If you are using the cache, and at
-some point `config.cache' contains results you don't want to keep, you
-may remove or edit it.
-
- The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'. You need `configure.ac' if
-you want to change it or regenerate `configure' using a newer version
-of `autoconf'.
-
- The simplest way to compile this package is:
-
- 1. `cd' to the directory containing the package's source code and type
- `./configure' to configure the package for your system.
-
- Running `configure' might take a while. While running, it prints
- some messages telling which features it is checking for.
-
- 2. Type `make' to compile the package.
-
- 3. Optionally, type `make check' to run any self-tests that come with
- the package, generally using the just-built uninstalled binaries.
-
- 4. Type `make install' to install the programs and any data files and
- documentation. When installing into a prefix owned by root, it is
- recommended that the package be configured and built as a regular
- user, and only the `make install' phase executed with root
- privileges.
-
- 5. Optionally, type `make installcheck' to repeat any self-tests, but
- this time using the binaries in their final installed location.
- This target does not install anything. Running this target as a
- regular user, particularly if the prior `make install' required
- root privileges, verifies that the installation completed
- correctly.
-
- 6. You can remove the program binaries and object files from the
- source code directory by typing `make clean'. To also remove the
- files that `configure' created (so you can compile the package for
- a different kind of computer), type `make distclean'. There is
- also a `make maintainer-clean' target, but that is intended mainly
- for the package's developers. If you use it, you may have to get
- all sorts of other programs in order to regenerate files that came
- with the distribution.
-
- 7. Often, you can also type `make uninstall' to remove the installed
- files again. In practice, not all packages have tested that
- uninstallation works correctly, even though it is required by the
- GNU Coding Standards.
-
- 8. Some packages, particularly those that use Automake, provide `make
- distcheck', which can by used by developers to test that all other
- targets like `make install' and `make uninstall' work correctly.
- This target is generally not run by end users.
-
-Compilers and Options
-=====================
-
- Some systems require unusual options for compilation or linking that
-the `configure' script does not know about. Run `./configure --help'
-for details on some of the pertinent environment variables.
-
- You can give `configure' initial values for configuration parameters
-by setting variables in the command line or in the environment. Here
-is an example:
-
- ./configure CC=c99 CFLAGS=-g LIBS=-lposix
-
- *Note Defining Variables::, for more details.
-
-Compiling For Multiple Architectures
-====================================
-
- You can compile the package for more than one kind of computer at the
-same time, by placing the object files for each architecture in their
-own directory. To do this, you can use GNU `make'. `cd' to the
-directory where you want the object files and executables to go and run
-the `configure' script. `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'. This
-is known as a "VPATH" build.
-
- With a non-GNU `make', it is safer to compile the package for one
-architecture at a time in the source code directory. After you have
-installed the package for one architecture, use `make distclean' before
-reconfiguring for another architecture.
-
- On MacOS X 10.5 and later systems, you can create libraries and
-executables that work on multiple system types--known as "fat" or
-"universal" binaries--by specifying multiple `-arch' options to the
-compiler but only a single `-arch' option to the preprocessor. Like
-this:
-
- ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
- CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
- CPP="gcc -E" CXXCPP="g++ -E"
-
- This is not guaranteed to produce working output in all cases, you
-may have to build one architecture at a time and combine the results
-using the `lipo' tool if you have problems.
-
-Installation Names
-==================
-
- By default, `make install' installs the package's commands under
-`/usr/local/bin', include files under `/usr/local/include', etc. You
-can specify an installation prefix other than `/usr/local' by giving
-`configure' the option `--prefix=PREFIX', where PREFIX must be an
-absolute file name.
-
- You can specify separate installation prefixes for
-architecture-specific files and architecture-independent files. If you
-pass the option `--exec-prefix=PREFIX' to `configure', the package uses
-PREFIX as the prefix for installing programs and libraries.
-Documentation and other data files still use the regular prefix.
-
- In addition, if you use an unusual directory layout you can give
-options like `--bindir=DIR' to specify different values for particular
-kinds of files. Run `configure --help' for a list of the directories
-you can set and what kinds of files go in them. In general, the
-default for these options is expressed in terms of `${prefix}', so that
-specifying just `--prefix' will affect all of the other directory
-specifications that were not explicitly provided.
-
- The most portable way to affect installation locations is to pass the
-correct locations to `configure'; however, many packages provide one or
-both of the following shortcuts of passing variable assignments to the
-`make install' command line to change installation locations without
-having to reconfigure or recompile.
-
- The first method involves providing an override variable for each
-affected directory. For example, `make install
-prefix=/alternate/directory' will choose an alternate location for all
-directory configuration variables that were expressed in terms of
-`${prefix}'. Any directories that were specified during `configure',
-but not in terms of `${prefix}', must each be overridden at install
-time for the entire installation to be relocated. The approach of
-makefile variable overrides for each directory variable is required by
-the GNU Coding Standards, and ideally causes no recompilation.
-However, some platforms have known limitations with the semantics of
-shared libraries that end up requiring recompilation when using this
-method, particularly noticeable in packages that use GNU Libtool.
-
- The second method involves providing the `DESTDIR' variable. For
-example, `make install DESTDIR=/alternate/directory' will prepend
-`/alternate/directory' before all installation names. The approach of
-`DESTDIR' overrides is not required by the GNU Coding Standards, and
-does not work on platforms that have drive letters. On the other hand,
-it does better at avoiding recompilation issues, and works well even
-when some directory options were not specified in terms of `${prefix}'
-at `configure' time.
-
-Optional Features
-=================
-
- If the package supports it, you can cause programs to be installed
-with an extra prefix or suffix on their names by giving `configure' the
-option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
-
- Some packages pay attention to `--enable-FEATURE' options to
-`configure', where FEATURE indicates an optional part of the package.
-They may also pay attention to `--with-PACKAGE' options, where PACKAGE
-is something like `gnu-as' or `x' (for the X Window System). The
-`README' should mention any `--enable-' and `--with-' options that the
-package recognizes.
-
- For packages that use the X Window System, `configure' can usually
-find the X include and library files automatically, but if it doesn't,
-you can use the `configure' options `--x-includes=DIR' and
-`--x-libraries=DIR' to specify their locations.
-
- Some packages offer the ability to configure how verbose the
-execution of `make' will be. For these packages, running `./configure
---enable-silent-rules' sets the default to minimal output, which can be
-overridden with `make V=1'; while running `./configure
---disable-silent-rules' sets the default to verbose, which can be
-overridden with `make V=0'.
-
-Particular systems
-==================
-
- On HP-UX, the default C compiler is not ANSI C compatible. If GNU
-CC is not installed, it is recommended to use the following options in
-order to use an ANSI C compiler:
-
- ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
-
-and if that doesn't work, install pre-built binaries of GCC for HP-UX.
-
- HP-UX `make' updates targets which have the same time stamps as
-their prerequisites, which makes it generally unusable when shipped
-generated files such as `configure' are involved. Use GNU `make'
-instead.
-
- On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
-parse its `<wchar.h>' header file. The option `-nodtk' can be used as
-a workaround. If GNU CC is not installed, it is therefore recommended
-to try
-
- ./configure CC="cc"
-
-and if that doesn't work, try
-
- ./configure CC="cc -nodtk"
-
- On Solaris, don't put `/usr/ucb' early in your `PATH'. This
-directory contains several dysfunctional programs; working variants of
-these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
-in your `PATH', put it _after_ `/usr/bin'.
-
- On Haiku, software installed for all users goes in `/boot/common',
-not `/usr/local'. It is recommended to use the following options:
-
- ./configure --prefix=/boot/common
-
-Specifying the System Type
-==========================
-
- There may be some features `configure' cannot figure out
-automatically, but needs to determine by the type of machine the package
-will run on. Usually, assuming the package is built to be run on the
-_same_ architectures, `configure' can figure that out, but if it prints
-a message saying it cannot guess the machine type, give it the
-`--build=TYPE' option. TYPE can either be a short name for the system
-type, such as `sun4', or a canonical name which has the form:
-
- CPU-COMPANY-SYSTEM
-
-where SYSTEM can have one of these forms:
-
- OS
- KERNEL-OS
-
- See the file `config.sub' for the possible values of each field. If
-`config.sub' isn't included in this package, then this package doesn't
-need to know the machine type.
-
- If you are _building_ compiler tools for cross-compiling, you should
-use the option `--target=TYPE' to select the type of system they will
-produce code for.
-
- If you want to _use_ a cross compiler, that generates code for a
-platform different from the build platform, you should specify the
-"host" platform (i.e., that on which the generated programs will
-eventually be run) with `--host=TYPE'.
-
-Sharing Defaults
-================
-
- If you want to set default values for `configure' scripts to share,
-you can create a site shell script called `config.site' that gives
-default values for variables like `CC', `cache_file', and `prefix'.
-`configure' looks for `PREFIX/share/config.site' if it exists, then
-`PREFIX/etc/config.site' if it exists. Or, you can set the
-`CONFIG_SITE' environment variable to the location of the site script.
-A warning: not all `configure' scripts look for a site script.
-
-Defining Variables
-==================
-
- Variables not defined in a site shell script can be set in the
-environment passed to `configure'. However, some packages may run
-configure again during the build, and the customized values of these
-variables may be lost. In order to avoid this problem, you should set
-them in the `configure' command line, using `VAR=value'. For example:
-
- ./configure CC=/usr/local2/bin/gcc
-
-causes the specified `gcc' to be used as the C compiler (unless it is
-overridden in the site shell script).
-
-Unfortunately, this technique does not work for `CONFIG_SHELL' due to
-an Autoconf limitation. Until the limitation is lifted, you can use
-this workaround:
-
- CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
-
-`configure' Invocation
-======================
-
- `configure' recognizes the following options to control how it
-operates.
-
-`--help'
-`-h'
- Print a summary of all of the options to `configure', and exit.
-
-`--help=short'
-`--help=recursive'
- Print a summary of the options unique to this package's
- `configure', and exit. The `short' variant lists options used
- only in the top level, while the `recursive' variant lists options
- also present in any nested packages.
-
-`--version'
-`-V'
- Print the version of Autoconf used to generate the `configure'
- script, and exit.
-
-`--cache-file=FILE'
- Enable the cache: use and save the results of the tests in FILE,
- traditionally `config.cache'. FILE defaults to `/dev/null' to
- disable caching.
-
-`--config-cache'
-`-C'
- Alias for `--cache-file=config.cache'.
-
-`--quiet'
-`--silent'
-`-q'
- Do not print messages saying which checks are being made. To
- suppress all normal output, redirect it to `/dev/null' (any error
- messages will still be shown).
-
-`--srcdir=DIR'
- Look for the package's source code in directory DIR. Usually
- `configure' can determine that directory automatically.
-
-`--prefix=DIR'
- Use DIR as the installation prefix. *note Installation Names::
- for more details, including other options available for fine-tuning
- the installation locations.
-
-`--no-create'
-`-n'
- Run the configure checks, but stop before creating any output
- files.
-
-`configure' also accepts some other, not widely useful, options. Run
-`configure --help' for more details.
diff --git a/src/third_party/pcre-8.41/build_posix/config.h b/src/third_party/pcre-8.41/build_posix/config.h
deleted file mode 100644
index 8af8c7add1e..00000000000
--- a/src/third_party/pcre-8.41/build_posix/config.h
+++ /dev/null
@@ -1,348 +0,0 @@
-/* config.h. Generated from config.h.in by configure. */
-/* config.h.in. Generated from configure.ac by autoheader. */
-
-
-/* PCRE is written in Standard C, but there are a few non-standard things it
-can cope with, allowing it to run on SunOS4 and other "close to standard"
-systems.
-
-In environments that support the GNU autotools, config.h.in is converted into
-config.h by the "configure" script. In environments that use CMake,
-config-cmake.in is converted into config.h. If you are going to build PCRE "by
-hand" without using "configure" or CMake, you should copy the distributed
-config.h.generic to config.h, and edit the macro definitions to be the way you
-need them. You must then add -DHAVE_CONFIG_H to all of your compile commands,
-so that config.h is included at the start of every source.
-
-Alternatively, you can avoid editing by using -D on the compiler command line
-to set the macro values. In this case, you do not have to set -DHAVE_CONFIG_H,
-but if you do, default values will be taken from config.h for non-boolean
-macros that are not defined on the command line.
-
-Boolean macros such as HAVE_STDLIB_H and SUPPORT_PCRE8 should either be defined
-(conventionally to 1) for TRUE, and not defined at all for FALSE. All such
-macros are listed as a commented #undef in config.h.generic. Macros such as
-MATCH_LIMIT, whose actual value is relevant, have defaults defined, but are
-surrounded by #ifndef/#endif lines so that the value can be overridden by -D.
-
-PCRE uses memmove() if HAVE_MEMMOVE is defined; otherwise it uses bcopy() if
-HAVE_BCOPY is defined. If your system has neither bcopy() nor memmove(), make
-sure both macros are undefined; an emulation function will then be used. */
-
-/* By default, the \R escape sequence matches any Unicode line ending
- character or sequence of characters. If BSR_ANYCRLF is defined (to any
- value), this is changed so that backslash-R matches only CR, LF, or CRLF.
- The build-time default can be overridden by the user of PCRE at runtime. */
-/* #undef BSR_ANYCRLF */
-
-/* If you are compiling for a system that uses EBCDIC instead of ASCII
- character codes, define this macro to any value. You must also edit the
- NEWLINE macro below to set a suitable EBCDIC newline, commonly 21 (0x15).
- On systems that can use "configure" or CMake to set EBCDIC, NEWLINE is
- automatically adjusted. When EBCDIC is set, PCRE assumes that all input
- strings are in EBCDIC. If you do not define this macro, PCRE will assume
- input strings are ASCII or UTF-8/16/32 Unicode. It is not possible to build
- a version of PCRE that supports both EBCDIC and UTF-8/16/32. */
-/* #undef EBCDIC */
-
-/* In an EBCDIC environment, define this macro to any value to arrange for the
- NL character to be 0x25 instead of the default 0x15. NL plays the role that
- LF does in an ASCII/Unicode environment. The value must also be set in the
- NEWLINE macro below. On systems that can use "configure" or CMake to set
- EBCDIC_NL25, the adjustment of NEWLINE is automatic. */
-/* #undef EBCDIC_NL25 */
-
-/* Define to 1 if you have the `bcopy' function. */
-#define HAVE_BCOPY 1
-
-/* Define to 1 if you have the <bits/type_traits.h> header file. */
-/* #undef HAVE_BITS_TYPE_TRAITS_H */
-
-/* Define to 1 if you have the <bzlib.h> header file. */
-#define HAVE_BZLIB_H 1
-
-/* Define to 1 if you have the <dirent.h> header file. */
-#define HAVE_DIRENT_H 1
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#define HAVE_DLFCN_H 1
-
-/* Define to 1 if you have the <editline/readline.h> header file. */
-/* #undef HAVE_EDITLINE_READLINE_H */
-
-/* Define to 1 if you have the <edit/readline/readline.h> header file. */
-/* #undef HAVE_EDIT_READLINE_READLINE_H */
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
-
-/* Define to 1 if you have the <limits.h> header file. */
-#define HAVE_LIMITS_H 1
-
-/* Define to 1 if the system has the type `long long'. */
-#define HAVE_LONG_LONG 1
-
-/* Define to 1 if you have the `memmove' function. */
-#define HAVE_MEMMOVE 1
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* Define if you have POSIX threads libraries and header files. */
-/* #undef HAVE_PTHREAD */
-
-/* Have PTHREAD_PRIO_INHERIT. */
-/* #undef HAVE_PTHREAD_PRIO_INHERIT */
-
-/* Define to 1 if you have the <readline/history.h> header file. */
-/* #undef HAVE_READLINE_HISTORY_H */
-
-/* Define to 1 if you have the <readline/readline.h> header file. */
-/* #undef HAVE_READLINE_READLINE_H */
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#define HAVE_STDINT_H 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the `strerror' function. */
-#define HAVE_STRERROR 1
-
-/* Define to 1 if you have the <string> header file. */
-#define HAVE_STRING 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define to 1 if you have `strtoimax'. */
-/* #undef HAVE_STRTOIMAX */
-
-/* Define to 1 if you have `strtoll'. */
-/* #undef HAVE_STRTOLL */
-
-/* Define to 1 if you have `strtoq'. */
-#define HAVE_STRTOQ 1
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if you have the <type_traits.h> header file. */
-/* #undef HAVE_TYPE_TRAITS_H */
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* Define to 1 if the system has the type `unsigned long long'. */
-#define HAVE_UNSIGNED_LONG_LONG 1
-
-/* Define to 1 if the compiler supports simple visibility declarations. */
-#define HAVE_VISIBILITY 1
-
-/* Define to 1 if you have the <windows.h> header file. */
-/* #undef HAVE_WINDOWS_H */
-
-/* Define to 1 if you have the <zlib.h> header file. */
-#define HAVE_ZLIB_H 1
-
-/* Define to 1 if you have `_strtoi64'. */
-/* #undef HAVE__STRTOI64 */
-
-/* The value of LINK_SIZE determines the number of bytes used to store links
- as offsets within the compiled regex. The default is 2, which allows for
- compiled patterns up to 64K long. This covers the vast majority of cases.
- However, PCRE can also be compiled to use 3 or 4 bytes instead. This allows
- for longer patterns in extreme cases. */
-#define LINK_SIZE 2
-
-/* Define to the sub-directory where libtool stores uninstalled libraries. */
-#define LT_OBJDIR ".libs/"
-
-/* The value of MATCH_LIMIT determines the default number of times the
- internal match() function can be called during a single execution of
- pcre_exec(). There is a runtime interface for setting a different limit.
- The limit exists in order to catch runaway regular expressions that take
- for ever to determine that they do not match. The default is set very large
- so that it does not accidentally catch legitimate cases. */
-#define MATCH_LIMIT 200000
-
-/* The above limit applies to all calls of match(), whether or not they
- increase the recursion depth. In some environments it is desirable to limit
- the depth of recursive calls of match() more strictly, in order to restrict
- the maximum amount of stack (or heap, if NO_RECURSE is defined) that is
- used. The value of MATCH_LIMIT_RECURSION applies only to recursive calls of
- match(). To have any useful effect, it must be less than the value of
- MATCH_LIMIT. The default is to use the same value as MATCH_LIMIT. There is
- a runtime method for setting a different limit. */
-#define MATCH_LIMIT_RECURSION 4000
-
-/* This limit is parameterized just in case anybody ever wants to change it.
- Care must be taken if it is increased, because it guards against integer
- overflow caused by enormously large patterns. */
-#define MAX_NAME_COUNT 10000
-
-/* This limit is parameterized just in case anybody ever wants to change it.
- Care must be taken if it is increased, because it guards against integer
- overflow caused by enormously large patterns. */
-#define MAX_NAME_SIZE 32
-
-/* The value of NEWLINE determines the default newline character sequence.
- PCRE client programs can override this by selecting other values at run
- time. In ASCII environments, the value can be 10 (LF), 13 (CR), or 3338
- (CRLF); in EBCDIC environments the value can be 21 or 37 (LF), 13 (CR), or
- 3349 or 3365 (CRLF) because there are two alternative codepoints (0x15 and
- 0x25) that are used as the NL line terminator that is equivalent to ASCII
- LF. In both ASCII and EBCDIC environments the value can also be -1 (ANY),
- or -2 (ANYCRLF). */
-#define NEWLINE 10
-
-/* PCRE uses recursive function calls to handle backtracking while matching.
- This can sometimes be a problem on systems that have stacks of limited
- size. Define NO_RECURSE to any value to get a version that doesn't use
- recursion in the match() function; instead it creates its own stack by
- steam using pcre_recurse_malloc() to obtain memory from the heap. For more
- detail, see the comments and other stuff just above the match() function.
- */
-#define NO_RECURSE /**/
-
-/* Name of package */
-#define PACKAGE "pcre"
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT ""
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME "PCRE"
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "PCRE 8.41"
-
-/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME "pcre"
-
-/* Define to the home page for this package. */
-#define PACKAGE_URL ""
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION "8.41"
-
-/* 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
- stack that is used while compiling a pattern. */
-#define PARENS_NEST_LIMIT 250
-
-/* to make a symbol visible */
-#define PCRECPP_EXP_DECL extern __attribute__ ((visibility ("default")))
-
-/* to make a symbol visible */
-#define PCRECPP_EXP_DEFN __attribute__ ((visibility ("default")))
-
-/* The value of PCREGREP_BUFSIZE determines the size of buffer used by
- pcregrep to hold parts of the file it is searching. This is also the
- minimum value. The actual amount of memory used by pcregrep is three times
- this number, because it allows for the buffering of "before" and "after"
- lines. */
-#define PCREGREP_BUFSIZE 20480
-
-/* to make a symbol visible */
-#define PCREPOSIX_EXP_DECL extern __attribute__ ((visibility ("default")))
-
-/* to make a symbol visible */
-#define PCREPOSIX_EXP_DEFN extern __attribute__ ((visibility ("default")))
-
-/* to make a symbol visible */
-#define PCRE_EXP_DATA_DEFN __attribute__ ((visibility ("default")))
-
-/* to make a symbol visible */
-#define PCRE_EXP_DECL extern __attribute__ ((visibility ("default")))
-
-
-/* If you are compiling for a system other than a Unix-like system or
- Win32, and it needs some magic to be inserted before the definition
- of a function that is exported by the library, define this macro to
- contain the relevant magic. If you do not define this macro, a suitable
- __declspec value is used for Windows systems; in other environments
- "extern" is used for a C compiler and "extern C" for a C++ compiler.
- This macro apears at the start of every exported function that is part
- of the external API. It does not appear on functions that are "external"
- in the C sense, but which are internal to the library. */
-#define PCRE_EXP_DEFN __attribute__ ((visibility ("default")))
-
-/* Define to any value if linking statically (TODO: make nice with Libtool) */
-#define PCRE_STATIC 1
-
-/* When calling PCRE via the POSIX interface, additional working storage is
- required for holding the pointers to capturing substrings because PCRE
- requires three integers per substring, whereas the POSIX interface provides
- only two. If the number of expected substrings is small, the wrapper
- function uses space on the stack, because this is faster than using
- malloc() for each call. The threshold above which the stack is no longer
- used is defined by POSIX_MALLOC_THRESHOLD. */
-#define POSIX_MALLOC_THRESHOLD 10
-
-/* Define to necessary symbol if this constant uses a non-standard name on
- your system. */
-/* #undef PTHREAD_CREATE_JOINABLE */
-
-/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Define to any value to enable support for Just-In-Time compiling. */
-/* #undef SUPPORT_JIT */
-
-/* Define to any value to allow pcregrep to be linked with libbz2, so that it
- is able to handle .bz2 files. */
-/* #undef SUPPORT_LIBBZ2 */
-
-/* Define to any value to allow pcretest to be linked with libedit. */
-/* #undef SUPPORT_LIBEDIT */
-
-/* Define to any value to allow pcretest to be linked with libreadline. */
-/* #undef SUPPORT_LIBREADLINE */
-
-/* Define to any value to allow pcregrep to be linked with libz, so that it is
- able to handle .gz files. */
-/* #undef SUPPORT_LIBZ */
-
-/* Define to any value to enable the 16 bit PCRE library. */
-/* #undef SUPPORT_PCRE16 */
-
-/* Define to any value to enable the 32 bit PCRE library. */
-/* #undef SUPPORT_PCRE32 */
-
-/* Define to any value to enable the 8 bit PCRE library. */
-#define SUPPORT_PCRE8 /**/
-
-/* Define to any value to enable JIT support in pcregrep. */
-/* #undef SUPPORT_PCREGREP_JIT */
-
-/* Define to any value to enable support for Unicode properties. */
-#define SUPPORT_UCP /**/
-
-/* Define to any value to enable support for the UTF-8/16/32 Unicode encoding.
- This will work even in an EBCDIC environment, but it is incompatible with
- the EBCDIC macro. That is, PCRE can support *either* EBCDIC code *or*
- ASCII/UTF-8/16/32, but not both at once. */
-#define SUPPORT_UTF /**/
-
-/* Define to any value for valgrind support to find invalid memory reads. */
-/* #undef SUPPORT_VALGRIND */
-
-/* Version number of package */
-#define VERSION "8.41"
-
-/* Define to empty if `const' does not conform to ANSI C. */
-/* #undef const */
-
-/* Define to the type of a signed integer type of width exactly 64 bits if
- such a type exists and the standard includes do not define it. */
-/* #undef int64_t */
-
-/* Define to `unsigned int' if <sys/types.h> does not define. */
-/* #undef size_t */
diff --git a/src/third_party/pcre-8.41/132html b/src/third_party/pcre-8.42/132html
index e00024970a5..e00024970a5 100755
--- a/src/third_party/pcre-8.41/132html
+++ b/src/third_party/pcre-8.42/132html
diff --git a/src/third_party/pcre-8.41/AUTHORS b/src/third_party/pcre-8.42/AUTHORS
index 291657caef1..eb9b1a44b34 100644
--- a/src/third_party/pcre-8.41/AUTHORS
+++ b/src/third_party/pcre-8.42/AUTHORS
@@ -8,7 +8,7 @@ Email domain: cam.ac.uk
University of Cambridge Computing Service,
Cambridge, England.
-Copyright (c) 1997-2017 University of Cambridge
+Copyright (c) 1997-2018 University of Cambridge
All rights reserved
@@ -19,7 +19,7 @@ Written by: Zoltan Herczeg
Email local part: hzmester
Emain domain: freemail.hu
-Copyright(c) 2010-2017 Zoltan Herczeg
+Copyright(c) 2010-2018 Zoltan Herczeg
All rights reserved.
@@ -30,7 +30,7 @@ Written by: Zoltan Herczeg
Email local part: hzmester
Emain domain: freemail.hu
-Copyright(c) 2009-2017 Zoltan Herczeg
+Copyright(c) 2009-2018 Zoltan Herczeg
All rights reserved.
diff --git a/src/third_party/pcre-8.41/COPYING b/src/third_party/pcre-8.42/COPYING
index 58eed01b61d..58eed01b61d 100644
--- a/src/third_party/pcre-8.41/COPYING
+++ b/src/third_party/pcre-8.42/COPYING
diff --git a/src/third_party/pcre-8.41/ChangeLog b/src/third_party/pcre-8.42/ChangeLog
index 590a7542885..7b53195f6a6 100644
--- a/src/third_party/pcre-8.41/ChangeLog
+++ b/src/third_party/pcre-8.42/ChangeLog
@@ -4,6 +4,59 @@ ChangeLog for PCRE
Note that the PCRE 8.xx series (PCRE1) is now in a bugfix-only state. All
development is happening in the PCRE2 10.xx series.
+
+Version 8.42 20-March-2018
+--------------------------
+
+1. Fixed a MIPS issue in the JIT compiler reported by Joshua Kinard.
+
+2. Fixed outdated real_pcre definitions in pcre.h.in (patch by Evgeny Kotkov).
+
+3. pcregrep was truncating components of file names to 128 characters when
+processing files with the -r option, and also (some very odd code) truncating
+path names to 512 characters. There is now a check on the absolute length of
+full path file names, which may be up to 2047 characters long.
+
+4. Using pcre_dfa_exec(), in UTF mode when UCP support was not defined, there
+was the possibility of a false positive match when caselessly matching a "not
+this character" item such as [^\x{1234}] (with a code point greater than 127)
+because the "other case" variable was not being initialized.
+
+5. Although pcre_jit_exec checks whether the pattern is compiled
+in a given mode, it was also expected that at least one mode is available.
+This is fixed and pcre_jit_exec returns with PCRE_ERROR_JIT_BADOPTION
+when the pattern is not optimized by JIT at all.
+
+6. The line number and related variables such as match counts in pcregrep
+were all int variables, causing overflow when files with more than 2147483647
+lines were processed (assuming 32-bit ints). They have all been changed to
+unsigned long ints.
+
+7. If a backreference with a minimum repeat count of zero was first in a
+pattern, apart from assertions, an incorrect first matching character could be
+recorded. For example, for the pattern /(?=(a))\1?b/, "b" was incorrectly set
+as the first character of a match.
+
+8. Fix out-of-bounds read for partial matching of /./ against an empty string
+when the newline type is CRLF.
+
+9. When matching using the the REG_STARTEND feature of the POSIX API with a
+non-zero starting offset, unset capturing groups with lower numbers than a
+group that did capture something were not being correctly returned as "unset"
+(that is, with offset values of -1).
+
+10. Matching the pattern /(*UTF)\C[^\v]+\x80/ against an 8-bit string
+containing multi-code-unit characters caused bad behaviour and possibly a
+crash. This issue was fixed for other kinds of repeat in release 8.37 by change
+38, but repeating character classes were overlooked.
+
+11. A small fix to pcregrep to avoid compiler warnings for -Wformat-overflow=2.
+
+12. Added --enable-jit=auto support to configure.ac.
+
+13. Fix misleading error message in configure.ac.
+
+
Version 8.41 05-July-2017
-------------------------
diff --git a/src/third_party/pcre-8.41/CheckMan b/src/third_party/pcre-8.42/CheckMan
index 480d735481e..480d735481e 100755
--- a/src/third_party/pcre-8.41/CheckMan
+++ b/src/third_party/pcre-8.42/CheckMan
diff --git a/src/third_party/pcre-8.41/CleanTxt b/src/third_party/pcre-8.42/CleanTxt
index 1f42519c8d7..1f42519c8d7 100755
--- a/src/third_party/pcre-8.41/CleanTxt
+++ b/src/third_party/pcre-8.42/CleanTxt
diff --git a/src/third_party/pcre-8.41/Detrail b/src/third_party/pcre-8.42/Detrail
index 1c5c7e9cae1..1c5c7e9cae1 100755
--- a/src/third_party/pcre-8.41/Detrail
+++ b/src/third_party/pcre-8.42/Detrail
diff --git a/src/third_party/pcre-8.41/HACKING b/src/third_party/pcre-8.42/HACKING
index 691b7a14e50..691b7a14e50 100644
--- a/src/third_party/pcre-8.41/HACKING
+++ b/src/third_party/pcre-8.42/HACKING
diff --git a/src/third_party/pcre-8.42/INSTALL b/src/third_party/pcre-8.42/INSTALL
new file mode 100644
index 00000000000..8865734f81b
--- /dev/null
+++ b/src/third_party/pcre-8.42/INSTALL
@@ -0,0 +1,368 @@
+Installation Instructions
+*************************
+
+ Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software
+Foundation, Inc.
+
+ Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved. This file is offered as-is,
+without warranty of any kind.
+
+Basic Installation
+==================
+
+ Briefly, the shell command './configure && make && make install'
+should configure, build, and install this package. The following
+more-detailed instructions are generic; see the 'README' file for
+instructions specific to this package. Some packages provide this
+'INSTALL' file but do not implement all of the features documented
+below. The lack of an optional feature in a given package is not
+necessarily a bug. More recommendations for GNU packages can be found
+in *note Makefile Conventions: (standards)Makefile Conventions.
+
+ The 'configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a 'Makefile' in each directory of the package.
+It may also create one or more '.h' files containing system-dependent
+definitions. Finally, it creates a shell script 'config.status' that
+you can run in the future to recreate the current configuration, and a
+file 'config.log' containing compiler output (useful mainly for
+debugging 'configure').
+
+ It can also use an optional file (typically called 'config.cache' and
+enabled with '--cache-file=config.cache' or simply '-C') that saves the
+results of its tests to speed up reconfiguring. Caching is disabled by
+default to prevent problems with accidental use of stale cache files.
+
+ If you need to do unusual things to compile the package, please try
+to figure out how 'configure' could check whether to do them, and mail
+diffs or instructions to the address given in the 'README' so they can
+be considered for the next release. If you are using the cache, and at
+some point 'config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+ The file 'configure.ac' (or 'configure.in') is used to create
+'configure' by a program called 'autoconf'. You need 'configure.ac' if
+you want to change it or regenerate 'configure' using a newer version of
+'autoconf'.
+
+ The simplest way to compile this package is:
+
+ 1. 'cd' to the directory containing the package's source code and type
+ './configure' to configure the package for your system.
+
+ Running 'configure' might take a while. While running, it prints
+ some messages telling which features it is checking for.
+
+ 2. Type 'make' to compile the package.
+
+ 3. Optionally, type 'make check' to run any self-tests that come with
+ the package, generally using the just-built uninstalled binaries.
+
+ 4. Type 'make install' to install the programs and any data files and
+ documentation. When installing into a prefix owned by root, it is
+ recommended that the package be configured and built as a regular
+ user, and only the 'make install' phase executed with root
+ privileges.
+
+ 5. Optionally, type 'make installcheck' to repeat any self-tests, but
+ this time using the binaries in their final installed location.
+ This target does not install anything. Running this target as a
+ regular user, particularly if the prior 'make install' required
+ root privileges, verifies that the installation completed
+ correctly.
+
+ 6. You can remove the program binaries and object files from the
+ source code directory by typing 'make clean'. To also remove the
+ files that 'configure' created (so you can compile the package for
+ a different kind of computer), type 'make distclean'. There is
+ also a 'make maintainer-clean' target, but that is intended mainly
+ for the package's developers. If you use it, you may have to get
+ all sorts of other programs in order to regenerate files that came
+ with the distribution.
+
+ 7. Often, you can also type 'make uninstall' to remove the installed
+ files again. In practice, not all packages have tested that
+ uninstallation works correctly, even though it is required by the
+ GNU Coding Standards.
+
+ 8. Some packages, particularly those that use Automake, provide 'make
+ distcheck', which can by used by developers to test that all other
+ targets like 'make install' and 'make uninstall' work correctly.
+ This target is generally not run by end users.
+
+Compilers and Options
+=====================
+
+ Some systems require unusual options for compilation or linking that
+the 'configure' script does not know about. Run './configure --help'
+for details on some of the pertinent environment variables.
+
+ You can give 'configure' initial values for configuration parameters
+by setting variables in the command line or in the environment. Here is
+an example:
+
+ ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+ *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+ You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you can use GNU 'make'. 'cd' to the
+directory where you want the object files and executables to go and run
+the 'configure' script. 'configure' automatically checks for the source
+code in the directory that 'configure' is in and in '..'. This is known
+as a "VPATH" build.
+
+ With a non-GNU 'make', it is safer to compile the package for one
+architecture at a time in the source code directory. After you have
+installed the package for one architecture, use 'make distclean' before
+reconfiguring for another architecture.
+
+ On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple '-arch' options to the
+compiler but only a single '-arch' option to the preprocessor. Like
+this:
+
+ ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+ CPP="gcc -E" CXXCPP="g++ -E"
+
+ This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the 'lipo' tool if you have problems.
+
+Installation Names
+==================
+
+ By default, 'make install' installs the package's commands under
+'/usr/local/bin', include files under '/usr/local/include', etc. You
+can specify an installation prefix other than '/usr/local' by giving
+'configure' the option '--prefix=PREFIX', where PREFIX must be an
+absolute file name.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+pass the option '--exec-prefix=PREFIX' to 'configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+ In addition, if you use an unusual directory layout you can give
+options like '--bindir=DIR' to specify different values for particular
+kinds of files. Run 'configure --help' for a list of the directories
+you can set and what kinds of files go in them. In general, the default
+for these options is expressed in terms of '${prefix}', so that
+specifying just '--prefix' will affect all of the other directory
+specifications that were not explicitly provided.
+
+ The most portable way to affect installation locations is to pass the
+correct locations to 'configure'; however, many packages provide one or
+both of the following shortcuts of passing variable assignments to the
+'make install' command line to change installation locations without
+having to reconfigure or recompile.
+
+ The first method involves providing an override variable for each
+affected directory. For example, 'make install
+prefix=/alternate/directory' will choose an alternate location for all
+directory configuration variables that were expressed in terms of
+'${prefix}'. Any directories that were specified during 'configure',
+but not in terms of '${prefix}', must each be overridden at install time
+for the entire installation to be relocated. The approach of makefile
+variable overrides for each directory variable is required by the GNU
+Coding Standards, and ideally causes no recompilation. However, some
+platforms have known limitations with the semantics of shared libraries
+that end up requiring recompilation when using this method, particularly
+noticeable in packages that use GNU Libtool.
+
+ The second method involves providing the 'DESTDIR' variable. For
+example, 'make install DESTDIR=/alternate/directory' will prepend
+'/alternate/directory' before all installation names. The approach of
+'DESTDIR' overrides is not required by the GNU Coding Standards, and
+does not work on platforms that have drive letters. On the other hand,
+it does better at avoiding recompilation issues, and works well even
+when some directory options were not specified in terms of '${prefix}'
+at 'configure' time.
+
+Optional Features
+=================
+
+ If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving 'configure' the
+option '--program-prefix=PREFIX' or '--program-suffix=SUFFIX'.
+
+ Some packages pay attention to '--enable-FEATURE' options to
+'configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to '--with-PACKAGE' options, where PACKAGE
+is something like 'gnu-as' or 'x' (for the X Window System). The
+'README' should mention any '--enable-' and '--with-' options that the
+package recognizes.
+
+ For packages that use the X Window System, 'configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the 'configure' options '--x-includes=DIR' and
+'--x-libraries=DIR' to specify their locations.
+
+ Some packages offer the ability to configure how verbose the
+execution of 'make' will be. For these packages, running './configure
+--enable-silent-rules' sets the default to minimal output, which can be
+overridden with 'make V=1'; while running './configure
+--disable-silent-rules' sets the default to verbose, which can be
+overridden with 'make V=0'.
+
+Particular systems
+==================
+
+ On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC
+is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+ ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+ HP-UX 'make' updates targets which have the same time stamps as their
+prerequisites, which makes it generally unusable when shipped generated
+files such as 'configure' are involved. Use GNU 'make' instead.
+
+ On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its '<wchar.h>' header file. The option '-nodtk' can be used as a
+workaround. If GNU CC is not installed, it is therefore recommended to
+try
+
+ ./configure CC="cc"
+
+and if that doesn't work, try
+
+ ./configure CC="cc -nodtk"
+
+ On Solaris, don't put '/usr/ucb' early in your 'PATH'. This
+directory contains several dysfunctional programs; working variants of
+these programs are available in '/usr/bin'. So, if you need '/usr/ucb'
+in your 'PATH', put it _after_ '/usr/bin'.
+
+ On Haiku, software installed for all users goes in '/boot/common',
+not '/usr/local'. It is recommended to use the following options:
+
+ ./configure --prefix=/boot/common
+
+Specifying the System Type
+==========================
+
+ There may be some features 'configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on. Usually, assuming the package is built to be run on the
+_same_ architectures, 'configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+'--build=TYPE' option. TYPE can either be a short name for the system
+type, such as 'sun4', or a canonical name which has the form:
+
+ CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+ OS
+ KERNEL-OS
+
+ See the file 'config.sub' for the possible values of each field. If
+'config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+ If you are _building_ compiler tools for cross-compiling, you should
+use the option '--target=TYPE' to select the type of system they will
+produce code for.
+
+ If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with '--host=TYPE'.
+
+Sharing Defaults
+================
+
+ If you want to set default values for 'configure' scripts to share,
+you can create a site shell script called 'config.site' that gives
+default values for variables like 'CC', 'cache_file', and 'prefix'.
+'configure' looks for 'PREFIX/share/config.site' if it exists, then
+'PREFIX/etc/config.site' if it exists. Or, you can set the
+'CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all 'configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+ Variables not defined in a site shell script can be set in the
+environment passed to 'configure'. However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost. In order to avoid this problem, you should set
+them in the 'configure' command line, using 'VAR=value'. For example:
+
+ ./configure CC=/usr/local2/bin/gcc
+
+causes the specified 'gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for 'CONFIG_SHELL' due to an
+Autoconf limitation. Until the limitation is lifted, you can use this
+workaround:
+
+ CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+'configure' Invocation
+======================
+
+ 'configure' recognizes the following options to control how it
+operates.
+
+'--help'
+'-h'
+ Print a summary of all of the options to 'configure', and exit.
+
+'--help=short'
+'--help=recursive'
+ Print a summary of the options unique to this package's
+ 'configure', and exit. The 'short' variant lists options used only
+ in the top level, while the 'recursive' variant lists options also
+ present in any nested packages.
+
+'--version'
+'-V'
+ Print the version of Autoconf used to generate the 'configure'
+ script, and exit.
+
+'--cache-file=FILE'
+ Enable the cache: use and save the results of the tests in FILE,
+ traditionally 'config.cache'. FILE defaults to '/dev/null' to
+ disable caching.
+
+'--config-cache'
+'-C'
+ Alias for '--cache-file=config.cache'.
+
+'--quiet'
+'--silent'
+'-q'
+ Do not print messages saying which checks are being made. To
+ suppress all normal output, redirect it to '/dev/null' (any error
+ messages will still be shown).
+
+'--srcdir=DIR'
+ Look for the package's source code in directory DIR. Usually
+ 'configure' can determine that directory automatically.
+
+'--prefix=DIR'
+ Use DIR as the installation prefix. *note Installation Names:: for
+ more details, including other options available for fine-tuning the
+ installation locations.
+
+'--no-create'
+'-n'
+ Run the configure checks, but stop before creating any output
+ files.
+
+'configure' also accepts some other, not widely useful, options. Run
+'configure --help' for more details.
diff --git a/src/third_party/pcre-8.41/LICENCE b/src/third_party/pcre-8.42/LICENCE
index dd9071a8dd8..f6ef7fd7664 100644
--- a/src/third_party/pcre-8.41/LICENCE
+++ b/src/third_party/pcre-8.42/LICENCE
@@ -25,7 +25,7 @@ Email domain: cam.ac.uk
University of Cambridge Computing Service,
Cambridge, England.
-Copyright (c) 1997-2017 University of Cambridge
+Copyright (c) 1997-2018 University of Cambridge
All rights reserved.
@@ -36,7 +36,7 @@ Written by: Zoltan Herczeg
Email local part: hzmester
Emain domain: freemail.hu
-Copyright(c) 2010-2017 Zoltan Herczeg
+Copyright(c) 2010-2018 Zoltan Herczeg
All rights reserved.
@@ -47,7 +47,7 @@ Written by: Zoltan Herczeg
Email local part: hzmester
Emain domain: freemail.hu
-Copyright(c) 2009-2017 Zoltan Herczeg
+Copyright(c) 2009-2018 Zoltan Herczeg
All rights reserved.
diff --git a/src/third_party/pcre-8.41/NEWS b/src/third_party/pcre-8.42/NEWS
index 36be07cb880..09b4ad36003 100644
--- a/src/third_party/pcre-8.41/NEWS
+++ b/src/third_party/pcre-8.42/NEWS
@@ -1,6 +1,12 @@
News about PCRE releases
------------------------
+Release 8.42 20-March-2018
+--------------------------
+
+This is a bug-fix release.
+
+
Release 8.41 13-June-2017
-------------------------
diff --git a/src/third_party/pcre-8.41/NON-AUTOTOOLS-BUILD b/src/third_party/pcre-8.42/NON-AUTOTOOLS-BUILD
index 3910059106b..37f6164475b 100644
--- a/src/third_party/pcre-8.41/NON-AUTOTOOLS-BUILD
+++ b/src/third_party/pcre-8.42/NON-AUTOTOOLS-BUILD
@@ -760,13 +760,14 @@ The character code used is EBCDIC, not ASCII or Unicode. In z/OS, UNIX APIs and
applications can be supported through UNIX System Services, and in such an
environment PCRE can be built in the same way as in other systems. However, in
native z/OS (without UNIX System Services) and in z/VM, special ports are
-required. For details, please see this web site:
+required. PCRE1 version 8.39 is available in file 882 on this site:
- http://www.zaconsultants.net
+ http://www.cbttape.org
-You may download PCRE from WWW.CBTTAPE.ORG, file 882.  Everything, source and
-executable, is in EBCDIC and native z/OS file formats and this is the
-recommended download site.
+Everything, source and executable, is in EBCDIC and native z/OS file formats.
+However, this software is not maintained and will not be upgraded. If you are
+new to PCRE you should be looking at PCRE2 (version 10.30 or later).
-==========================
-Last Updated: 25 June 2015
+===============================
+Last Updated: 13 September 2017
+===============================
diff --git a/src/third_party/pcre-8.41/NON-UNIX-USE b/src/third_party/pcre-8.42/NON-UNIX-USE
index a25546b6ff5..a25546b6ff5 100644
--- a/src/third_party/pcre-8.41/NON-UNIX-USE
+++ b/src/third_party/pcre-8.42/NON-UNIX-USE
diff --git a/src/third_party/pcre-8.41/PrepareRelease b/src/third_party/pcre-8.42/PrepareRelease
index 9891e08d67f..9891e08d67f 100755
--- a/src/third_party/pcre-8.41/PrepareRelease
+++ b/src/third_party/pcre-8.42/PrepareRelease
diff --git a/src/third_party/pcre-8.41/README b/src/third_party/pcre-8.42/README
index 4887ebf350e..4887ebf350e 100644
--- a/src/third_party/pcre-8.41/README
+++ b/src/third_party/pcre-8.42/README
diff --git a/src/third_party/pcre-8.41/RunGrepTest b/src/third_party/pcre-8.42/RunGrepTest
index 721ec5184ab..721ec5184ab 100755
--- a/src/third_party/pcre-8.41/RunGrepTest
+++ b/src/third_party/pcre-8.42/RunGrepTest
diff --git a/src/third_party/pcre-8.41/RunTest b/src/third_party/pcre-8.42/RunTest
index 357a739b75f..357a739b75f 100755
--- a/src/third_party/pcre-8.41/RunTest
+++ b/src/third_party/pcre-8.42/RunTest
diff --git a/src/third_party/pcre-8.41/RunTest.bat b/src/third_party/pcre-8.42/RunTest.bat
index 35d7f71f9e8..35d7f71f9e8 100644
--- a/src/third_party/pcre-8.41/RunTest.bat
+++ b/src/third_party/pcre-8.42/RunTest.bat
diff --git a/src/third_party/pcre-8.41/SConscript b/src/third_party/pcre-8.42/SConscript
index e7b9a59a550..e7b9a59a550 100644
--- a/src/third_party/pcre-8.41/SConscript
+++ b/src/third_party/pcre-8.42/SConscript
diff --git a/src/third_party/pcre-8.41/ar-lib b/src/third_party/pcre-8.42/ar-lib
index 463b9ec0206..05094d34c69 100755
--- a/src/third_party/pcre-8.41/ar-lib
+++ b/src/third_party/pcre-8.42/ar-lib
@@ -4,7 +4,7 @@
me=ar-lib
scriptversion=2012-03-01.08; # UTC
-# Copyright (C) 2010-2014 Free Software Foundation, Inc.
+# Copyright (C) 2010-2017 Free Software Foundation, Inc.
# Written by Peter Rosin <peda@lysator.liu.se>.
#
# This program is free software; you can redistribute it and/or modify
diff --git a/src/third_party/pcre-8.41/build_solaris/config.h b/src/third_party/pcre-8.42/build_posix/config.h
index 164bd8a2e39..74769479993 100644
--- a/src/third_party/pcre-8.41/build_solaris/config.h
+++ b/src/third_party/pcre-8.42/build_posix/config.h
@@ -125,7 +125,7 @@ sure both macros are undefined; an emulation function will then be used. */
#define HAVE_STRTOLL 1
/* Define to 1 if you have `strtoq'. */
-/* #undef HAVE_STRTOQ */
+/* #define HAVE_STRTOQ 1 */
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
@@ -221,7 +221,7 @@ sure both macros are undefined; an emulation function will then be used. */
#define PACKAGE_NAME "PCRE"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "PCRE 8.41"
+#define PACKAGE_STRING "PCRE 8.42"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "pcre"
@@ -230,7 +230,7 @@ sure both macros are undefined; an emulation function will then be used. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
-#define PACKAGE_VERSION "8.41"
+#define PACKAGE_VERSION "8.42"
/* 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
@@ -335,7 +335,7 @@ sure both macros are undefined; an emulation function will then be used. */
/* #undef SUPPORT_VALGRIND */
/* Version number of package */
-#define VERSION "8.41"
+#define VERSION "8.42"
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
diff --git a/src/third_party/pcre-8.41/build_windows/config.h b/src/third_party/pcre-8.42/build_windows/config.h
index 2e8d4ec7b6a..2e8d4ec7b6a 100755
--- a/src/third_party/pcre-8.41/build_windows/config.h
+++ b/src/third_party/pcre-8.42/build_windows/config.h
diff --git a/src/third_party/pcre-8.41/dftables.c b/src/third_party/pcre-8.42/dftables.c
index 1fdc8e0f231..1fdc8e0f231 100644
--- a/src/third_party/pcre-8.41/dftables.c
+++ b/src/third_party/pcre-8.42/dftables.c
diff --git a/src/third_party/pcre-8.41/libpcre.pc.in b/src/third_party/pcre-8.42/libpcre.pc.in
index 0a35da87f85..0a35da87f85 100644
--- a/src/third_party/pcre-8.41/libpcre.pc.in
+++ b/src/third_party/pcre-8.42/libpcre.pc.in
diff --git a/src/third_party/pcre-8.41/libpcre16.pc.in b/src/third_party/pcre-8.42/libpcre16.pc.in
index 080c9dcfe8a..080c9dcfe8a 100644
--- a/src/third_party/pcre-8.41/libpcre16.pc.in
+++ b/src/third_party/pcre-8.42/libpcre16.pc.in
diff --git a/src/third_party/pcre-8.41/libpcre32.pc.in b/src/third_party/pcre-8.42/libpcre32.pc.in
index a3ae0e11fcf..a3ae0e11fcf 100644
--- a/src/third_party/pcre-8.41/libpcre32.pc.in
+++ b/src/third_party/pcre-8.42/libpcre32.pc.in
diff --git a/src/third_party/pcre-8.41/libpcrecpp.pc.in b/src/third_party/pcre-8.42/libpcrecpp.pc.in
index ef006fe47aa..ef006fe47aa 100644
--- a/src/third_party/pcre-8.41/libpcrecpp.pc.in
+++ b/src/third_party/pcre-8.42/libpcrecpp.pc.in
diff --git a/src/third_party/pcre-8.41/libpcreposix.pc.in b/src/third_party/pcre-8.42/libpcreposix.pc.in
index c6c0b0c6c66..c6c0b0c6c66 100644
--- a/src/third_party/pcre-8.41/libpcreposix.pc.in
+++ b/src/third_party/pcre-8.42/libpcreposix.pc.in
diff --git a/src/third_party/pcre-8.41/makevp.bat b/src/third_party/pcre-8.42/makevp.bat
index 5f795487eb9..5f795487eb9 100644
--- a/src/third_party/pcre-8.41/makevp.bat
+++ b/src/third_party/pcre-8.42/makevp.bat
diff --git a/src/third_party/pcre-8.41/makevp_c.txt b/src/third_party/pcre-8.42/makevp_c.txt
index 5648115405d..5648115405d 100644
--- a/src/third_party/pcre-8.41/makevp_c.txt
+++ b/src/third_party/pcre-8.42/makevp_c.txt
diff --git a/src/third_party/pcre-8.41/makevp_l.txt b/src/third_party/pcre-8.42/makevp_l.txt
index 9b071e0f90a..9b071e0f90a 100644
--- a/src/third_party/pcre-8.41/makevp_l.txt
+++ b/src/third_party/pcre-8.42/makevp_l.txt
diff --git a/src/third_party/pcre-8.42/patches/0001-SERVER-38002-Fix-typo-in-HAVE_STRTOLL-define.patch b/src/third_party/pcre-8.42/patches/0001-SERVER-38002-Fix-typo-in-HAVE_STRTOLL-define.patch
new file mode 100644
index 00000000000..e267bb68cfe
--- /dev/null
+++ b/src/third_party/pcre-8.42/patches/0001-SERVER-38002-Fix-typo-in-HAVE_STRTOLL-define.patch
@@ -0,0 +1,29 @@
+From 4194a80db9aad98d370840c69e0b8084b7768adc Mon Sep 17 00:00:00 2001
+From: Mathew Robinson <chasinglogic@gmail.com>
+Date: Sat, 15 Dec 2018 11:39:19 -0500
+Subject: [PATCH] SERVER-38002 Fix typo in HAVE_STRTOLL define
+
+---
+ src/third_party/pcre-8.42/build_posix/config.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/third_party/pcre-8.42/build_posix/config.h b/src/third_party/pcre-8.42/build_posix/config.h
+index f16a434edb..7476947999 100644
+--- a/src/third_party/pcre-8.42/build_posix/config.h
++++ b/src/third_party/pcre-8.42/build_posix/config.h
+@@ -122,10 +122,10 @@ sure both macros are undefined; an emulation function will then be used. */
+ /* #undef HAVE_STRTOIMAX */
+
+ /* Define to 1 if you have `strtoll'. */
+-/* #undef HAVE_STRTOLL */
++#define HAVE_STRTOLL 1
+
+ /* Define to 1 if you have `strtoq'. */
+-#define HAVE_STRTOQ 1
++/* #define HAVE_STRTOQ 1 */
+
+ /* Define to 1 if you have the <sys/stat.h> header file. */
+ #define HAVE_SYS_STAT_H 1
+--
+2.20.0
+
diff --git a/src/third_party/pcre-8.41/pcre-config.in b/src/third_party/pcre-8.42/pcre-config.in
index ac06a3325bc..ac06a3325bc 100644
--- a/src/third_party/pcre-8.41/pcre-config.in
+++ b/src/third_party/pcre-8.42/pcre-config.in
diff --git a/src/third_party/pcre-8.41/pcre.h b/src/third_party/pcre-8.42/pcre.h
index 442c6bdb5fe..0efad3f9511 100644
--- a/src/third_party/pcre-8.41/pcre.h
+++ b/src/third_party/pcre-8.42/pcre.h
@@ -42,9 +42,9 @@ POSSIBILITY OF SUCH DAMAGE.
/* The current PCRE version information. */
#define PCRE_MAJOR 8
-#define PCRE_MINOR 41
+#define PCRE_MINOR 42
#define PCRE_PRERELEASE
-#define PCRE_DATE 2017-07-05
+#define PCRE_DATE 2018-03-20
/* 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
@@ -321,11 +321,11 @@ these bits, just add new ones on the end, in order to remain compatible. */
/* Types */
-struct real_pcre; /* declaration; the definition is private */
-typedef struct real_pcre pcre;
+struct real_pcre8_or_16; /* declaration; the definition is private */
+typedef struct real_pcre8_or_16 pcre;
-struct real_pcre16; /* declaration; the definition is private */
-typedef struct real_pcre16 pcre16;
+struct real_pcre8_or_16; /* declaration; the definition is private */
+typedef struct real_pcre8_or_16 pcre16;
struct real_pcre32; /* declaration; the definition is private */
typedef struct real_pcre32 pcre32;
diff --git a/src/third_party/pcre-8.41/pcre.h.generic b/src/third_party/pcre-8.42/pcre.h.generic
index 442c6bdb5fe..0efad3f9511 100644
--- a/src/third_party/pcre-8.41/pcre.h.generic
+++ b/src/third_party/pcre-8.42/pcre.h.generic
@@ -42,9 +42,9 @@ POSSIBILITY OF SUCH DAMAGE.
/* The current PCRE version information. */
#define PCRE_MAJOR 8
-#define PCRE_MINOR 41
+#define PCRE_MINOR 42
#define PCRE_PRERELEASE
-#define PCRE_DATE 2017-07-05
+#define PCRE_DATE 2018-03-20
/* 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
@@ -321,11 +321,11 @@ these bits, just add new ones on the end, in order to remain compatible. */
/* Types */
-struct real_pcre; /* declaration; the definition is private */
-typedef struct real_pcre pcre;
+struct real_pcre8_or_16; /* declaration; the definition is private */
+typedef struct real_pcre8_or_16 pcre;
-struct real_pcre16; /* declaration; the definition is private */
-typedef struct real_pcre16 pcre16;
+struct real_pcre8_or_16; /* declaration; the definition is private */
+typedef struct real_pcre8_or_16 pcre16;
struct real_pcre32; /* declaration; the definition is private */
typedef struct real_pcre32 pcre32;
diff --git a/src/third_party/pcre-8.41/pcre.h.in b/src/third_party/pcre-8.42/pcre.h.in
index 667a45ed575..d4d78926984 100644
--- a/src/third_party/pcre-8.41/pcre.h.in
+++ b/src/third_party/pcre-8.42/pcre.h.in
@@ -321,11 +321,11 @@ these bits, just add new ones on the end, in order to remain compatible. */
/* Types */
-struct real_pcre; /* declaration; the definition is private */
-typedef struct real_pcre pcre;
+struct real_pcre8_or_16; /* declaration; the definition is private */
+typedef struct real_pcre8_or_16 pcre;
-struct real_pcre16; /* declaration; the definition is private */
-typedef struct real_pcre16 pcre16;
+struct real_pcre8_or_16; /* declaration; the definition is private */
+typedef struct real_pcre8_or_16 pcre16;
struct real_pcre32; /* declaration; the definition is private */
typedef struct real_pcre32 pcre32;
diff --git a/src/third_party/pcre-8.41/pcre16_byte_order.c b/src/third_party/pcre-8.42/pcre16_byte_order.c
index 11d2973a3db..11d2973a3db 100644
--- a/src/third_party/pcre-8.41/pcre16_byte_order.c
+++ b/src/third_party/pcre-8.42/pcre16_byte_order.c
diff --git a/src/third_party/pcre-8.41/pcre16_chartables.c b/src/third_party/pcre-8.42/pcre16_chartables.c
index 7c0ff35f5e0..7c0ff35f5e0 100644
--- a/src/third_party/pcre-8.41/pcre16_chartables.c
+++ b/src/third_party/pcre-8.42/pcre16_chartables.c
diff --git a/src/third_party/pcre-8.41/pcre16_compile.c b/src/third_party/pcre-8.42/pcre16_compile.c
index e499b670877..e499b670877 100644
--- a/src/third_party/pcre-8.41/pcre16_compile.c
+++ b/src/third_party/pcre-8.42/pcre16_compile.c
diff --git a/src/third_party/pcre-8.41/pcre16_config.c b/src/third_party/pcre-8.42/pcre16_config.c
index b52138764f6..b52138764f6 100644
--- a/src/third_party/pcre-8.41/pcre16_config.c
+++ b/src/third_party/pcre-8.42/pcre16_config.c
diff --git a/src/third_party/pcre-8.41/pcre16_dfa_exec.c b/src/third_party/pcre-8.42/pcre16_dfa_exec.c
index 2ba740e972b..2ba740e972b 100644
--- a/src/third_party/pcre-8.41/pcre16_dfa_exec.c
+++ b/src/third_party/pcre-8.42/pcre16_dfa_exec.c
diff --git a/src/third_party/pcre-8.41/pcre16_exec.c b/src/third_party/pcre-8.42/pcre16_exec.c
index 7417b1770c6..7417b1770c6 100644
--- a/src/third_party/pcre-8.41/pcre16_exec.c
+++ b/src/third_party/pcre-8.42/pcre16_exec.c
diff --git a/src/third_party/pcre-8.41/pcre16_fullinfo.c b/src/third_party/pcre-8.42/pcre16_fullinfo.c
index 544dca6ed5c..544dca6ed5c 100644
--- a/src/third_party/pcre-8.41/pcre16_fullinfo.c
+++ b/src/third_party/pcre-8.42/pcre16_fullinfo.c
diff --git a/src/third_party/pcre-8.41/pcre16_get.c b/src/third_party/pcre-8.42/pcre16_get.c
index 3ded08c622c..3ded08c622c 100644
--- a/src/third_party/pcre-8.41/pcre16_get.c
+++ b/src/third_party/pcre-8.42/pcre16_get.c
diff --git a/src/third_party/pcre-8.41/pcre16_globals.c b/src/third_party/pcre-8.42/pcre16_globals.c
index a136b3d8c22..a136b3d8c22 100644
--- a/src/third_party/pcre-8.41/pcre16_globals.c
+++ b/src/third_party/pcre-8.42/pcre16_globals.c
diff --git a/src/third_party/pcre-8.41/pcre16_jit_compile.c b/src/third_party/pcre-8.42/pcre16_jit_compile.c
index ab0cacd7646..ab0cacd7646 100644
--- a/src/third_party/pcre-8.41/pcre16_jit_compile.c
+++ b/src/third_party/pcre-8.42/pcre16_jit_compile.c
diff --git a/src/third_party/pcre-8.41/pcre16_maketables.c b/src/third_party/pcre-8.42/pcre16_maketables.c
index b1cd1c579d6..b1cd1c579d6 100644
--- a/src/third_party/pcre-8.41/pcre16_maketables.c
+++ b/src/third_party/pcre-8.42/pcre16_maketables.c
diff --git a/src/third_party/pcre-8.41/pcre16_newline.c b/src/third_party/pcre-8.42/pcre16_newline.c
index 7fe201400f5..7fe201400f5 100644
--- a/src/third_party/pcre-8.41/pcre16_newline.c
+++ b/src/third_party/pcre-8.42/pcre16_newline.c
diff --git a/src/third_party/pcre-8.41/pcre16_ord2utf16.c b/src/third_party/pcre-8.42/pcre16_ord2utf16.c
index 8e2ce5ea6c5..8e2ce5ea6c5 100644
--- a/src/third_party/pcre-8.41/pcre16_ord2utf16.c
+++ b/src/third_party/pcre-8.42/pcre16_ord2utf16.c
diff --git a/src/third_party/pcre-8.41/pcre16_printint.c b/src/third_party/pcre-8.42/pcre16_printint.c
index 33d8c340200..33d8c340200 100644
--- a/src/third_party/pcre-8.41/pcre16_printint.c
+++ b/src/third_party/pcre-8.42/pcre16_printint.c
diff --git a/src/third_party/pcre-8.41/pcre16_refcount.c b/src/third_party/pcre-8.42/pcre16_refcount.c
index d3d15439737..d3d15439737 100644
--- a/src/third_party/pcre-8.41/pcre16_refcount.c
+++ b/src/third_party/pcre-8.42/pcre16_refcount.c
diff --git a/src/third_party/pcre-8.41/pcre16_string_utils.c b/src/third_party/pcre-8.42/pcre16_string_utils.c
index 382c40799fb..382c40799fb 100644
--- a/src/third_party/pcre-8.41/pcre16_string_utils.c
+++ b/src/third_party/pcre-8.42/pcre16_string_utils.c
diff --git a/src/third_party/pcre-8.41/pcre16_study.c b/src/third_party/pcre-8.42/pcre16_study.c
index f87de081fc4..f87de081fc4 100644
--- a/src/third_party/pcre-8.41/pcre16_study.c
+++ b/src/third_party/pcre-8.42/pcre16_study.c
diff --git a/src/third_party/pcre-8.41/pcre16_tables.c b/src/third_party/pcre-8.42/pcre16_tables.c
index d84297093a4..d84297093a4 100644
--- a/src/third_party/pcre-8.41/pcre16_tables.c
+++ b/src/third_party/pcre-8.42/pcre16_tables.c
diff --git a/src/third_party/pcre-8.41/pcre16_ucd.c b/src/third_party/pcre-8.42/pcre16_ucd.c
index ee23439a013..ee23439a013 100644
--- a/src/third_party/pcre-8.41/pcre16_ucd.c
+++ b/src/third_party/pcre-8.42/pcre16_ucd.c
diff --git a/src/third_party/pcre-8.41/pcre16_utf16_utils.c b/src/third_party/pcre-8.42/pcre16_utf16_utils.c
index 49ced0c0b1c..49ced0c0b1c 100644
--- a/src/third_party/pcre-8.41/pcre16_utf16_utils.c
+++ b/src/third_party/pcre-8.42/pcre16_utf16_utils.c
diff --git a/src/third_party/pcre-8.41/pcre16_valid_utf16.c b/src/third_party/pcre-8.42/pcre16_valid_utf16.c
index 09076539d09..09076539d09 100644
--- a/src/third_party/pcre-8.41/pcre16_valid_utf16.c
+++ b/src/third_party/pcre-8.42/pcre16_valid_utf16.c
diff --git a/src/third_party/pcre-8.41/pcre16_version.c b/src/third_party/pcre-8.42/pcre16_version.c
index e991b1a8cfd..e991b1a8cfd 100644
--- a/src/third_party/pcre-8.41/pcre16_version.c
+++ b/src/third_party/pcre-8.42/pcre16_version.c
diff --git a/src/third_party/pcre-8.41/pcre16_xclass.c b/src/third_party/pcre-8.42/pcre16_xclass.c
index 5aac2a36c68..5aac2a36c68 100644
--- a/src/third_party/pcre-8.41/pcre16_xclass.c
+++ b/src/third_party/pcre-8.42/pcre16_xclass.c
diff --git a/src/third_party/pcre-8.41/pcre32_byte_order.c b/src/third_party/pcre-8.42/pcre32_byte_order.c
index 9cf5362730a..9cf5362730a 100644
--- a/src/third_party/pcre-8.41/pcre32_byte_order.c
+++ b/src/third_party/pcre-8.42/pcre32_byte_order.c
diff --git a/src/third_party/pcre-8.41/pcre32_chartables.c b/src/third_party/pcre-8.42/pcre32_chartables.c
index b5d8c23dbf1..b5d8c23dbf1 100644
--- a/src/third_party/pcre-8.41/pcre32_chartables.c
+++ b/src/third_party/pcre-8.42/pcre32_chartables.c
diff --git a/src/third_party/pcre-8.41/pcre32_compile.c b/src/third_party/pcre-8.42/pcre32_compile.c
index d781eb377e0..d781eb377e0 100644
--- a/src/third_party/pcre-8.41/pcre32_compile.c
+++ b/src/third_party/pcre-8.42/pcre32_compile.c
diff --git a/src/third_party/pcre-8.41/pcre32_config.c b/src/third_party/pcre-8.42/pcre32_config.c
index d63f3e9ea23..d63f3e9ea23 100644
--- a/src/third_party/pcre-8.41/pcre32_config.c
+++ b/src/third_party/pcre-8.42/pcre32_config.c
diff --git a/src/third_party/pcre-8.41/pcre32_dfa_exec.c b/src/third_party/pcre-8.42/pcre32_dfa_exec.c
index b0bfd34f04d..b0bfd34f04d 100644
--- a/src/third_party/pcre-8.41/pcre32_dfa_exec.c
+++ b/src/third_party/pcre-8.42/pcre32_dfa_exec.c
diff --git a/src/third_party/pcre-8.41/pcre32_exec.c b/src/third_party/pcre-8.42/pcre32_exec.c
index 8170ed77d35..8170ed77d35 100644
--- a/src/third_party/pcre-8.41/pcre32_exec.c
+++ b/src/third_party/pcre-8.42/pcre32_exec.c
diff --git a/src/third_party/pcre-8.41/pcre32_fullinfo.c b/src/third_party/pcre-8.42/pcre32_fullinfo.c
index 6ecc5209a08..6ecc5209a08 100644
--- a/src/third_party/pcre-8.41/pcre32_fullinfo.c
+++ b/src/third_party/pcre-8.42/pcre32_fullinfo.c
diff --git a/src/third_party/pcre-8.41/pcre32_get.c b/src/third_party/pcre-8.42/pcre32_get.c
index d35deee0cd4..d35deee0cd4 100644
--- a/src/third_party/pcre-8.41/pcre32_get.c
+++ b/src/third_party/pcre-8.42/pcre32_get.c
diff --git a/src/third_party/pcre-8.41/pcre32_globals.c b/src/third_party/pcre-8.42/pcre32_globals.c
index 32e0914ca6d..32e0914ca6d 100644
--- a/src/third_party/pcre-8.41/pcre32_globals.c
+++ b/src/third_party/pcre-8.42/pcre32_globals.c
diff --git a/src/third_party/pcre-8.41/pcre32_jit_compile.c b/src/third_party/pcre-8.42/pcre32_jit_compile.c
index 2e7c6f97c96..2e7c6f97c96 100644
--- a/src/third_party/pcre-8.41/pcre32_jit_compile.c
+++ b/src/third_party/pcre-8.42/pcre32_jit_compile.c
diff --git a/src/third_party/pcre-8.41/pcre32_maketables.c b/src/third_party/pcre-8.42/pcre32_maketables.c
index 5d1b1c64c96..5d1b1c64c96 100644
--- a/src/third_party/pcre-8.41/pcre32_maketables.c
+++ b/src/third_party/pcre-8.42/pcre32_maketables.c
diff --git a/src/third_party/pcre-8.41/pcre32_newline.c b/src/third_party/pcre-8.42/pcre32_newline.c
index 7f8d5360cdc..7f8d5360cdc 100644
--- a/src/third_party/pcre-8.41/pcre32_newline.c
+++ b/src/third_party/pcre-8.42/pcre32_newline.c
diff --git a/src/third_party/pcre-8.41/pcre32_ord2utf32.c b/src/third_party/pcre-8.42/pcre32_ord2utf32.c
index 606bcb3d7ba..606bcb3d7ba 100644
--- a/src/third_party/pcre-8.41/pcre32_ord2utf32.c
+++ b/src/third_party/pcre-8.42/pcre32_ord2utf32.c
diff --git a/src/third_party/pcre-8.41/pcre32_printint.c b/src/third_party/pcre-8.42/pcre32_printint.c
index f3fd7b25e2c..f3fd7b25e2c 100644
--- a/src/third_party/pcre-8.41/pcre32_printint.c
+++ b/src/third_party/pcre-8.42/pcre32_printint.c
diff --git a/src/third_party/pcre-8.41/pcre32_refcount.c b/src/third_party/pcre-8.42/pcre32_refcount.c
index dbdf432d82a..dbdf432d82a 100644
--- a/src/third_party/pcre-8.41/pcre32_refcount.c
+++ b/src/third_party/pcre-8.42/pcre32_refcount.c
diff --git a/src/third_party/pcre-8.41/pcre32_string_utils.c b/src/third_party/pcre-8.42/pcre32_string_utils.c
index e37b3d4805f..e37b3d4805f 100644
--- a/src/third_party/pcre-8.41/pcre32_string_utils.c
+++ b/src/third_party/pcre-8.42/pcre32_string_utils.c
diff --git a/src/third_party/pcre-8.41/pcre32_study.c b/src/third_party/pcre-8.42/pcre32_study.c
index d3a3afed791..d3a3afed791 100644
--- a/src/third_party/pcre-8.41/pcre32_study.c
+++ b/src/third_party/pcre-8.42/pcre32_study.c
diff --git a/src/third_party/pcre-8.41/pcre32_tables.c b/src/third_party/pcre-8.42/pcre32_tables.c
index 3d94cca33a1..3d94cca33a1 100644
--- a/src/third_party/pcre-8.41/pcre32_tables.c
+++ b/src/third_party/pcre-8.42/pcre32_tables.c
diff --git a/src/third_party/pcre-8.41/pcre32_ucd.c b/src/third_party/pcre-8.42/pcre32_ucd.c
index befe22d3435..befe22d3435 100644
--- a/src/third_party/pcre-8.41/pcre32_ucd.c
+++ b/src/third_party/pcre-8.42/pcre32_ucd.c
diff --git a/src/third_party/pcre-8.41/pcre32_utf32_utils.c b/src/third_party/pcre-8.42/pcre32_utf32_utils.c
index f844e237165..f844e237165 100644
--- a/src/third_party/pcre-8.41/pcre32_utf32_utils.c
+++ b/src/third_party/pcre-8.42/pcre32_utf32_utils.c
diff --git a/src/third_party/pcre-8.41/pcre32_valid_utf32.c b/src/third_party/pcre-8.42/pcre32_valid_utf32.c
index 94cda1a2c4c..94cda1a2c4c 100644
--- a/src/third_party/pcre-8.41/pcre32_valid_utf32.c
+++ b/src/third_party/pcre-8.42/pcre32_valid_utf32.c
diff --git a/src/third_party/pcre-8.41/pcre32_version.c b/src/third_party/pcre-8.42/pcre32_version.c
index fdaad9b0859..fdaad9b0859 100644
--- a/src/third_party/pcre-8.41/pcre32_version.c
+++ b/src/third_party/pcre-8.42/pcre32_version.c
diff --git a/src/third_party/pcre-8.41/pcre32_xclass.c b/src/third_party/pcre-8.42/pcre32_xclass.c
index 5662408ad5f..5662408ad5f 100644
--- a/src/third_party/pcre-8.41/pcre32_xclass.c
+++ b/src/third_party/pcre-8.42/pcre32_xclass.c
diff --git a/src/third_party/pcre-8.41/pcre_byte_order.c b/src/third_party/pcre-8.42/pcre_byte_order.c
index cf5f12b04ea..cf5f12b04ea 100644
--- a/src/third_party/pcre-8.41/pcre_byte_order.c
+++ b/src/third_party/pcre-8.42/pcre_byte_order.c
diff --git a/src/third_party/pcre-8.41/pcre_chartables.c b/src/third_party/pcre-8.42/pcre_chartables.c
index 1e20ec29d05..1e20ec29d05 100644
--- a/src/third_party/pcre-8.41/pcre_chartables.c
+++ b/src/third_party/pcre-8.42/pcre_chartables.c
diff --git a/src/third_party/pcre-8.41/pcre_chartables.c.dist b/src/third_party/pcre-8.42/pcre_chartables.c.dist
index 1e20ec29d05..1e20ec29d05 100644
--- a/src/third_party/pcre-8.41/pcre_chartables.c.dist
+++ b/src/third_party/pcre-8.42/pcre_chartables.c.dist
diff --git a/src/third_party/pcre-8.41/pcre_compile.c b/src/third_party/pcre-8.42/pcre_compile.c
index 42f204cdfff..6dd88860638 100644
--- a/src/third_party/pcre-8.41/pcre_compile.c
+++ b/src/third_party/pcre-8.42/pcre_compile.c
@@ -8060,7 +8060,7 @@ for (;; ptr++)
single group (i.e. not to a duplicated name. */
HANDLE_REFERENCE:
- if (firstcharflags == REQ_UNSET) firstcharflags = REQ_NONE;
+ if (firstcharflags == REQ_UNSET) zerofirstcharflags = firstcharflags = REQ_NONE;
previous = code;
item_hwm_offset = cd->hwm - cd->start_workspace;
*code++ = ((options & PCRE_CASELESS) != 0)? OP_REFI : OP_REF;
diff --git a/src/third_party/pcre-8.41/pcre_config.c b/src/third_party/pcre-8.42/pcre_config.c
index 1cbdd9c960c..1cbdd9c960c 100644
--- a/src/third_party/pcre-8.41/pcre_config.c
+++ b/src/third_party/pcre-8.42/pcre_config.c
diff --git a/src/third_party/pcre-8.41/pcre_dfa_exec.c b/src/third_party/pcre-8.42/pcre_dfa_exec.c
index bc09ced3a7c..f333381d088 100644
--- a/src/third_party/pcre-8.41/pcre_dfa_exec.c
+++ b/src/third_party/pcre-8.42/pcre_dfa_exec.c
@@ -2287,12 +2287,14 @@ for (;;)
case OP_NOTI:
if (clen > 0)
{
- unsigned int otherd;
+ pcre_uint32 otherd;
#ifdef SUPPORT_UTF
if (utf && d >= 128)
{
#ifdef SUPPORT_UCP
otherd = UCD_OTHERCASE(d);
+#else
+ otherd = d;
#endif /* SUPPORT_UCP */
}
else
diff --git a/src/third_party/pcre-8.41/pcre_exec.c b/src/third_party/pcre-8.42/pcre_exec.c
index 1a9bdd546ee..3fd58cbe31c 100644
--- a/src/third_party/pcre-8.41/pcre_exec.c
+++ b/src/third_party/pcre-8.42/pcre_exec.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2014 University of Cambridge
+ Copyright (c) 1997-2018 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -2305,7 +2305,7 @@ for (;;)
case OP_ANY:
if (IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH);
if (md->partial != 0 &&
- eptr + 1 >= md->end_subject &&
+ eptr == md->end_subject - 1 &&
NLBLOCK->nltype == NLTYPE_FIXED &&
NLBLOCK->nllen == 2 &&
UCHAR21TEST(eptr) == NLBLOCK->nl[0])
@@ -3053,7 +3053,7 @@ for (;;)
{
RMATCH(eptr, ecode, offset_top, md, eptrb, RM18);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (eptr-- == pp) break; /* Stop if tried at original pos */
+ if (eptr-- <= pp) break; /* Stop if tried at original pos */
BACKCHAR(eptr);
}
}
@@ -3210,7 +3210,7 @@ for (;;)
{
RMATCH(eptr, ecode, offset_top, md, eptrb, RM21);
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
- if (eptr-- == pp) break; /* Stop if tried at original pos */
+ if (eptr-- <= pp) break; /* Stop if tried at original pos */
#ifdef SUPPORT_UTF
if (utf) BACKCHAR(eptr);
#endif
diff --git a/src/third_party/pcre-8.41/pcre_fullinfo.c b/src/third_party/pcre-8.42/pcre_fullinfo.c
index a6c2ece6ca5..a6c2ece6ca5 100644
--- a/src/third_party/pcre-8.41/pcre_fullinfo.c
+++ b/src/third_party/pcre-8.42/pcre_fullinfo.c
diff --git a/src/third_party/pcre-8.41/pcre_get.c b/src/third_party/pcre-8.42/pcre_get.c
index 9475d5e88cd..9475d5e88cd 100644
--- a/src/third_party/pcre-8.41/pcre_get.c
+++ b/src/third_party/pcre-8.42/pcre_get.c
diff --git a/src/third_party/pcre-8.41/pcre_globals.c b/src/third_party/pcre-8.42/pcre_globals.c
index 0f106aa9013..0f106aa9013 100644
--- a/src/third_party/pcre-8.41/pcre_globals.c
+++ b/src/third_party/pcre-8.42/pcre_globals.c
diff --git a/src/third_party/pcre-8.41/pcre_internal.h b/src/third_party/pcre-8.42/pcre_internal.h
index 97ff55d03b3..97ff55d03b3 100644
--- a/src/third_party/pcre-8.41/pcre_internal.h
+++ b/src/third_party/pcre-8.42/pcre_internal.h
diff --git a/src/third_party/pcre-8.41/pcre_jit_compile.c b/src/third_party/pcre-8.42/pcre_jit_compile.c
index 249edbe8e7f..2bad74b0231 100644
--- a/src/third_party/pcre-8.41/pcre_jit_compile.c
+++ b/src/third_party/pcre-8.42/pcre_jit_compile.c
@@ -164,7 +164,6 @@ typedef struct jit_arguments {
const pcre_uchar *begin;
const pcre_uchar *end;
int *offsets;
- pcre_uchar *uchar_ptr;
pcre_uchar *mark_ptr;
void *callout_data;
/* Everything else after. */
@@ -214,7 +213,7 @@ enum control_types {
type_then_trap = 1
};
-typedef int (SLJIT_CALL *jit_function)(jit_arguments *args);
+typedef int (SLJIT_FUNC *jit_function)(jit_arguments *args);
/* The following structure is the key data type for the recursive
code generator. It is allocated by compile_matchingpath, and contains
@@ -489,9 +488,24 @@ typedef struct compare_context {
/* Used for accessing the elements of the stack. */
#define STACK(i) ((i) * (int)sizeof(sljit_sw))
+#ifdef SLJIT_PREF_SHIFT_REG
+#if SLJIT_PREF_SHIFT_REG == SLJIT_R2
+/* Nothing. */
+#elif SLJIT_PREF_SHIFT_REG == SLJIT_R3
+#define SHIFT_REG_IS_R3
+#else
+#error "Unsupported shift register"
+#endif
+#endif
+
#define TMP1 SLJIT_R0
+#ifdef SHIFT_REG_IS_R3
+#define TMP2 SLJIT_R3
+#define TMP3 SLJIT_R2
+#else
#define TMP2 SLJIT_R2
#define TMP3 SLJIT_R3
+#endif
#define STR_PTR SLJIT_S0
#define STR_END SLJIT_S1
#define STACK_TOP SLJIT_R1
@@ -520,13 +534,10 @@ the start pointers when the end of the capturing group has not yet reached. */
#if defined COMPILE_PCRE8
#define MOV_UCHAR SLJIT_MOV_U8
-#define MOVU_UCHAR SLJIT_MOVU_U8
#elif defined COMPILE_PCRE16
#define MOV_UCHAR SLJIT_MOV_U16
-#define MOVU_UCHAR SLJIT_MOVU_U16
#elif defined COMPILE_PCRE32
#define MOV_UCHAR SLJIT_MOV_U32
-#define MOVU_UCHAR SLJIT_MOVU_U32
#else
#error Unsupported compiling mode
#endif
@@ -2383,12 +2394,25 @@ if (length < 8)
}
else
{
- GET_LOCAL_BASE(SLJIT_R1, 0, OVECTOR_START);
- OP1(SLJIT_MOV, SLJIT_R2, 0, SLJIT_IMM, length - 1);
- loop = LABEL();
- OP1(SLJIT_MOVU, SLJIT_MEM1(SLJIT_R1), sizeof(sljit_sw), SLJIT_R0, 0);
- OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_R2, 0, SLJIT_R2, 0, SLJIT_IMM, 1);
- JUMPTO(SLJIT_NOT_ZERO, loop);
+ if (sljit_emit_mem(compiler, SLJIT_MOV | SLJIT_MEM_SUPP | SLJIT_MEM_STORE | SLJIT_MEM_PRE, SLJIT_R0, SLJIT_MEM1(SLJIT_R1), sizeof(sljit_sw)) == SLJIT_SUCCESS)
+ {
+ GET_LOCAL_BASE(SLJIT_R1, 0, OVECTOR_START);
+ OP1(SLJIT_MOV, SLJIT_R2, 0, SLJIT_IMM, length - 1);
+ loop = LABEL();
+ sljit_emit_mem(compiler, SLJIT_MOV | SLJIT_MEM_STORE | SLJIT_MEM_PRE, SLJIT_R0, SLJIT_MEM1(SLJIT_R1), sizeof(sljit_sw));
+ OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_R2, 0, SLJIT_R2, 0, SLJIT_IMM, 1);
+ JUMPTO(SLJIT_NOT_ZERO, loop);
+ }
+ else
+ {
+ GET_LOCAL_BASE(SLJIT_R1, 0, OVECTOR_START + sizeof(sljit_sw));
+ OP1(SLJIT_MOV, SLJIT_R2, 0, SLJIT_IMM, length - 1);
+ loop = LABEL();
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_R1), 0, SLJIT_R0, 0);
+ OP2(SLJIT_ADD, SLJIT_R1, 0, SLJIT_R1, 0, SLJIT_IMM, sizeof(sljit_sw));
+ OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_R2, 0, SLJIT_R2, 0, SLJIT_IMM, 1);
+ JUMPTO(SLJIT_NOT_ZERO, loop);
+ }
}
}
@@ -2421,12 +2445,25 @@ if (length < 8)
}
else
{
- GET_LOCAL_BASE(TMP2, 0, OVECTOR_START + sizeof(sljit_sw));
- OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_IMM, length - 2);
- loop = LABEL();
- OP1(SLJIT_MOVU, SLJIT_MEM1(TMP2), sizeof(sljit_sw), TMP1, 0);
- OP2(SLJIT_SUB | SLJIT_SET_Z, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, 1);
- JUMPTO(SLJIT_NOT_ZERO, loop);
+ if (sljit_emit_mem(compiler, SLJIT_MOV | SLJIT_MEM_SUPP | SLJIT_MEM_STORE | SLJIT_MEM_PRE, TMP1, SLJIT_MEM1(TMP2), sizeof(sljit_sw)) == SLJIT_SUCCESS)
+ {
+ GET_LOCAL_BASE(TMP2, 0, OVECTOR_START + sizeof(sljit_sw));
+ OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_IMM, length - 2);
+ loop = LABEL();
+ sljit_emit_mem(compiler, SLJIT_MOV | SLJIT_MEM_STORE | SLJIT_MEM_PRE, TMP1, SLJIT_MEM1(TMP2), sizeof(sljit_sw));
+ OP2(SLJIT_SUB | SLJIT_SET_Z, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, 1);
+ JUMPTO(SLJIT_NOT_ZERO, loop);
+ }
+ else
+ {
+ GET_LOCAL_BASE(TMP2, 0, OVECTOR_START + 2 * sizeof(sljit_sw));
+ OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_IMM, length - 2);
+ loop = LABEL();
+ OP1(SLJIT_MOV, SLJIT_MEM1(TMP2), 0, TMP1, 0);
+ OP2(SLJIT_ADD, TMP2, 0, TMP2, 0, SLJIT_IMM, sizeof(sljit_sw));
+ OP2(SLJIT_SUB | SLJIT_SET_Z, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, 1);
+ JUMPTO(SLJIT_NOT_ZERO, loop);
+ }
}
OP1(SLJIT_MOV, STACK_TOP, 0, ARGUMENTS, 0);
@@ -2436,10 +2473,10 @@ if (common->control_head_ptr != 0)
OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->control_head_ptr, SLJIT_IMM, 0);
OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(STACK_TOP), SLJIT_OFFSETOF(jit_arguments, stack));
OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), common->start_ptr);
-OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(STACK_TOP), SLJIT_OFFSETOF(struct sljit_stack, base));
+OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(STACK_TOP), SLJIT_OFFSETOF(struct sljit_stack, end));
}
-static sljit_sw SLJIT_CALL do_search_mark(sljit_sw *current, const pcre_uchar *skip_arg)
+static sljit_sw SLJIT_FUNC do_search_mark(sljit_sw *current, const pcre_uchar *skip_arg)
{
while (current != NULL)
{
@@ -2460,7 +2497,7 @@ while (current != NULL)
SLJIT_ASSERT(current[0] == 0 || current < (sljit_sw*)current[0]);
current = (sljit_sw*)current[0];
}
-return -1;
+return 0;
}
static SLJIT_INLINE void copy_ovector(compiler_common *common, int topbracket)
@@ -2468,6 +2505,7 @@ static SLJIT_INLINE void copy_ovector(compiler_common *common, int topbracket)
DEFINE_COMPILER;
struct sljit_label *loop;
struct sljit_jump *early_quit;
+BOOL has_pre;
/* At this point we can freely use all registers. */
OP1(SLJIT_MOV, SLJIT_S2, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(1));
@@ -2481,17 +2519,30 @@ if (common->mark_ptr != 0)
OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_R0), SLJIT_OFFSETOF(jit_arguments, mark_ptr), SLJIT_R2, 0);
OP2(SLJIT_SUB, SLJIT_R2, 0, SLJIT_MEM1(SLJIT_R0), SLJIT_OFFSETOF(jit_arguments, offsets), SLJIT_IMM, sizeof(int));
OP1(SLJIT_MOV, SLJIT_R0, 0, SLJIT_MEM1(SLJIT_R0), SLJIT_OFFSETOF(jit_arguments, begin));
-GET_LOCAL_BASE(SLJIT_S0, 0, OVECTOR_START);
+
+has_pre = sljit_emit_mem(compiler, SLJIT_MOV | SLJIT_MEM_SUPP | SLJIT_MEM_PRE, SLJIT_S1, SLJIT_MEM1(SLJIT_S0), sizeof(sljit_sw)) == SLJIT_SUCCESS;
+GET_LOCAL_BASE(SLJIT_S0, 0, OVECTOR_START - (has_pre ? sizeof(sljit_sw) : 0));
+
/* Unlikely, but possible */
early_quit = CMP(SLJIT_EQUAL, SLJIT_R1, 0, SLJIT_IMM, 0);
loop = LABEL();
-OP2(SLJIT_SUB, SLJIT_S1, 0, SLJIT_MEM1(SLJIT_S0), 0, SLJIT_R0, 0);
-OP2(SLJIT_ADD, SLJIT_S0, 0, SLJIT_S0, 0, SLJIT_IMM, sizeof(sljit_sw));
+
+if (has_pre)
+ sljit_emit_mem(compiler, SLJIT_MOV | SLJIT_MEM_PRE, SLJIT_S1, SLJIT_MEM1(SLJIT_S0), sizeof(sljit_sw));
+else
+ {
+ OP1(SLJIT_MOV, SLJIT_S1, 0, SLJIT_MEM1(SLJIT_S0), 0);
+ OP2(SLJIT_ADD, SLJIT_S0, 0, SLJIT_S0, 0, SLJIT_IMM, sizeof(sljit_sw));
+ }
+
+OP2(SLJIT_ADD, SLJIT_R2, 0, SLJIT_R2, 0, SLJIT_IMM, sizeof(int));
+OP2(SLJIT_SUB, SLJIT_S1, 0, SLJIT_S1, 0, SLJIT_R0, 0);
/* Copy the integer value to the output buffer */
#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
OP2(SLJIT_ASHR, SLJIT_S1, 0, SLJIT_S1, 0, SLJIT_IMM, UCHAR_SHIFT);
#endif
-OP1(SLJIT_MOVU_S32, SLJIT_MEM1(SLJIT_R2), sizeof(int), SLJIT_S1, 0);
+
+OP1(SLJIT_MOV_S32, SLJIT_MEM1(SLJIT_R2), 0, SLJIT_S1, 0);
OP2(SLJIT_SUB | SLJIT_SET_Z, SLJIT_R1, 0, SLJIT_R1, 0, SLJIT_IMM, 1);
JUMPTO(SLJIT_NOT_ZERO, loop);
JUMPHERE(early_quit);
@@ -2499,14 +2550,29 @@ JUMPHERE(early_quit);
/* Calculate the return value, which is the maximum ovector value. */
if (topbracket > 1)
{
- GET_LOCAL_BASE(SLJIT_R0, 0, OVECTOR_START + topbracket * 2 * sizeof(sljit_sw));
- OP1(SLJIT_MOV, SLJIT_R1, 0, SLJIT_IMM, topbracket + 1);
+ if (sljit_emit_mem(compiler, SLJIT_MOV | SLJIT_MEM_SUPP | SLJIT_MEM_PRE, SLJIT_R2, SLJIT_MEM1(SLJIT_R0), -(2 * (sljit_sw)sizeof(sljit_sw))) == SLJIT_SUCCESS)
+ {
+ GET_LOCAL_BASE(SLJIT_R0, 0, OVECTOR_START + topbracket * 2 * sizeof(sljit_sw));
+ OP1(SLJIT_MOV, SLJIT_R1, 0, SLJIT_IMM, topbracket + 1);
- /* OVECTOR(0) is never equal to SLJIT_S2. */
- loop = LABEL();
- OP1(SLJIT_MOVU, SLJIT_R2, 0, SLJIT_MEM1(SLJIT_R0), -(2 * (sljit_sw)sizeof(sljit_sw)));
- OP2(SLJIT_SUB, SLJIT_R1, 0, SLJIT_R1, 0, SLJIT_IMM, 1);
- CMPTO(SLJIT_EQUAL, SLJIT_R2, 0, SLJIT_S2, 0, loop);
+ /* OVECTOR(0) is never equal to SLJIT_S2. */
+ loop = LABEL();
+ sljit_emit_mem(compiler, SLJIT_MOV | SLJIT_MEM_PRE, SLJIT_R2, SLJIT_MEM1(SLJIT_R0), -(2 * (sljit_sw)sizeof(sljit_sw)));
+ OP2(SLJIT_SUB, SLJIT_R1, 0, SLJIT_R1, 0, SLJIT_IMM, 1);
+ CMPTO(SLJIT_EQUAL, SLJIT_R2, 0, SLJIT_S2, 0, loop);
+ }
+ else
+ {
+ GET_LOCAL_BASE(SLJIT_R0, 0, OVECTOR_START + (topbracket - 1) * 2 * sizeof(sljit_sw));
+ OP1(SLJIT_MOV, SLJIT_R1, 0, SLJIT_IMM, topbracket + 1);
+
+ /* OVECTOR(0) is never equal to SLJIT_S2. */
+ loop = LABEL();
+ OP1(SLJIT_MOV, SLJIT_R2, 0, SLJIT_MEM1(SLJIT_R0), 0);
+ OP2(SLJIT_SUB, SLJIT_R0, 0, SLJIT_R0, 0, SLJIT_IMM, 2 * (sljit_sw)sizeof(sljit_sw));
+ OP2(SLJIT_SUB, SLJIT_R1, 0, SLJIT_R1, 0, SLJIT_IMM, 1);
+ CMPTO(SLJIT_EQUAL, SLJIT_R2, 0, SLJIT_S2, 0, loop);
+ }
OP1(SLJIT_MOV, SLJIT_RETURN_REG, 0, SLJIT_R1, 0);
}
else
@@ -5167,93 +5233,190 @@ OP_FLAGS(SLJIT_OR | SLJIT_SET_Z, TMP2, 0, SLJIT_EQUAL);
sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
}
-#define CHAR1 STR_END
-#define CHAR2 STACK_TOP
-
static void do_casefulcmp(compiler_common *common)
{
DEFINE_COMPILER;
struct sljit_jump *jump;
struct sljit_label *label;
+int char1_reg;
+int char2_reg;
-sljit_emit_fast_enter(compiler, RETURN_ADDR, 0);
+if (sljit_get_register_index(TMP3) < 0)
+ {
+ char1_reg = STR_END;
+ char2_reg = STACK_TOP;
+ }
+else
+ {
+ char1_reg = TMP3;
+ char2_reg = RETURN_ADDR;
+ }
+
+sljit_emit_fast_enter(compiler, SLJIT_MEM1(SLJIT_SP), LOCALS0);
OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, TMP2, 0);
-OP1(SLJIT_MOV, TMP3, 0, CHAR1, 0);
-OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), LOCALS0, CHAR2, 0);
-OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, IN_UCHARS(1));
-OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
-label = LABEL();
-OP1(MOVU_UCHAR, CHAR1, 0, SLJIT_MEM1(TMP1), IN_UCHARS(1));
-OP1(MOVU_UCHAR, CHAR2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(1));
-jump = CMP(SLJIT_NOT_EQUAL, CHAR1, 0, CHAR2, 0);
-OP2(SLJIT_SUB | SLJIT_SET_Z, TMP2, 0, TMP2, 0, SLJIT_IMM, IN_UCHARS(1));
-JUMPTO(SLJIT_NOT_ZERO, label);
+if (char1_reg == STR_END)
+ {
+ OP1(SLJIT_MOV, TMP3, 0, char1_reg, 0);
+ OP1(SLJIT_MOV, RETURN_ADDR, 0, char2_reg, 0);
+ }
-JUMPHERE(jump);
-OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
-OP1(SLJIT_MOV, CHAR1, 0, TMP3, 0);
-OP1(SLJIT_MOV, CHAR2, 0, SLJIT_MEM1(SLJIT_SP), LOCALS0);
-sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
-}
+if (sljit_emit_mem(compiler, MOV_UCHAR | SLJIT_MEM_SUPP | SLJIT_MEM_POST, char1_reg, SLJIT_MEM1(TMP1), IN_UCHARS(1)) == SLJIT_SUCCESS)
+ {
+ label = LABEL();
+ sljit_emit_mem(compiler, MOV_UCHAR | SLJIT_MEM_POST, char1_reg, SLJIT_MEM1(TMP1), IN_UCHARS(1));
+ sljit_emit_mem(compiler, MOV_UCHAR | SLJIT_MEM_POST, char2_reg, SLJIT_MEM1(STR_PTR), IN_UCHARS(1));
+ jump = CMP(SLJIT_NOT_EQUAL, char1_reg, 0, char2_reg, 0);
+ OP2(SLJIT_SUB | SLJIT_SET_Z, TMP2, 0, TMP2, 0, SLJIT_IMM, IN_UCHARS(1));
+ JUMPTO(SLJIT_NOT_ZERO, label);
+
+ JUMPHERE(jump);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), LOCALS0);
+ }
+else if (sljit_emit_mem(compiler, MOV_UCHAR | SLJIT_MEM_SUPP | SLJIT_MEM_PRE, char1_reg, SLJIT_MEM1(TMP1), IN_UCHARS(1)) == SLJIT_SUCCESS)
+ {
+ OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, IN_UCHARS(1));
+ OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+
+ label = LABEL();
+ sljit_emit_mem(compiler, MOV_UCHAR | SLJIT_MEM_PRE, char1_reg, SLJIT_MEM1(TMP1), IN_UCHARS(1));
+ sljit_emit_mem(compiler, MOV_UCHAR | SLJIT_MEM_PRE, char2_reg, SLJIT_MEM1(STR_PTR), IN_UCHARS(1));
+ jump = CMP(SLJIT_NOT_EQUAL, char1_reg, 0, char2_reg, 0);
+ OP2(SLJIT_SUB | SLJIT_SET_Z, TMP2, 0, TMP2, 0, SLJIT_IMM, IN_UCHARS(1));
+ JUMPTO(SLJIT_NOT_ZERO, label);
-#define LCC_TABLE STACK_LIMIT
+ JUMPHERE(jump);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), LOCALS0);
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ }
+else
+ {
+ label = LABEL();
+ OP1(MOV_UCHAR, char1_reg, 0, SLJIT_MEM1(TMP1), 0);
+ OP1(MOV_UCHAR, char2_reg, 0, SLJIT_MEM1(STR_PTR), 0);
+ OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, IN_UCHARS(1));
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ jump = CMP(SLJIT_NOT_EQUAL, char1_reg, 0, char2_reg, 0);
+ OP2(SLJIT_SUB | SLJIT_SET_Z, TMP2, 0, TMP2, 0, SLJIT_IMM, IN_UCHARS(1));
+ JUMPTO(SLJIT_NOT_ZERO, label);
+
+ JUMPHERE(jump);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), LOCALS0);
+ }
+
+if (char1_reg == STR_END)
+ {
+ OP1(SLJIT_MOV, char1_reg, 0, TMP3, 0);
+ OP1(SLJIT_MOV, char2_reg, 0, RETURN_ADDR, 0);
+ }
+
+sljit_emit_fast_return(compiler, TMP1, 0);
+}
static void do_caselesscmp(compiler_common *common)
{
DEFINE_COMPILER;
struct sljit_jump *jump;
struct sljit_label *label;
+int char1_reg = STR_END;
+int char2_reg;
+int lcc_table;
+int opt_type = 0;
-sljit_emit_fast_enter(compiler, RETURN_ADDR, 0);
+if (sljit_get_register_index(TMP3) < 0)
+ {
+ char2_reg = STACK_TOP;
+ lcc_table = STACK_LIMIT;
+ }
+else
+ {
+ char2_reg = RETURN_ADDR;
+ lcc_table = TMP3;
+ }
+
+if (sljit_emit_mem(compiler, MOV_UCHAR | SLJIT_MEM_SUPP | SLJIT_MEM_POST, char1_reg, SLJIT_MEM1(TMP1), IN_UCHARS(1)) == SLJIT_SUCCESS)
+ opt_type = 1;
+else if (sljit_emit_mem(compiler, MOV_UCHAR | SLJIT_MEM_SUPP | SLJIT_MEM_PRE, char1_reg, SLJIT_MEM1(TMP1), IN_UCHARS(1)) == SLJIT_SUCCESS)
+ opt_type = 2;
+
+sljit_emit_fast_enter(compiler, SLJIT_MEM1(SLJIT_SP), LOCALS0);
OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, TMP2, 0);
-OP1(SLJIT_MOV, TMP3, 0, LCC_TABLE, 0);
-OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), LOCALS0, CHAR1, 0);
-OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), LOCALS1, CHAR2, 0);
-OP1(SLJIT_MOV, LCC_TABLE, 0, SLJIT_IMM, common->lcc);
-OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, IN_UCHARS(1));
-OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), LOCALS1, char1_reg, 0);
+
+if (char2_reg == STACK_TOP)
+ {
+ OP1(SLJIT_MOV, TMP3, 0, char2_reg, 0);
+ OP1(SLJIT_MOV, RETURN_ADDR, 0, lcc_table, 0);
+ }
+
+OP1(SLJIT_MOV, lcc_table, 0, SLJIT_IMM, common->lcc);
+
+if (opt_type == 1)
+ {
+ label = LABEL();
+ sljit_emit_mem(compiler, MOV_UCHAR | SLJIT_MEM_POST, char1_reg, SLJIT_MEM1(TMP1), IN_UCHARS(1));
+ sljit_emit_mem(compiler, MOV_UCHAR | SLJIT_MEM_POST, char2_reg, SLJIT_MEM1(STR_PTR), IN_UCHARS(1));
+ }
+else if (opt_type == 2)
+ {
+ OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, IN_UCHARS(1));
+ OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+
+ label = LABEL();
+ sljit_emit_mem(compiler, MOV_UCHAR | SLJIT_MEM_PRE, char1_reg, SLJIT_MEM1(TMP1), IN_UCHARS(1));
+ sljit_emit_mem(compiler, MOV_UCHAR | SLJIT_MEM_PRE, char2_reg, SLJIT_MEM1(STR_PTR), IN_UCHARS(1));
+ }
+else
+ {
+ label = LABEL();
+ OP1(MOV_UCHAR, char1_reg, 0, SLJIT_MEM1(TMP1), 0);
+ OP1(MOV_UCHAR, char2_reg, 0, SLJIT_MEM1(STR_PTR), 0);
+ OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, IN_UCHARS(1));
+ }
-label = LABEL();
-OP1(MOVU_UCHAR, CHAR1, 0, SLJIT_MEM1(TMP1), IN_UCHARS(1));
-OP1(MOVU_UCHAR, CHAR2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(1));
#ifndef COMPILE_PCRE8
-jump = CMP(SLJIT_GREATER, CHAR1, 0, SLJIT_IMM, 255);
+jump = CMP(SLJIT_GREATER, char1_reg, 0, SLJIT_IMM, 255);
#endif
-OP1(SLJIT_MOV_U8, CHAR1, 0, SLJIT_MEM2(LCC_TABLE, CHAR1), 0);
+OP1(SLJIT_MOV_U8, char1_reg, 0, SLJIT_MEM2(lcc_table, char1_reg), 0);
#ifndef COMPILE_PCRE8
JUMPHERE(jump);
-jump = CMP(SLJIT_GREATER, CHAR2, 0, SLJIT_IMM, 255);
+jump = CMP(SLJIT_GREATER, char2_reg, 0, SLJIT_IMM, 255);
#endif
-OP1(SLJIT_MOV_U8, CHAR2, 0, SLJIT_MEM2(LCC_TABLE, CHAR2), 0);
+OP1(SLJIT_MOV_U8, char2_reg, 0, SLJIT_MEM2(lcc_table, char2_reg), 0);
#ifndef COMPILE_PCRE8
JUMPHERE(jump);
#endif
-jump = CMP(SLJIT_NOT_EQUAL, CHAR1, 0, CHAR2, 0);
+
+if (opt_type == 0)
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+
+jump = CMP(SLJIT_NOT_EQUAL, char1_reg, 0, char2_reg, 0);
OP2(SLJIT_SUB | SLJIT_SET_Z, TMP2, 0, TMP2, 0, SLJIT_IMM, IN_UCHARS(1));
JUMPTO(SLJIT_NOT_ZERO, label);
JUMPHERE(jump);
-OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
-OP1(SLJIT_MOV, LCC_TABLE, 0, TMP3, 0);
-OP1(SLJIT_MOV, CHAR1, 0, SLJIT_MEM1(SLJIT_SP), LOCALS0);
-OP1(SLJIT_MOV, CHAR2, 0, SLJIT_MEM1(SLJIT_SP), LOCALS1);
-sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
-}
+OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), LOCALS0);
+
+if (opt_type == 2)
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
-#undef LCC_TABLE
-#undef CHAR1
-#undef CHAR2
+if (char2_reg == STACK_TOP)
+ {
+ OP1(SLJIT_MOV, char2_reg, 0, TMP3, 0);
+ OP1(SLJIT_MOV, lcc_table, 0, RETURN_ADDR, 0);
+ }
+
+OP1(SLJIT_MOV, char1_reg, 0, SLJIT_MEM1(SLJIT_SP), LOCALS1);
+sljit_emit_fast_return(compiler, TMP1, 0);
+}
#if defined SUPPORT_UTF && defined SUPPORT_UCP
-static const pcre_uchar * SLJIT_CALL do_utf_caselesscmp(pcre_uchar *src1, jit_arguments *args, pcre_uchar *end1)
+static const pcre_uchar * SLJIT_FUNC do_utf_caselesscmp(pcre_uchar *src1, pcre_uchar *src2, pcre_uchar *end1, pcre_uchar *end2)
{
/* This function would be ineffective to do in JIT level. */
sljit_u32 c1, c2;
-const pcre_uchar *src2 = args->uchar_ptr;
-const pcre_uchar *end2 = args->end;
const ucd_record *ur;
const sljit_u32 *pp;
@@ -6776,32 +6939,37 @@ else
#if defined SUPPORT_UTF && defined SUPPORT_UCP
if (common->utf && *cc == OP_REFI)
{
- SLJIT_ASSERT(TMP1 == SLJIT_R0 && STACK_TOP == SLJIT_R1 && TMP2 == SLJIT_R2);
+ SLJIT_ASSERT(TMP1 == SLJIT_R0 && STACK_TOP == SLJIT_R1);
if (ref)
- OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset + 1));
+ OP1(SLJIT_MOV, SLJIT_R2, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset + 1));
else
- OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP2), sizeof(sljit_sw));
+ OP1(SLJIT_MOV, SLJIT_R2, 0, SLJIT_MEM1(TMP2), sizeof(sljit_sw));
if (withchecks)
- jump = CMP(SLJIT_EQUAL, TMP1, 0, TMP2, 0);
+ jump = CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_R2, 0);
- /* Needed to save important temporary registers. */
+ /* No free saved registers so save data on stack. */
OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), LOCALS0, STACK_TOP, 0);
- OP1(SLJIT_MOV, SLJIT_R1, 0, ARGUMENTS, 0);
- OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_R1), SLJIT_OFFSETOF(jit_arguments, uchar_ptr), STR_PTR, 0);
- sljit_emit_ijump(compiler, SLJIT_CALL3, SLJIT_IMM, SLJIT_FUNC_OFFSET(do_utf_caselesscmp));
+ OP1(SLJIT_MOV, SLJIT_R1, 0, STR_PTR, 0);
+ OP1(SLJIT_MOV, SLJIT_R3, 0, STR_END, 0);
+ sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(SW) | SLJIT_ARG3(SW) | SLJIT_ARG4(SW), SLJIT_IMM, SLJIT_FUNC_OFFSET(do_utf_caselesscmp));
OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_SP), LOCALS0);
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_RETURN_REG, 0);
+
if (common->mode == JIT_COMPILE)
add_jump(compiler, backtracks, CMP(SLJIT_LESS_EQUAL, SLJIT_RETURN_REG, 0, SLJIT_IMM, 1));
else
{
- add_jump(compiler, backtracks, CMP(SLJIT_EQUAL, SLJIT_RETURN_REG, 0, SLJIT_IMM, 0));
- nopartial = CMP(SLJIT_NOT_EQUAL, SLJIT_RETURN_REG, 0, SLJIT_IMM, 1);
+ OP2(SLJIT_SUB | SLJIT_SET_Z | SLJIT_SET_LESS, SLJIT_UNUSED, 0, SLJIT_RETURN_REG, 0, SLJIT_IMM, 1);
+
+ add_jump(compiler, backtracks, JUMP(SLJIT_LESS));
+
+ nopartial = JUMP(SLJIT_NOT_EQUAL);
+ OP1(SLJIT_MOV, STR_PTR, 0, STR_END, 0);
check_partial(common, FALSE);
add_jump(compiler, backtracks, JUMP(SLJIT_JUMP));
JUMPHERE(nopartial);
}
- OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_RETURN_REG, 0);
}
else
#endif /* SUPPORT_UTF && SUPPORT_UCP */
@@ -7125,7 +7293,7 @@ add_jump(compiler, &backtrack->topbacktracks, CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_IM
return cc + 1 + LINK_SIZE;
}
-static int SLJIT_CALL do_callout(struct jit_arguments *arguments, PUBL(callout_block) *callout_block, pcre_uchar **jit_ovector)
+static sljit_s32 SLJIT_FUNC do_callout(struct jit_arguments *arguments, PUBL(callout_block) *callout_block, pcre_uchar **jit_ovector)
{
const pcre_uchar *begin = arguments->begin;
int *offset_vector = arguments->offsets;
@@ -7207,18 +7375,17 @@ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), LOCALS0, STACK_TOP, 0);
/* SLJIT_R0 = arguments */
OP1(SLJIT_MOV, SLJIT_R1, 0, STACK_TOP, 0);
GET_LOCAL_BASE(SLJIT_R2, 0, OVECTOR_START);
-sljit_emit_ijump(compiler, SLJIT_CALL3, SLJIT_IMM, SLJIT_FUNC_OFFSET(do_callout));
-OP1(SLJIT_MOV_S32, SLJIT_RETURN_REG, 0, SLJIT_RETURN_REG, 0);
+sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(S32) | SLJIT_ARG1(SW) | SLJIT_ARG2(SW) | SLJIT_ARG3(SW), SLJIT_IMM, SLJIT_FUNC_OFFSET(do_callout));
OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_SP), LOCALS0);
free_stack(common, CALLOUT_ARG_SIZE / sizeof(sljit_sw));
/* Check return value. */
-OP2(SLJIT_SUB | SLJIT_SET_Z | SLJIT_SET_SIG_GREATER, SLJIT_UNUSED, 0, SLJIT_RETURN_REG, 0, SLJIT_IMM, 0);
-add_jump(compiler, &backtrack->topbacktracks, JUMP(SLJIT_SIG_GREATER));
+OP2(SLJIT_SUB32 | SLJIT_SET_Z | SLJIT_SET_SIG_GREATER, SLJIT_UNUSED, 0, SLJIT_RETURN_REG, 0, SLJIT_IMM, 0);
+add_jump(compiler, &backtrack->topbacktracks, JUMP(SLJIT_SIG_GREATER32));
if (common->forced_quit_label == NULL)
- add_jump(compiler, &common->forced_quit, JUMP(SLJIT_NOT_EQUAL) /* SIG_LESS */);
+ add_jump(compiler, &common->forced_quit, JUMP(SLJIT_NOT_EQUAL32) /* SIG_LESS */);
else
- JUMPTO(SLJIT_NOT_EQUAL /* SIG_LESS */, common->forced_quit_label);
+ JUMPTO(SLJIT_NOT_EQUAL32 /* SIG_LESS */, common->forced_quit_label);
return cc + 2 + 2 * LINK_SIZE;
}
@@ -10439,11 +10606,11 @@ if (opcode == OP_SKIP_ARG)
OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), common->control_head_ptr);
OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), LOCALS0, STACK_TOP, 0);
OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_IMM, (sljit_sw)(current->cc + 2));
- sljit_emit_ijump(compiler, SLJIT_CALL2, SLJIT_IMM, SLJIT_FUNC_OFFSET(do_search_mark));
+ sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(SW), SLJIT_IMM, SLJIT_FUNC_OFFSET(do_search_mark));
OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_SP), LOCALS0);
OP1(SLJIT_MOV, STR_PTR, 0, TMP1, 0);
- add_jump(compiler, &common->reset_match, CMP(SLJIT_NOT_EQUAL, STR_PTR, 0, SLJIT_IMM, -1));
+ add_jump(compiler, &common->reset_match, CMP(SLJIT_NOT_EQUAL, STR_PTR, 0, SLJIT_IMM, 0));
return;
}
@@ -11031,7 +11198,7 @@ if (!compiler)
common->compiler = compiler;
/* Main pcre_jit_exec entry. */
-sljit_emit_enter(compiler, 0, 1, 5, 5, 0, 0, private_data_size);
+sljit_emit_enter(compiler, 0, SLJIT_ARG1(SW), 5, 5, 0, 0, private_data_size);
/* Register init. */
reset_ovector(common, (re->top_bracket + 1) * 2);
@@ -11044,8 +11211,8 @@ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, str))
OP1(SLJIT_MOV, STR_END, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, end));
OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, stack));
OP1(SLJIT_MOV_U32, TMP1, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, limit_match));
-OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(struct sljit_stack, base));
-OP1(SLJIT_MOV, STACK_LIMIT, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(struct sljit_stack, limit));
+OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(struct sljit_stack, end));
+OP1(SLJIT_MOV, STACK_LIMIT, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(struct sljit_stack, start));
OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, 1);
OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), LIMIT_MATCH, TMP1, 0);
@@ -11251,20 +11418,22 @@ common->quit_label = quit_label;
set_jumps(common->stackalloc, LABEL());
/* RETURN_ADDR is not a saved register. */
sljit_emit_fast_enter(compiler, SLJIT_MEM1(SLJIT_SP), LOCALS0);
-OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), LOCALS1, TMP2, 0);
-OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
-OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, stack));
-OP1(SLJIT_MOV, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(struct sljit_stack, top), STACK_TOP, 0);
-OP2(SLJIT_SUB, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(struct sljit_stack, limit), SLJIT_IMM, STACK_GROWTH_RATE);
-sljit_emit_ijump(compiler, SLJIT_CALL2, SLJIT_IMM, SLJIT_FUNC_OFFSET(sljit_stack_resize));
-jump = CMP(SLJIT_NOT_EQUAL, SLJIT_RETURN_REG, 0, SLJIT_IMM, 0);
-OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
-OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, stack));
-OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(struct sljit_stack, top));
-OP1(SLJIT_MOV, STACK_LIMIT, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(struct sljit_stack, limit));
-OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_SP), LOCALS1);
-sljit_emit_fast_return(compiler, SLJIT_MEM1(SLJIT_SP), LOCALS0);
+SLJIT_ASSERT(TMP1 == SLJIT_R0 && STACK_TOP == SLJIT_R1);
+
+OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), LOCALS1, STACK_TOP, 0);
+OP1(SLJIT_MOV, SLJIT_R0, 0, ARGUMENTS, 0);
+OP2(SLJIT_SUB, SLJIT_R1, 0, STACK_LIMIT, 0, SLJIT_IMM, STACK_GROWTH_RATE);
+OP1(SLJIT_MOV, SLJIT_R0, 0, SLJIT_MEM1(SLJIT_R0), SLJIT_OFFSETOF(jit_arguments, stack));
+OP1(SLJIT_MOV, STACK_LIMIT, 0, TMP2, 0);
+
+sljit_emit_icall(compiler, SLJIT_CALL, SLJIT_RET(SW) | SLJIT_ARG1(SW) | SLJIT_ARG2(SW), SLJIT_IMM, SLJIT_FUNC_OFFSET(sljit_stack_resize));
+jump = CMP(SLJIT_EQUAL, SLJIT_RETURN_REG, 0, SLJIT_IMM, 0);
+OP1(SLJIT_MOV, TMP2, 0, STACK_LIMIT, 0);
+OP1(SLJIT_MOV, STACK_LIMIT, 0, SLJIT_RETURN_REG, 0);
+OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), LOCALS0);
+OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_SP), LOCALS1);
+sljit_emit_fast_return(compiler, TMP1, 0);
/* Allocation failed. */
JUMPHERE(jump);
@@ -11409,9 +11578,9 @@ union {
sljit_u8 local_space[MACHINE_STACK_SIZE];
struct sljit_stack local_stack;
-local_stack.max_limit = local_space;
-local_stack.limit = local_space;
-local_stack.base = local_space + MACHINE_STACK_SIZE;
+local_stack.min_start = local_space;
+local_stack.start = local_space;
+local_stack.end = local_space + MACHINE_STACK_SIZE;
local_stack.top = local_space + MACHINE_STACK_SIZE;
arguments->stack = &local_stack;
convert_executable_func.executable_func = executable_func;
@@ -11529,7 +11698,7 @@ if ((options & PCRE_PARTIAL_HARD) != 0)
else if ((options & PCRE_PARTIAL_SOFT) != 0)
mode = JIT_PARTIAL_SOFT_COMPILE;
-if (functions->executable_funcs[mode] == NULL)
+if (functions == NULL || functions->executable_funcs[mode] == NULL)
return PCRE_ERROR_JIT_BADOPTION;
/* Sanity checks should be handled by pcre_exec. */
diff --git a/src/third_party/pcre-8.41/pcre_jit_test.c b/src/third_party/pcre-8.42/pcre_jit_test.c
index 034cb52697f..034cb52697f 100644
--- a/src/third_party/pcre-8.41/pcre_jit_test.c
+++ b/src/third_party/pcre-8.42/pcre_jit_test.c
diff --git a/src/third_party/pcre-8.41/pcre_maketables.c b/src/third_party/pcre-8.42/pcre_maketables.c
index a44a6eaa905..a44a6eaa905 100644
--- a/src/third_party/pcre-8.41/pcre_maketables.c
+++ b/src/third_party/pcre-8.42/pcre_maketables.c
diff --git a/src/third_party/pcre-8.41/pcre_newline.c b/src/third_party/pcre-8.42/pcre_newline.c
index b8f5a4de19c..b8f5a4de19c 100644
--- a/src/third_party/pcre-8.41/pcre_newline.c
+++ b/src/third_party/pcre-8.42/pcre_newline.c
diff --git a/src/third_party/pcre-8.41/pcre_ord2utf8.c b/src/third_party/pcre-8.42/pcre_ord2utf8.c
index 95f1beb963e..95f1beb963e 100644
--- a/src/third_party/pcre-8.41/pcre_ord2utf8.c
+++ b/src/third_party/pcre-8.42/pcre_ord2utf8.c
diff --git a/src/third_party/pcre-8.41/pcre_printint.c b/src/third_party/pcre-8.42/pcre_printint.c
index 60dcb55efbf..60dcb55efbf 100644
--- a/src/third_party/pcre-8.41/pcre_printint.c
+++ b/src/third_party/pcre-8.42/pcre_printint.c
diff --git a/src/third_party/pcre-8.41/pcre_refcount.c b/src/third_party/pcre-8.42/pcre_refcount.c
index 79efa90f216..79efa90f216 100644
--- a/src/third_party/pcre-8.41/pcre_refcount.c
+++ b/src/third_party/pcre-8.42/pcre_refcount.c
diff --git a/src/third_party/pcre-8.41/pcre_scanner.cc b/src/third_party/pcre-8.42/pcre_scanner.cc
index 6be2be6829b..6be2be6829b 100644
--- a/src/third_party/pcre-8.41/pcre_scanner.cc
+++ b/src/third_party/pcre-8.42/pcre_scanner.cc
diff --git a/src/third_party/pcre-8.41/pcre_scanner.h b/src/third_party/pcre-8.42/pcre_scanner.h
index 5617e4515cb..5617e4515cb 100644
--- a/src/third_party/pcre-8.41/pcre_scanner.h
+++ b/src/third_party/pcre-8.42/pcre_scanner.h
diff --git a/src/third_party/pcre-8.41/pcre_scanner_unittest.cc b/src/third_party/pcre-8.42/pcre_scanner_unittest.cc
index 623e2afda80..623e2afda80 100644
--- a/src/third_party/pcre-8.41/pcre_scanner_unittest.cc
+++ b/src/third_party/pcre-8.42/pcre_scanner_unittest.cc
diff --git a/src/third_party/pcre-8.41/pcre_string_utils.c b/src/third_party/pcre-8.42/pcre_string_utils.c
index 25eacc85073..25eacc85073 100644
--- a/src/third_party/pcre-8.41/pcre_string_utils.c
+++ b/src/third_party/pcre-8.42/pcre_string_utils.c
diff --git a/src/third_party/pcre-8.41/pcre_stringpiece.cc b/src/third_party/pcre-8.42/pcre_stringpiece.cc
index 67c0f1fc0e5..67c0f1fc0e5 100644
--- a/src/third_party/pcre-8.41/pcre_stringpiece.cc
+++ b/src/third_party/pcre-8.42/pcre_stringpiece.cc
diff --git a/src/third_party/pcre-8.41/pcre_stringpiece.h b/src/third_party/pcre-8.42/pcre_stringpiece.h
index cb94f52a010..cb94f52a010 100644
--- a/src/third_party/pcre-8.41/pcre_stringpiece.h
+++ b/src/third_party/pcre-8.42/pcre_stringpiece.h
diff --git a/src/third_party/pcre-8.41/pcre_stringpiece.h.in b/src/third_party/pcre-8.42/pcre_stringpiece.h.in
index f54f3f3b31b..f54f3f3b31b 100644
--- a/src/third_party/pcre-8.41/pcre_stringpiece.h.in
+++ b/src/third_party/pcre-8.42/pcre_stringpiece.h.in
diff --git a/src/third_party/pcre-8.41/pcre_stringpiece_unittest.cc b/src/third_party/pcre-8.42/pcre_stringpiece_unittest.cc
index 88e73a1f976..88e73a1f976 100644
--- a/src/third_party/pcre-8.41/pcre_stringpiece_unittest.cc
+++ b/src/third_party/pcre-8.42/pcre_stringpiece_unittest.cc
diff --git a/src/third_party/pcre-8.41/pcre_study.c b/src/third_party/pcre-8.42/pcre_study.c
index d9d4960d84e..d9d4960d84e 100644
--- a/src/third_party/pcre-8.41/pcre_study.c
+++ b/src/third_party/pcre-8.42/pcre_study.c
diff --git a/src/third_party/pcre-8.41/pcre_tables.c b/src/third_party/pcre-8.42/pcre_tables.c
index 5e18e8cf904..5e18e8cf904 100644
--- a/src/third_party/pcre-8.41/pcre_tables.c
+++ b/src/third_party/pcre-8.42/pcre_tables.c
diff --git a/src/third_party/pcre-8.41/pcre_ucd.c b/src/third_party/pcre-8.42/pcre_ucd.c
index f22f826c4c2..f22f826c4c2 100644
--- a/src/third_party/pcre-8.41/pcre_ucd.c
+++ b/src/third_party/pcre-8.42/pcre_ucd.c
diff --git a/src/third_party/pcre-8.41/pcre_valid_utf8.c b/src/third_party/pcre-8.42/pcre_valid_utf8.c
index 3b0f6464a35..3b0f6464a35 100644
--- a/src/third_party/pcre-8.41/pcre_valid_utf8.c
+++ b/src/third_party/pcre-8.42/pcre_valid_utf8.c
diff --git a/src/third_party/pcre-8.41/pcre_version.c b/src/third_party/pcre-8.42/pcre_version.c
index ae86ff28bc8..ae86ff28bc8 100644
--- a/src/third_party/pcre-8.41/pcre_version.c
+++ b/src/third_party/pcre-8.42/pcre_version.c
diff --git a/src/third_party/pcre-8.41/pcre_xclass.c b/src/third_party/pcre-8.42/pcre_xclass.c
index ef759a589a6..ef759a589a6 100644
--- a/src/third_party/pcre-8.41/pcre_xclass.c
+++ b/src/third_party/pcre-8.42/pcre_xclass.c
diff --git a/src/third_party/pcre-8.41/pcrecpp.cc b/src/third_party/pcre-8.42/pcrecpp.cc
index d09c9abc516..d09c9abc516 100644
--- a/src/third_party/pcre-8.41/pcrecpp.cc
+++ b/src/third_party/pcre-8.42/pcrecpp.cc
diff --git a/src/third_party/pcre-8.41/pcrecpp.h b/src/third_party/pcre-8.42/pcrecpp.h
index 3e594b0d439..3e594b0d439 100644
--- a/src/third_party/pcre-8.41/pcrecpp.h
+++ b/src/third_party/pcre-8.42/pcrecpp.h
diff --git a/src/third_party/pcre-8.41/pcrecpp_internal.h b/src/third_party/pcre-8.42/pcrecpp_internal.h
index 827f9e04e2a..827f9e04e2a 100644
--- a/src/third_party/pcre-8.41/pcrecpp_internal.h
+++ b/src/third_party/pcre-8.42/pcrecpp_internal.h
diff --git a/src/third_party/pcre-8.41/pcrecpp_unittest.cc b/src/third_party/pcre-8.42/pcrecpp_unittest.cc
index 4b15fbef1c3..4b15fbef1c3 100644
--- a/src/third_party/pcre-8.41/pcrecpp_unittest.cc
+++ b/src/third_party/pcre-8.42/pcrecpp_unittest.cc
diff --git a/src/third_party/pcre-8.41/pcrecpparg.h b/src/third_party/pcre-8.42/pcrecpparg.h
index b4f9c3f4989..b4f9c3f4989 100644
--- a/src/third_party/pcre-8.41/pcrecpparg.h
+++ b/src/third_party/pcre-8.42/pcrecpparg.h
diff --git a/src/third_party/pcre-8.41/pcrecpparg.h.in b/src/third_party/pcre-8.42/pcrecpparg.h.in
index 61bcab5402c..61bcab5402c 100644
--- a/src/third_party/pcre-8.41/pcrecpparg.h.in
+++ b/src/third_party/pcre-8.42/pcrecpparg.h.in
diff --git a/src/third_party/pcre-8.41/pcredemo.c b/src/third_party/pcre-8.42/pcredemo.c
index 946aba45cdc..946aba45cdc 100644
--- a/src/third_party/pcre-8.41/pcredemo.c
+++ b/src/third_party/pcre-8.42/pcredemo.c
diff --git a/src/third_party/pcre-8.41/pcregexp.pas b/src/third_party/pcre-8.42/pcregexp.pas
index bb2b3da8f3d..bb2b3da8f3d 100644
--- a/src/third_party/pcre-8.41/pcregexp.pas
+++ b/src/third_party/pcre-8.42/pcregexp.pas
diff --git a/src/third_party/pcre-8.41/pcregrep.c b/src/third_party/pcre-8.42/pcregrep.c
index 317f7454e13..a406be962d7 100644
--- a/src/third_party/pcre-8.41/pcregrep.c
+++ b/src/third_party/pcre-8.42/pcregrep.c
@@ -1387,8 +1387,8 @@ Returns: nothing
*/
static void
-do_after_lines(int lastmatchnumber, char *lastmatchrestart, char *endptr,
- char *printname)
+do_after_lines(unsigned long int lastmatchnumber, char *lastmatchrestart,
+ char *endptr, char *printname)
{
if (after_context > 0 && lastmatchnumber > 0)
{
@@ -1398,7 +1398,7 @@ if (after_context > 0 && lastmatchnumber > 0)
int ellength;
char *pp = lastmatchrestart;
if (printname != NULL) fprintf(stdout, "%s-", printname);
- if (number) fprintf(stdout, "%d-", lastmatchnumber++);
+ if (number) fprintf(stdout, "%lu-", lastmatchnumber++);
pp = end_of_line(pp, endptr, &ellength);
FWRITE(lastmatchrestart, 1, pp - lastmatchrestart, stdout);
lastmatchrestart = pp;
@@ -1502,11 +1502,11 @@ static int
pcregrep(void *handle, int frtype, char *filename, char *printname)
{
int rc = 1;
-int linenumber = 1;
-int lastmatchnumber = 0;
-int count = 0;
int filepos = 0;
int offsets[OFFSET_SIZE];
+unsigned long int linenumber = 1;
+unsigned long int lastmatchnumber = 0;
+unsigned long int count = 0;
char *lastmatchrestart = NULL;
char *ptr = main_buffer;
char *endptr;
@@ -1609,7 +1609,7 @@ while (ptr < endptr)
if (endlinelength == 0 && t == main_buffer + bufsize)
{
- fprintf(stderr, "pcregrep: line %d%s%s is too long for the internal buffer\n"
+ fprintf(stderr, "pcregrep: line %lu%s%s is too long for the internal buffer\n"
"pcregrep: check the --buffer-size option\n",
linenumber,
(filename == NULL)? "" : " of file ",
@@ -1747,7 +1747,7 @@ while (ptr < endptr)
prevoffsets[1] = offsets[1];
if (printname != NULL) fprintf(stdout, "%s:", printname);
- if (number) fprintf(stdout, "%d:", linenumber);
+ if (number) fprintf(stdout, "%lu:", linenumber);
/* Handle --line-offsets */
@@ -1862,7 +1862,7 @@ while (ptr < endptr)
{
char *pp = lastmatchrestart;
if (printname != NULL) fprintf(stdout, "%s-", printname);
- if (number) fprintf(stdout, "%d-", lastmatchnumber++);
+ if (number) fprintf(stdout, "%lu-", lastmatchnumber++);
pp = end_of_line(pp, endptr, &ellength);
FWRITE(lastmatchrestart, 1, pp - lastmatchrestart, stdout);
lastmatchrestart = pp;
@@ -1902,7 +1902,7 @@ while (ptr < endptr)
int ellength;
char *pp = p;
if (printname != NULL) fprintf(stdout, "%s-", printname);
- if (number) fprintf(stdout, "%d-", linenumber - linecount--);
+ if (number) fprintf(stdout, "%lu-", linenumber - linecount--);
pp = end_of_line(pp, endptr, &ellength);
FWRITE(p, 1, pp - p, stdout);
p = pp;
@@ -1916,7 +1916,7 @@ while (ptr < endptr)
endhyphenpending = TRUE;
if (printname != NULL) fprintf(stdout, "%s:", printname);
- if (number) fprintf(stdout, "%d:", linenumber);
+ if (number) fprintf(stdout, "%lu:", linenumber);
/* In multiline mode, we want to print to the end of the line in which
the end of the matched string is found, so we adjust linelength and the
@@ -2112,7 +2112,7 @@ if (count_only && !quiet)
{
if (printname != NULL && filenames != FN_NONE)
fprintf(stdout, "%s:", printname);
- fprintf(stdout, "%d\n", count);
+ fprintf(stdout, "%lu\n", count);
}
}
@@ -2234,7 +2234,7 @@ if (isdirectory(pathname))
if (dee_action == dee_RECURSE)
{
- char buffer[1024];
+ char buffer[2048];
char *nextfile;
directory_type *dir = opendirectory(pathname);
@@ -2249,7 +2249,14 @@ if (isdirectory(pathname))
while ((nextfile = readdirectory(dir)) != NULL)
{
int frc;
- sprintf(buffer, "%.512s%c%.128s", pathname, FILESEP, nextfile);
+ int fnlength = strlen(pathname) + strlen(nextfile) + 2;
+ if (fnlength > 2048)
+ {
+ fprintf(stderr, "pcre2grep: recursive filename is too long\n");
+ rc = 2;
+ break;
+ }
+ sprintf(buffer, "%s%c%s", pathname, FILESEP, nextfile);
frc = grep_or_recurse(buffer, dir_recurse, FALSE);
if (frc > 1) rc = frc;
else if (frc == 0 && rc == 1) rc = 0;
@@ -2520,7 +2527,14 @@ if ((popts & PO_FIXED_STRINGS) != 0)
}
}
-sprintf(buffer, "%s%.*s%s", prefix[popts], patlen, ps, suffix[popts]);
+if (snprintf(buffer, PATBUFSIZE, "%s%.*s%s", prefix[popts], patlen, ps,
+ suffix[popts]) > PATBUFSIZE)
+ {
+ fprintf(stderr, "pcregrep: Buffer overflow while compiling \"%s\"\n",
+ ps);
+ return FALSE;
+ }
+
p->compiled = pcre_compile(buffer, options, &error, &errptr, pcretables);
if (p->compiled != NULL) return TRUE;
@@ -2756,8 +2770,15 @@ for (i = 1; i < argc; i++)
int arglen = (argequals == NULL || equals == NULL)?
(int)strlen(arg) : (int)(argequals - arg);
- sprintf(buff1, "%.*s", baselen, op->long_name);
- sprintf(buff2, "%s%.*s", buff1, fulllen - baselen - 2, opbra + 1);
+ if (snprintf(buff1, sizeof(buff1), "%.*s", baselen, op->long_name) >
+ (int)sizeof(buff1) ||
+ snprintf(buff2, sizeof(buff2), "%s%.*s", buff1,
+ fulllen - baselen - 2, opbra + 1) > (int)sizeof(buff2))
+ {
+ fprintf(stderr, "pcregrep: Buffer overflow when parsing %s option\n",
+ op->long_name);
+ pcregrep_exit(2);
+ }
if (strncmp(arg, buff1, arglen) == 0 ||
strncmp(arg, buff2, arglen) == 0)
diff --git a/src/third_party/pcre-8.41/pcreposix.c b/src/third_party/pcre-8.42/pcreposix.c
index 7b404a71100..a76d6bfca45 100644
--- a/src/third_party/pcre-8.41/pcreposix.c
+++ b/src/third_party/pcre-8.42/pcreposix.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2017 University of Cambridge
+ Copyright (c) 1997-2018 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -389,8 +389,8 @@ if (rc >= 0)
{
for (i = 0; i < (size_t)rc; i++)
{
- pmatch[i].rm_so = ovector[i*2] + so;
- pmatch[i].rm_eo = ovector[i*2+1] + so;
+ pmatch[i].rm_so = (ovector[i*2] < 0)? -1 : ovector[i*2] + so;
+ pmatch[i].rm_eo = (ovector[i*2+1] < 0)? -1: ovector[i*2+1] + so;
}
if (allocated_ovector) free(ovector);
for (; i < nmatch; i++) pmatch[i].rm_so = pmatch[i].rm_eo = -1;
diff --git a/src/third_party/pcre-8.41/pcreposix.h b/src/third_party/pcre-8.42/pcreposix.h
index c77c0b0523c..c77c0b0523c 100644
--- a/src/third_party/pcre-8.41/pcreposix.h
+++ b/src/third_party/pcre-8.42/pcreposix.h
diff --git a/src/third_party/pcre-8.41/pcretest.c b/src/third_party/pcre-8.42/pcretest.c
index f1303037281..f1303037281 100644
--- a/src/third_party/pcre-8.41/pcretest.c
+++ b/src/third_party/pcre-8.42/pcretest.c
diff --git a/src/third_party/pcre-8.41/perltest.pl b/src/third_party/pcre-8.42/perltest.pl
index 29b808b5293..29b808b5293 100755
--- a/src/third_party/pcre-8.41/perltest.pl
+++ b/src/third_party/pcre-8.42/perltest.pl
diff --git a/src/third_party/pcre-8.41/ucp.h b/src/third_party/pcre-8.42/ucp.h
index 2fa00296e42..2fa00296e42 100644
--- a/src/third_party/pcre-8.41/ucp.h
+++ b/src/third_party/pcre-8.42/ucp.h
diff --git a/src/third_party/scripts/pcre_get_sources.sh b/src/third_party/scripts/pcre_get_sources.sh
index 16c79a3e911..6f62740bcd6 100644
--- a/src/third_party/scripts/pcre_get_sources.sh
+++ b/src/third_party/scripts/pcre_get_sources.sh
@@ -16,13 +16,17 @@ if [ "$#" -ne 0 ]; then
exit 1
fi
-VERSION=8.41
+
+VERSION=8.42
NAME=pcre
TARBALL=$NAME-$VERSION.tar.gz
TARBALL_DIR=$NAME-$VERSION
TEMP_DIR=$(mktemp -d /tmp/pcre.XXXXXX)
trap "rm -rf $TEMP_DIR" EXIT
+OLD_DIR=$(find $(git rev-parse --show-toplevel)/src/third_party -name 'pcre-*' -type d)
+OLD_PATCH_DIR="$OLD_DIR/patches"
DEST_DIR=$(git rev-parse --show-toplevel)/src/third_party/$NAME-$VERSION
+PATCH_DIR="$DEST_DIR/patches"
UNAME=$(uname | tr A-Z a-z)
if [ $UNAME == "sunos" ]; then
@@ -98,3 +102,9 @@ fi
# Copy over config.h
mkdir $DEST_DIR/build_$TARGET_UNAME || true
cp $TEMP_DIR/config.h $DEST_DIR/build_$TARGET_UNAME
+cp -R $OLD_PATCH_DIR $PATCH_DIR
+
+cd $DEST_DIR
+for patchfile in $PATCH_DIR/*; do
+ patch -p4 < $patchfile
+done