svn commit: r355071 - in vendor/expat/dist: . doc examples lib tests tests/benchmark xmlwf

Xin LI delphij at FreeBSD.org
Sun Nov 24 23:46:31 UTC 2019


Author: delphij
Date: Sun Nov 24 23:46:29 2019
New Revision: 355071
URL: https://svnweb.freebsd.org/changeset/base/355071

Log:
  Vendor import of expat 2.2.9

Added:
  vendor/expat/dist/fix-xmltest-log.sh   (contents, props changed)
  vendor/expat/dist/xmlwf/xmlwf_helpgen.py   (contents, props changed)
  vendor/expat/dist/xmlwf/xmlwf_helpgen.sh   (contents, props changed)
Modified:
  vendor/expat/dist/Changes
  vendor/expat/dist/FREEBSD-Xlist
  vendor/expat/dist/Makefile.am
  vendor/expat/dist/Makefile.in
  vendor/expat/dist/README.md
  vendor/expat/dist/configure.ac
  vendor/expat/dist/doc/Makefile.am
  vendor/expat/dist/doc/Makefile.in
  vendor/expat/dist/doc/reference.html
  vendor/expat/dist/examples/Makefile.in
  vendor/expat/dist/examples/elements.c
  vendor/expat/dist/examples/outline.c
  vendor/expat/dist/expat_config.h.in
  vendor/expat/dist/lib/Makefile.am
  vendor/expat/dist/lib/Makefile.in
  vendor/expat/dist/lib/asciitab.h
  vendor/expat/dist/lib/expat.h
  vendor/expat/dist/lib/expat_external.h
  vendor/expat/dist/lib/iasciitab.h
  vendor/expat/dist/lib/internal.h
  vendor/expat/dist/lib/latin1tab.h
  vendor/expat/dist/lib/nametab.h
  vendor/expat/dist/lib/siphash.h
  vendor/expat/dist/lib/utf8tab.h
  vendor/expat/dist/lib/xmlparse.c
  vendor/expat/dist/lib/xmlrole.c
  vendor/expat/dist/lib/xmlrole.h
  vendor/expat/dist/lib/xmltok.c
  vendor/expat/dist/lib/xmltok.h
  vendor/expat/dist/lib/xmltok_impl.c
  vendor/expat/dist/lib/xmltok_impl.h
  vendor/expat/dist/lib/xmltok_ns.c
  vendor/expat/dist/test-driver-wrapper.sh
  vendor/expat/dist/tests/Makefile.in
  vendor/expat/dist/tests/benchmark/Makefile.in
  vendor/expat/dist/tests/benchmark/benchmark.c
  vendor/expat/dist/tests/chardata.c
  vendor/expat/dist/tests/chardata.h
  vendor/expat/dist/tests/memcheck.c
  vendor/expat/dist/tests/memcheck.h
  vendor/expat/dist/tests/minicheck.c
  vendor/expat/dist/tests/minicheck.h
  vendor/expat/dist/tests/runtests.c
  vendor/expat/dist/tests/structdata.c
  vendor/expat/dist/tests/structdata.h
  vendor/expat/dist/tests/xmltest.sh
  vendor/expat/dist/xmlwf/Makefile.am
  vendor/expat/dist/xmlwf/Makefile.in
  vendor/expat/dist/xmlwf/codepage.c
  vendor/expat/dist/xmlwf/ct.c
  vendor/expat/dist/xmlwf/filemap.h
  vendor/expat/dist/xmlwf/readfilemap.c
  vendor/expat/dist/xmlwf/unixfilemap.c
  vendor/expat/dist/xmlwf/win32filemap.c
  vendor/expat/dist/xmlwf/xmlfile.c
  vendor/expat/dist/xmlwf/xmlfile.h
  vendor/expat/dist/xmlwf/xmlmime.c
  vendor/expat/dist/xmlwf/xmltchar.h
  vendor/expat/dist/xmlwf/xmlwf.c

Modified: vendor/expat/dist/Changes
==============================================================================
--- vendor/expat/dist/Changes	Sun Nov 24 23:21:47 2019	(r355070)
+++ vendor/expat/dist/Changes	Sun Nov 24 23:46:29 2019	(r355071)
@@ -2,6 +2,162 @@ NOTE: We are looking for help with a few things:
       https://github.com/libexpat/libexpat/labels/help%20wanted
       If you can help, please get in touch.  Thanks!
 
+Release 2.2.9 Wed Septemper 25 2019
+        Other changes:
+                  examples: Drop executable bits from elements.c
+            #349  Windows: Change the name of the Windows DLLs from expat*.dll
+                    to libexpat*.dll once more (regression from 2.2.8, first
+                    fixed in 1.95.3, issue #61 on SourceForge today,
+                    was issue #432456 back then); needs a fix due
+                    case-insensitive file systems on Windows and the fact that
+                    Perl's XML::Parser::Expat compiles into Expat.dll.
+            #347  Windows: Only define _CRT_RAND_S if not defined
+                  Version info bumped from 7:10:6 to 7:11:6
+
+        Special thanks to:
+            Ben Wagner
+
+Release 2.2.8 Fri Septemper 13 2019
+        Security fixes:
+       #317 #318  CVE-2019-15903 -- Fix heap overflow triggered by
+                    XML_GetCurrentLineNumber (or XML_GetCurrentColumnNumber),
+                    and deny internal entities closing the doctype;
+                    fixed in commit c20b758c332d9a13afbbb276d30db1d183a85d43
+
+        Bug fixes:
+            #240  Fix cases where XML_StopParser did not have any effect
+                    when called from inside of an end element handler
+            #341  xmlwf: Fix exit code for operation without "-d DIRECTORY";
+                    previously, only "-d DIRECTORY" would give you a proper
+                    exit code:
+                      # xmlwf -d . <<<'<not well-formed>' 2>/dev/null ; echo $?
+                      2
+                      # xmlwf <<<'<not well-formed>' 2>/dev/null ; echo $?
+                      0
+                    Now both cases return exit code 2.
+
+        Other changes:
+       #299 #302  Windows: Replace LoadLibrary hack to access
+                    unofficial API function SystemFunction036 (RtlGenRandom)
+                    by using official API function rand_s (needs WinXP+)
+            #325  Windows: Drop support for Visual Studio <=7.1/2003
+                    and document supported compilers in README.md
+            #286  Windows: Remove COM code from xmlwf; in case it turns
+                    out needed later, there will be a dedicated repository
+                    below https://github.com/libexpat/ for that code
+            #322  Windows: Remove explicit MSVC solution and project files.
+                    You can generate Visual Studio solution files through
+                    CMake, e.g.: cmake -G"Visual Studio 15 2017" .
+            #338  xmlwf: Make "xmlwf -h" help output more friendly
+            #339  examples: Improve elements.c
+       #244 #264  Autotools: Add argument --enable-xml-attr-info
+       #239 #301  Autotools: Add arguments
+                    --with-getrandom
+                    --without-getrandom
+                    --with-sys-getrandom
+                    --without-sys-getrandom
+       #312 #343  Autotools: Fix linking issues with "./configure LD=clang"
+                  Autotools: Fix "make run-xmltest" for out-of-source builds
+       #329 #336  CMake: Pull all options from Expat <=2.2.7 into namespace
+                    prefix EXPAT_ with the exception of DOCBOOK_TO_MAN:
+                    - BUILD_doc            -> EXPAT_BUILD_DOCS (plural)
+                    - BUILD_examples       -> EXPAT_BUILD_EXAMPLES
+                    - BUILD_shared         -> EXPAT_SHARED_LIBS
+                    - BUILD_tests          -> EXPAT_BUILD_TESTS
+                    - BUILD_tools          -> EXPAT_BUILD_TOOLS
+                    - DOCBOOK_TO_MAN       -> DOCBOOK_TO_MAN (unchanged)
+                    - INSTALL              -> EXPAT_ENABLE_INSTALL
+                    - MSVC_USE_STATIC_CRT  -> EXPAT_MSVC_STATIC_CRT
+                    - USE_libbsd           -> EXPAT_WITH_LIBBSD
+                    - WARNINGS_AS_ERRORS   -> EXPAT_WARNINGS_AS_ERRORS
+                    - XML_CONTEXT_BYTES    -> EXPAT_CONTEXT_BYTES
+                    - XML_DEV_URANDOM      -> EXPAT_DEV_URANDOM
+                    - XML_DTD              -> EXPAT_DTD
+                    - XML_NS               -> EXPAT_NS
+                    - XML_UNICODE          -> EXPAT_CHAR_TYPE=ushort (!)
+                    - XML_UNICODE_WCHAR_T  -> EXPAT_CHAR_TYPE=wchar_t (!)
+       #244 #264  CMake: Add argument -DEXPAT_ATTR_INFO=(ON|OFF),
+                    default OFF
+            #326  CMake: Add argument -DEXPAT_LARGE_SIZE=(ON|OFF),
+                    default OFF
+            #328  CMake: Add argument -DEXPAT_MIN_SIZE=(ON|OFF),
+                    default OFF
+       #239 #277  CMake: Add arguments
+                    -DEXPAT_WITH_GETRANDOM=(ON|OFF|AUTO), default AUTO
+                    -DEXPAT_WITH_SYS_GETRANDOM=(ON|OFF|AUTO), default AUTO
+            #326  CMake: Install expat_config.h to include directory
+            #326  CMake: Generate and install configuration files for
+                    future find_package(expat [..] CONFIG [..])
+                  CMake: Now produces a summary of applied configuration
+                  CMake: Require C++ compiler only when tests are enabled
+            #330  CMake: Fix compilation for 16bit character types,
+                    i.e. ex -DXML_UNICODE=ON (and ex -DXML_UNICODE_WCHAR_T=ON)
+            #265  CMake: Fix linking with MinGW
+            #330  CMake: Add full support for MinGW; to enable, use
+                    -DCMAKE_TOOLCHAIN_FILE=[expat]/cmake/mingw-toolchain.cmake
+            #330  CMake: Port "make run-xmltest" from GNU Autotools to CMake
+            #316  CMake: Windows: Make binary postfix match MSVC
+                    Old: expat[d].lib
+                    New: expat[w][d][MD|MT].lib
+                  CMake: Migrate files from Windows to Unix line endings
+            #308  CMake: Integrate OSS-Fuzz fuzzers, option
+                    -DEXPAT_BUILD_FUZZERS=(ON|OFF), default OFF
+             #14  Drop an OpenVMS support leftover
+    #235 #268 ..
+    #270 #310 ..
+  #313 #331 #333  Address compiler warnings
+    #282 #283 ..
+       #284 #285  Address cppcheck warnings
+       #294 #295  Address Clang Static Analyzer warnings
+        #24 #293  Mass-apply clang-format 9 (and ensure conformance during CI)
+                  Version info bumped from 7:9:6 to 7:10:6
+
+        Special thanks to:
+            David Loffredo
+            Joonun Jang
+            Khajapasha Mohammed
+            Kishore Kunche
+            Marco Maggi
+            Mitch Phillips
+            Rolf Ade
+            xantares
+            Zhongyuan Zhou
+
+Release 2.2.7 Wed June 19 2019
+        Security fixes:
+       #186 #262  CVE-2018-20843 -- Fix extraction of namespace prefixes from
+                    XML names; XML names with multiple colons could end up in
+                    the wrong namespace, and take a high amount of RAM and CPU
+                    resources while processing, opening the door to
+                    use for denial-of-service attacks
+
+        Other changes:
+       #195 #197  Autotools/CMake: Utilize -fvisibility=hidden to stop
+                    exporting non-API symbols
+            #227  Autotools: Add --without-examples and --without-tests
+            #228  Autotools: Modernize configure.ac
+       #245 #246  Autotools: Fix check for -fvisibility=hidden for Clang
+       #247 #248  Autotools: Fix compilation for lack of docbook2x-man
+       #236 #258  Autotools: Produce .tar.{gz,lz,xz} release archives
+            #212  CMake: Make libdir of pkgconfig expat.pc support multilib
+       #158 #263  CMake: Build man page in PROJECT_BINARY_DIR not _SOURCE_DIR
+            #219  Remove fallback to bcopy, assume that memmove(3) exists
+            #257  Use portable "/usr/bin/env bash" shebang (e.g. for OpenBSD)
+            #243  Windows: Fix syntax of .def module definition files
+                  Version info bumped from 7:8:6 to 7:9:6
+
+        Special thanks to:
+            Benjamin Peterson
+            Caolán McNamara
+            Hanno Böck
+            KangLin
+            Kishore Kunche
+            Marco Maggi
+            Rhodri James
+            Sebastian Dröge
+            userwithuid
+            Yury Gribov
+
 Release 2.2.6 Sun August 12 2018
         Bug fixes:
        #170 #206  Avoid doing arithmetic with NULL pointers in XML_GetBuffer

Modified: vendor/expat/dist/FREEBSD-Xlist
==============================================================================
--- vendor/expat/dist/FREEBSD-Xlist	Sun Nov 24 23:21:47 2019	(r355070)
+++ vendor/expat/dist/FREEBSD-Xlist	Sun Nov 24 23:46:29 2019	(r355071)
@@ -8,6 +8,7 @@
 *.pc.in
 *.vcxproj*
 *config.h
+cmake
 CMake*
 Configure*
 amiga

Modified: vendor/expat/dist/Makefile.am
==============================================================================
--- vendor/expat/dist/Makefile.am	Sun Nov 24 23:21:47 2019	(r355070)
+++ vendor/expat/dist/Makefile.am	Sun Nov 24 23:46:29 2019	(r355071)
@@ -30,14 +30,21 @@
 
 AUTOMAKE_OPTIONS = \
     dist-bzip2 \
+    dist-lzip \
+    dist-xz \
     foreign \
-    no-dist-gzip \
     subdir-objects
 
 ACLOCAL_AMFLAGS = -I m4
 LIBTOOLFLAGS = --verbose
 
-SUBDIRS = lib examples tests  # lib goes first to build first
+SUBDIRS = lib # lib goes first to build first
+if WITH_EXAMPLES
+SUBDIRS += examples
+endif
+if WITH_TESTS
+SUBDIRS += tests  
+endif
 if WITH_XMLWF
 SUBDIRS += xmlwf doc
 endif
@@ -47,41 +54,19 @@ pkgconfigdir = $(libdir)/pkgconfig
 
 
 _EXTRA_DIST_CMAKE = \
+    cmake/expat-config.cmake.in \
+    cmake/mingw-toolchain.cmake \
+    \
     CMakeLists.txt \
     CMake.README \
     ConfigureChecks.cmake \
     expat_config.h.cmake
 
 _EXTRA_DIST_WINDOWS = \
-    examples/elements.vcxproj \
-    examples/elements.vcxproj.filters \
-    examples/outline.vcxproj \
-    examples/outline.vcxproj.filters \
-    \
-    lib/expat_static.vcxproj \
-    lib/expat_static.vcxproj.filters \
-    lib/expat.vcxproj \
-    lib/expat.vcxproj.filters \
-    lib/expatw_static.vcxproj \
-    lib/expatw_static.vcxproj.filters \
-    lib/expatw.vcxproj \
-    lib/expatw.vcxproj.filters \
-    \
-    tests/benchmark/benchmark.sln \
-    tests/benchmark/benchmark.vcxproj \
-    \
-    tests/runtests.sln \
-    tests/runtests.vcxproj \
-    tests/runtests.vcxproj.filters \
-    \
+    win32/build_expat_iss.bat \
     win32/expat.iss \
     win32/MANIFEST.txt \
-    win32/README.txt \
-    \
-    xmlwf/xmlwf.vcxproj \
-    xmlwf/xmlwf.vcxproj.filters \
-    \
-    expat.sln
+    win32/README.txt
 
 EXTRA_DIST = \
     $(_EXTRA_DIST_CMAKE) \
@@ -91,8 +76,13 @@ EXTRA_DIST = \
     conftools/get-version.sh \
     conftools/PrintPath \
     \
+    xmlwf/xmlwf_helpgen.py \
+    xmlwf/xmlwf_helpgen.sh \
+    \
     Changes \
     README.md \
+    \
+    fix-xmltest-log.sh \
     test-driver-wrapper.sh
 
 
@@ -121,7 +111,8 @@ run-benchmark:
 	$(MAKE) -C tests/benchmark
 	./run.sh tests/benchmark/benchmark at EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/recset.xml 65535 3
 
-tests/xmlts.zip:
+.PHONY: download-xmlts-zip
+download-xmlts-zip:
 	if test "$(XMLTS_ZIP)" = ""; then \
 		wget --output-document=tests/xmlts.zip \
 			https://www.w3.org/XML/Test/xmlts20080827.zip; \
@@ -129,16 +120,26 @@ tests/xmlts.zip:
 		cp $(XMLTS_ZIP) tests/xmlts.zip; \
 	fi
 
-tests/xmlconf: tests/xmlts.zip
+tests/xmlts.zip:
+	$(MAKE) download-xmlts-zip
+
+.PHONY: extract-xmlts-zip
+extract-xmlts-zip: tests/xmlts.zip
+	[ -f $(builddir)/tests/xmlts.zip ] || $(MAKE) download-xmlts-zip  # vpath workaround
 	cd tests && unzip -q xmlts.zip
 
+tests/xmlconf: tests/xmlts.zip
+	$(MAKE) extract-xmlts-zip
+
 .PHONY: run-xmltest
 run-xmltest: tests/xmlconf
 if WITH_XMLWF
+	[ -d $(builddir)/tests/xmlconf ] || $(MAKE) extract-xmlts-zip  # vpath workaround
+	$(MAKE) -C lib
 	$(MAKE) -C xmlwf
-	tests/xmltest.sh "$(PWD)/run.sh $(PWD)/xmlwf/xmlwf at EXEEXT@" 2>&1 | tee tests/xmltest.log
-	dos2unix tests/xmltest.log
-	diff -u tests/xmltest.log.expected tests/xmltest.log
+	$(srcdir)/tests/xmltest.sh "$(abs_builddir)/run.sh $(abs_builddir)/xmlwf/xmlwf at EXEEXT@" 2>&1 | tee $(builddir)/tests/xmltest.log
+	$(srcdir)/fix-xmltest-log.sh $(builddir)/tests/xmltest.log
+	diff -u $(srcdir)/tests/xmltest.log.expected $(builddir)/tests/xmltest.log
 else
 	@echo 'ERROR: xmlwf is needed for "make run-xmltest".' >&2
 	@echo 'ERROR: Please re-configure without --without-xmlwf.' >&2
@@ -147,7 +148,7 @@ endif
 
 .PHONY: qa
 qa:
-	./qa.sh address
-	./qa.sh memory
-	./qa.sh undefined
-	./qa.sh coverage
+	QA_COMPILER=clang QA_SANITIZER=address   ./qa.sh
+	QA_COMPILER=clang QA_SANITIZER=memory    ./qa.sh
+	QA_COMPILER=clang QA_SANITIZER=undefined ./qa.sh
+	QA_COMPILER=gcc   QA_PROCESSOR=gcov      ./qa.sh

Modified: vendor/expat/dist/Makefile.in
==============================================================================
--- vendor/expat/dist/Makefile.in	Sun Nov 24 23:21:47 2019	(r355070)
+++ vendor/expat/dist/Makefile.in	Sun Nov 24 23:46:29 2019	(r355071)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2018 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -118,13 +118,22 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
- at WITH_XMLWF_TRUE@am__append_1 = xmlwf doc
+ at WITH_EXAMPLES_TRUE@am__append_1 = examples
+ at WITH_TESTS_TRUE@am__append_2 = tests  
+ at WITH_XMLWF_TRUE@am__append_3 = xmlwf doc
 subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
 	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
 	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-	$(top_srcdir)/conftools/ac_c_bigendian_cross.m4 \
+	$(top_srcdir)/acinclude.m4 \
+	$(top_srcdir)/conftools/ax-require-defined.m4 \
+	$(top_srcdir)/conftools/ax-check-compile-flag.m4 \
+	$(top_srcdir)/conftools/ax-check-link-flag.m4 \
+	$(top_srcdir)/conftools/ax-append-flag.m4 \
+	$(top_srcdir)/conftools/ax-append-compile-flags.m4 \
+	$(top_srcdir)/conftools/ax-append-link-flags.m4 \
+	$(top_srcdir)/conftools/expatcfg-compiler-supports-visibility.m4 \
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
@@ -199,7 +208,7 @@ am__recursive_targets = \
   $(RECURSIVE_CLEAN_TARGETS) \
   $(am__extra_recursive_targets)
 AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
-	cscope distdir dist dist-all distcheck
+	cscope distdir distdir-am dist dist-all distcheck
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
 	$(LISP)expat_config.h.in
 # Read a list of newline-separated strings from the standard input,
@@ -224,14 +233,15 @@ CSCOPE = cscope
 DIST_SUBDIRS = lib examples tests xmlwf doc
 am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/expat.pc.in \
 	$(srcdir)/expat_config.h.in $(srcdir)/run.sh.in \
-	$(top_srcdir)/conftools/compile \
+	$(top_srcdir)/conftools/ar-lib $(top_srcdir)/conftools/compile \
 	$(top_srcdir)/conftools/config.guess \
 	$(top_srcdir)/conftools/config.sub \
 	$(top_srcdir)/conftools/install-sh \
 	$(top_srcdir)/conftools/ltmain.sh \
 	$(top_srcdir)/conftools/missing AUTHORS COPYING \
-	conftools/compile conftools/config.guess conftools/config.sub \
-	conftools/install-sh conftools/ltmain.sh conftools/missing
+	conftools/ar-lib conftools/compile conftools/config.guess \
+	conftools/config.sub conftools/depcomp conftools/install-sh \
+	conftools/ltmain.sh conftools/missing
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
@@ -267,9 +277,10 @@ am__relativize = \
     dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
   done; \
   reldir="$$dir2"
+DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 $(distdir).tar.lz \
+	$(distdir).tar.xz
 GZIP_ENV = --best
-DIST_ARCHIVES = $(distdir).tar.bz2
-DIST_TARGETS = dist-bzip2
+DIST_TARGETS = dist-lzip dist-xz dist-bzip2 dist-gzip
 distuninstallcheck_listfiles = find . -type f -print
 am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
   | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
@@ -402,51 +413,30 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = \
     dist-bzip2 \
+    dist-lzip \
+    dist-xz \
     foreign \
-    no-dist-gzip \
     subdir-objects
 
 ACLOCAL_AMFLAGS = -I m4
 LIBTOOLFLAGS = --verbose
-SUBDIRS = lib examples tests $(am__append_1)
+SUBDIRS = lib $(am__append_1) $(am__append_2) $(am__append_3)
 pkgconfig_DATA = expat.pc
 pkgconfigdir = $(libdir)/pkgconfig
 _EXTRA_DIST_CMAKE = \
+    cmake/expat-config.cmake.in \
+    cmake/mingw-toolchain.cmake \
+    \
     CMakeLists.txt \
     CMake.README \
     ConfigureChecks.cmake \
     expat_config.h.cmake
 
 _EXTRA_DIST_WINDOWS = \
-    examples/elements.vcxproj \
-    examples/elements.vcxproj.filters \
-    examples/outline.vcxproj \
-    examples/outline.vcxproj.filters \
-    \
-    lib/expat_static.vcxproj \
-    lib/expat_static.vcxproj.filters \
-    lib/expat.vcxproj \
-    lib/expat.vcxproj.filters \
-    lib/expatw_static.vcxproj \
-    lib/expatw_static.vcxproj.filters \
-    lib/expatw.vcxproj \
-    lib/expatw.vcxproj.filters \
-    \
-    tests/benchmark/benchmark.sln \
-    tests/benchmark/benchmark.vcxproj \
-    \
-    tests/runtests.sln \
-    tests/runtests.vcxproj \
-    tests/runtests.vcxproj.filters \
-    \
+    win32/build_expat_iss.bat \
     win32/expat.iss \
     win32/MANIFEST.txt \
-    win32/README.txt \
-    \
-    xmlwf/xmlwf.vcxproj \
-    xmlwf/xmlwf.vcxproj.filters \
-    \
-    expat.sln
+    win32/README.txt
 
 EXTRA_DIST = \
     $(_EXTRA_DIST_CMAKE) \
@@ -456,8 +446,13 @@ EXTRA_DIST = \
     conftools/get-version.sh \
     conftools/PrintPath \
     \
+    xmlwf/xmlwf_helpgen.py \
+    xmlwf/xmlwf_helpgen.sh \
+    \
     Changes \
     README.md \
+    \
+    fix-xmltest-log.sh \
     test-driver-wrapper.sh
 
 all: expat_config.h
@@ -485,8 +480,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config
 	    echo ' $(SHELL) ./config.status'; \
 	    $(SHELL) ./config.status;; \
 	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \
 	esac;
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -653,7 +648,10 @@ distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 	-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
 
-distdir: $(DISTFILES)
+distdir: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
 	$(am__remove_distdir)
 	test -d "$(distdir)" || mkdir "$(distdir)"
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -723,11 +721,9 @@ dist-gzip: distdir
 dist-bzip2: distdir
 	tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
 	$(am__post_remove_distdir)
-
 dist-lzip: distdir
 	tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
 	$(am__post_remove_distdir)
-
 dist-xz: distdir
 	tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
 	$(am__post_remove_distdir)
@@ -994,7 +990,8 @@ run-benchmark:
 	$(MAKE) -C tests/benchmark
 	./run.sh tests/benchmark/benchmark at EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/recset.xml 65535 3
 
-tests/xmlts.zip:
+.PHONY: download-xmlts-zip
+download-xmlts-zip:
 	if test "$(XMLTS_ZIP)" = ""; then \
 		wget --output-document=tests/xmlts.zip \
 			https://www.w3.org/XML/Test/xmlts20080827.zip; \
@@ -1002,25 +999,35 @@ tests/xmlts.zip:
 		cp $(XMLTS_ZIP) tests/xmlts.zip; \
 	fi
 
-tests/xmlconf: tests/xmlts.zip
+tests/xmlts.zip:
+	$(MAKE) download-xmlts-zip
+
+.PHONY: extract-xmlts-zip
+extract-xmlts-zip: tests/xmlts.zip
+	[ -f $(builddir)/tests/xmlts.zip ] || $(MAKE) download-xmlts-zip  # vpath workaround
 	cd tests && unzip -q xmlts.zip
 
+tests/xmlconf: tests/xmlts.zip
+	$(MAKE) extract-xmlts-zip
+
 .PHONY: run-xmltest
 run-xmltest: tests/xmlconf
+ at WITH_XMLWF_TRUE@	[ -d $(builddir)/tests/xmlconf ] || $(MAKE) extract-xmlts-zip  # vpath workaround
+ at WITH_XMLWF_TRUE@	$(MAKE) -C lib
 @WITH_XMLWF_TRUE@	$(MAKE) -C xmlwf
- at WITH_XMLWF_TRUE@	tests/xmltest.sh "$(PWD)/run.sh $(PWD)/xmlwf/xmlwf at EXEEXT@" 2>&1 | tee tests/xmltest.log
- at WITH_XMLWF_TRUE@	dos2unix tests/xmltest.log
- at WITH_XMLWF_TRUE@	diff -u tests/xmltest.log.expected tests/xmltest.log
+ at WITH_XMLWF_TRUE@	$(srcdir)/tests/xmltest.sh "$(abs_builddir)/run.sh $(abs_builddir)/xmlwf/xmlwf at EXEEXT@" 2>&1 | tee $(builddir)/tests/xmltest.log
+ at WITH_XMLWF_TRUE@	$(srcdir)/fix-xmltest-log.sh $(builddir)/tests/xmltest.log
+ at WITH_XMLWF_TRUE@	diff -u $(srcdir)/tests/xmltest.log.expected $(builddir)/tests/xmltest.log
 @WITH_XMLWF_FALSE@	@echo 'ERROR: xmlwf is needed for "make run-xmltest".' >&2
 @WITH_XMLWF_FALSE@	@echo 'ERROR: Please re-configure without --without-xmlwf.' >&2
 @WITH_XMLWF_FALSE@	@false
 
 .PHONY: qa
 qa:
-	./qa.sh address
-	./qa.sh memory
-	./qa.sh undefined
-	./qa.sh coverage
+	QA_COMPILER=clang QA_SANITIZER=address   ./qa.sh
+	QA_COMPILER=clang QA_SANITIZER=memory    ./qa.sh
+	QA_COMPILER=clang QA_SANITIZER=undefined ./qa.sh
+	QA_COMPILER=gcc   QA_PROCESSOR=gcov      ./qa.sh
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.

Modified: vendor/expat/dist/README.md
==============================================================================
--- vendor/expat/dist/README.md	Sun Nov 24 23:21:47 2019	(r355070)
+++ vendor/expat/dist/README.md	Sun Nov 24 23:46:29 2019	(r355071)
@@ -1,8 +1,9 @@
 [![Travis CI Build Status](https://travis-ci.org/libexpat/libexpat.svg?branch=master)](https://travis-ci.org/libexpat/libexpat)
 [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/libexpat/libexpat?svg=true)](https://ci.appveyor.com/project/libexpat/libexpat)
+[![Packaging status](https://repology.org/badge/tiny-repos/expat.svg)](https://repology.org/metapackage/expat/versions)
 
 
-# Expat, Release 2.2.6
+# Expat, Release 2.2.9
 
 This is Expat, a C library for parsing XML, started by
 [James Clark](https://en.wikipedia.org/wiki/James_Clark_(programmer)) in 1997.
@@ -12,6 +13,11 @@ are called when the parser discovers the associated st
 document being parsed.  A start tag is an example of the kind of
 structures for which you may register handlers.
 
+Expat supports the following compilers:
+- GNU GCC >=4.5
+- LLVM Clang >=3.5
+- Microsoft Visual Studio >=8.0/2005
+
 Windows users should use the
 [`expat_win32` package](https://sourceforge.net/projects/expat/files/expat_win32/),
 which includes both precompiled libraries and executables, and source code for
@@ -124,3 +130,59 @@ information.
 
 A reference manual is available in the file `doc/reference.html` in this
 distribution.
+
+
+The CMake build system is still *experimental* and will replace the primary
+build system based on GNU Autotools at some point when it is ready.
+For an idea of the available (non-advanced) options for building with CMake:
+
+```console
+# rm -f CMakeCache.txt ; cmake -D_EXPAT_HELP=ON -LH . | grep -B1 ':.*=' | sed 's,^--$,,'
+// Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel ...
+CMAKE_BUILD_TYPE:STRING=
+
+// Install path prefix, prepended onto install directories.
+CMAKE_INSTALL_PREFIX:PATH=/usr/local
+
+// Path to a program.
+DOCBOOK_TO_MAN:FILEPATH=/usr/bin/docbook2x-man
+
+// build man page for xmlwf
+EXPAT_BUILD_DOCS:BOOL=ON
+
+// build the examples for expat library
+EXPAT_BUILD_EXAMPLES:BOOL=ON
+
+// build fuzzers for the expat library
+EXPAT_BUILD_FUZZERS:BOOL=OFF
+
+// build the tests for expat library
+EXPAT_BUILD_TESTS:BOOL=ON
+
+// build the xmlwf tool for expat library
+EXPAT_BUILD_TOOLS:BOOL=ON
+
+// Character type to use (char|ushort|wchar_t) [default=char]
+EXPAT_CHAR_TYPE:STRING=char
+
+// install expat files in cmake install target
+EXPAT_ENABLE_INSTALL:BOOL=ON
+
+// Use /MT flag (static CRT) when compiling in MSVC
+EXPAT_MSVC_STATIC_CRT:BOOL=OFF
+
+// build a shared expat library
+EXPAT_SHARED_LIBS:BOOL=ON
+
+// Treat all compiler warnings as errors
+EXPAT_WARNINGS_AS_ERRORS:BOOL=OFF
+
+// Make use of getrandom function (ON|OFF|AUTO) [default=AUTO]
+EXPAT_WITH_GETRANDOM:STRING=AUTO
+
+// utilize libbsd (for arc4random_buf)
+EXPAT_WITH_LIBBSD:BOOL=OFF
+
+// Make use of syscall SYS_getrandom (ON|OFF|AUTO) [default=AUTO]
+EXPAT_WITH_SYS_GETRANDOM:STRING=AUTO
+```

Modified: vendor/expat/dist/configure.ac
==============================================================================
--- vendor/expat/dist/configure.ac	Sun Nov 24 23:21:47 2019	(r355070)
+++ vendor/expat/dist/configure.ac	Sun Nov 24 23:46:29 2019	(r355071)
@@ -10,8 +10,8 @@ dnl   under the terms of the License (based on the MIT
 dnl   in the file COPYING that comes with this distribution.
 dnl
 
-dnl Ensure that Expat is configured with autoconf 2.58 or newer
-AC_PREREQ(2.58)
+dnl Ensure that Expat is configured with autoconf 2.69 or newer.
+AC_PREREQ(2.69)
 
 dnl Get the version number of Expat, using m4's esyscmd() command to run
 dnl the command at m4-generation time. This allows us to create an m4
@@ -23,16 +23,18 @@ dnl
 dnl NOTE: esyscmd() is a GNU M4 extension. Thus, we wrap it in an appropriate
 dnl test. I believe this test will work, but I don't have a place with non-
 dnl GNU M4 to test it right now.
-define([expat_version], ifdef([__gnu__],
-                              [esyscmd(conftools/get-version.sh lib/expat.h)],
-                              [2.2.x]))
+m4_define([expat_version],
+  m4_ifdef([__gnu__],
+           [esyscmd(conftools/get-version.sh lib/expat.h)],
+           [2.2.x]))
 AC_INIT(expat, expat_version, expat-bugs at libexpat.org)
-undefine([expat_version])
+m4_undefine([expat_version])
 
-AC_CONFIG_SRCDIR(Makefile.in)
-AC_CONFIG_AUX_DIR(conftools)
-AM_INIT_AUTOMAKE
+AC_CONFIG_SRCDIR([Makefile.in])
+AC_CONFIG_AUX_DIR([conftools])
 AC_CONFIG_MACRO_DIR([m4])
+AC_CANONICAL_HOST
+AM_INIT_AUTOMAKE
 
 
 dnl
@@ -42,165 +44,211 @@ dnl If the API has changed, increment LIBCURRENT and s
 dnl
 dnl If the API changes compatibly (i.e. simply adding a new function
 dnl without changing or removing earlier interfaces), then increment LIBAGE.
-dnl 
+dnl
 dnl If the API changes incompatibly set LIBAGE back to 0
 dnl
 
-LIBCURRENT=7   # sync
-LIBREVISION=8  # with
-LIBAGE=6       # CMakeLists.txt!
+LIBCURRENT=7    # sync
+LIBREVISION=11  # with
+LIBAGE=6        # CMakeLists.txt!
 
-CPPFLAGS="${CPPFLAGS} -DHAVE_EXPAT_CONFIG_H"
-AC_CONFIG_HEADER(expat_config.h)
+AX_APPEND_FLAG([-DHAVE_EXPAT_CONFIG_H], [CPPFLAGS])
+AC_CONFIG_HEADER([expat_config.h])
 
-sinclude(conftools/ac_c_bigendian_cross.m4)
+AM_PROG_AR
+AC_PROG_INSTALL
+AC_PROG_LN_S
+AC_PROG_MAKE_SET
 
-AC_LIBTOOL_WIN32_DLL
-AC_PROG_LIBTOOL
+LT_PREREQ([2.4])
+LT_INIT([win32-dll])
 
 AC_SUBST(LIBCURRENT)
 AC_SUBST(LIBREVISION)
 AC_SUBST(LIBAGE)
 
-dnl Checks for programs.
+AC_LANG([C])
 AC_PROG_CC_C99
+AS_IF([test "$GCC" = yes],
+  [AX_APPEND_COMPILE_FLAGS([-Wall -Wextra], [CFLAGS])
+   dnl Be careful about adding the -fexceptions option; some versions of
+   dnl GCC don't support it and it causes extra warnings that are only
+   dnl distracting; avoid.
+   AX_APPEND_COMPILE_FLAGS([-fexceptions], [CFLAGS])
+   AX_APPEND_COMPILE_FLAGS([-fno-strict-aliasing -Wmissing-prototypes -Wstrict-prototypes], [CFLAGS])
+   AX_APPEND_COMPILE_FLAGS([-pedantic -Wduplicated-cond -Wduplicated-branches -Wlogical-op], [CFLAGS])
+   AX_APPEND_COMPILE_FLAGS([-Wrestrict -Wnull-dereference -Wjump-misses-init -Wdouble-promotion], [CFLAGS])
+   AX_APPEND_COMPILE_FLAGS([-Wshadow -Wformat=2 -Wmisleading-indentation], [CFLAGS])])
+
+AC_LANG_PUSH([C++])
 AC_PROG_CXX
-AC_PROG_INSTALL
+AS_IF([test "$GCC" = yes],
+  [AX_APPEND_COMPILE_FLAGS([-Wall -Wextra], [CXXFLAGS])
+   dnl Be careful about adding the -fexceptions option; some versions of
+   dnl GCC don't support it and it causes extra warnings that are only
+   dnl distracting; avoid.
+   AX_APPEND_COMPILE_FLAGS([-fexceptions], [CXXFLAGS])
+   AX_APPEND_COMPILE_FLAGS([-fno-strict-aliasing], [CXXFLAGS])])
+AC_LANG_POP([C++])
 
-if test "$GCC" = yes ; then
-    dnl
-    dnl Be careful about adding the -fexceptions option; some versions of
-    dnl GCC don't support it and it causes extra warnings that are only
-    dnl distracting; avoid.
-    dnl
-    OLDCFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wstrict-prototypes"
-    CFLAGS="$OLDCFLAGS -fexceptions"
-    AC_MSG_CHECKING(whether $CC accepts -fexceptions)
-    AC_TRY_LINK( , ,
-                   AC_MSG_RESULT(yes),
-                   AC_MSG_RESULT(no); CFLAGS="$OLDCFLAGS")
-    if test "x$CXXFLAGS" = x ; then
-    CXXFLAGS=`echo "$CFLAGS" | sed 's/ -Wmissing-prototypes -Wstrict-prototypes//'`
-    fi
+AS_IF([test "$GCC" = yes],
+  [AX_APPEND_LINK_FLAGS([-fno-strict-aliasing],[LDFLAGS])])
 
-    CFLAGS="${CFLAGS} -fno-strict-aliasing"
-    CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
-    LDFLAGS="${LDFLAGS} -fno-strict-aliasing"
-fi
+dnl patching ${archive_cmds} to affect generation of file "libtool" to fix linking with clang (issue #312)
+AS_CASE(["$LD"],[*clang*],
+  [AS_CASE(["${host_os}"],
+     [*linux*],[archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'])])
 
+EXPATCFG_COMPILER_SUPPORTS_VISIBILITY([
+  AX_APPEND_FLAG([-fvisibility=hidden],       [CFLAGS])
+  AX_APPEND_FLAG([-DXML_ENABLE_VISIBILITY=1], [CFLAGS])])
+
 dnl Checks for header files.
 AC_HEADER_STDC
 
 dnl Checks for typedefs, structures, and compiler characteristics.
 
-dnl Note: Avoid using AC_C_BIGENDIAN because it does not
-dnl work in a cross compile.
-AC_C_BIGENDIAN_CROSS
+dnl We define BYTEORDER to 1234 when the platform is little endian; it
+dnl defines it to 4321 when the  platform is big endian.  We also define
+dnl WORDS_BIGENDIAN to 1 when the platform is big endian.
+dnl
+dnl A  long time  ago (early 2000  years) AC_C_BIGENDIAN  was considered
+dnl wrong when cross compiling, now (2018, GNU Autoconf 2.69) we assume
+dnl it is fine.
+AC_C_BIGENDIAN([AC_DEFINE([WORDS_BIGENDIAN], 1)
+                AS_VAR_SET([BYTEORDER], 4321)],
+               [AS_VAR_SET([BYTEORDER], 1234)])
+AC_DEFINE_UNQUOTED([BYTEORDER], $BYTEORDER, [1234 = LILENDIAN, 4321 = BIGENDIAN])
 
 AC_C_CONST
 AC_TYPE_SIZE_T
-AC_CHECK_FUNCS(memmove bcopy)
 
-
-AC_ARG_WITH([xmlwf], [
-AS_HELP_STRING([--without-xmlwf], [do not build xmlwf])], [], [with_xmlwf=yes])
+AC_ARG_WITH([xmlwf],
+  [AS_HELP_STRING([--without-xmlwf], [do not build xmlwf])],
+  [],
+  [with_xmlwf=yes])
 AM_CONDITIONAL([WITH_XMLWF], [test x${with_xmlwf} = xyes])
 
-AM_CONDITIONAL([MINGW], [echo -- "${host}" | ${FGREP} mingw >/dev/null])
+AC_ARG_WITH([examples],
+  [AS_HELP_STRING([--without-examples], [do not build examples @<:@default=included@:>@])],
+  [],
+  [with_examples=yes])
+AM_CONDITIONAL([WITH_EXAMPLES], [test x${with_examples} = xyes])
+
+AC_ARG_WITH([tests],
+  [AS_HELP_STRING([--without-tests], [do not build tests @<:@default=included@:>@])],
+  [],
+  [with_tests=yes])
+AM_CONDITIONAL([WITH_TESTS], [test x${with_tests} = xyes])
+
+
+AS_VAR_SET([EXPATCFG_ON_MINGW],[no])
+AS_CASE("${host_os}",
+  [mingw*],
+  [AS_VAR_SET([EXPATCFG_ON_MINGW],[yes])
+   AC_MSG_NOTICE([detected OS: MinGW])])
+AM_CONDITIONAL([MINGW], [test x${EXPATCFG_ON_MINGW} = xyes])
+
 AM_CONDITIONAL([UNICODE], [echo -- "${CPPFLAGS}${CFLAGS}" | ${FGREP} XML_UNICODE >/dev/null])
 
 
-AC_ARG_WITH([libbsd], [
-AS_HELP_STRING([--with-libbsd], [utilize libbsd (for arc4random_buf)])
-], [], [with_libbsd=no])
-AS_IF([test "x${with_libbsd}" != xno], [
-  AC_CHECK_LIB([bsd], [arc4random_buf], [], [
-    AS_IF([test "x${with_libbsd}" = xyes], [
-      AC_MSG_ERROR([Enforced use of libbsd cannot be satisfied.])
-    ])
-  ])
-])
+AC_ARG_WITH([libbsd],
+  [AS_HELP_STRING([--with-libbsd], [utilize libbsd (for arc4random_buf)])],
+  [],
+  [with_libbsd=no])
+AS_IF([test "x${with_libbsd}" != xno],
+  [AC_CHECK_LIB([bsd],
+     [arc4random_buf],
+     [],
+     [AS_IF([test "x${with_libbsd}" = xyes],
+        [AC_MSG_ERROR([Enforced use of libbsd cannot be satisfied.])])])])
 AC_MSG_CHECKING([for arc4random_buf (BSD or libbsd)])
 AC_LINK_IFELSE([AC_LANG_SOURCE([
-  #include <stdlib.h>  /* for arc4random_buf on BSD, for NULL */
-  #if defined(HAVE_LIBBSD)
-  # include <bsd/stdlib.h>
-  #endif
-  int main() {
-    arc4random_buf(NULL, 0U);
-    return 0;
-  }
-])], [
-    AC_DEFINE([HAVE_ARC4RANDOM_BUF], [1],
-        [Define to 1 if you have the `arc4random_buf' function.])
-    AC_MSG_RESULT([yes])
-], [
-    AC_MSG_RESULT([no])
+    #include <stdlib.h>  /* for arc4random_buf on BSD, for NULL */
+    #if defined(HAVE_LIBBSD)
+    # include <bsd/stdlib.h>
+    #endif
+    int main() {
+      arc4random_buf(NULL, 0U);
+      return 0;
+    }
+  ])],
+  [AC_DEFINE([HAVE_ARC4RANDOM_BUF], [1], [Define to 1 if you have the `arc4random_buf' function.])
+   AC_MSG_RESULT([yes])],
+  [AC_MSG_RESULT([no])
 
-    AC_MSG_CHECKING([for arc4random (BSD, macOS or libbsd)])
-    AC_LINK_IFELSE([AC_LANG_SOURCE([
-      #if defined(HAVE_LIBBSD)
-      # include <bsd/stdlib.h>
-      #else
-      # include <stdlib.h>
-      #endif
-      int main() {
+   AC_MSG_CHECKING([for arc4random (BSD, macOS or libbsd)])
+   AC_LINK_IFELSE([AC_LANG_SOURCE([
+       #if defined(HAVE_LIBBSD)
+       # include <bsd/stdlib.h>
+       #else
+       # include <stdlib.h>
+       #endif
+       int main() {
           arc4random();
           return 0;
-      }
-    ])], [
-        AC_DEFINE([HAVE_ARC4RANDOM], [1],
-            [Define to 1 if you have the `arc4random' function.])
-        AC_MSG_RESULT([yes])
-    ], [
-        AC_MSG_RESULT([no])
-    ])
-])
+       }
+     ])],
+     [AC_DEFINE([HAVE_ARC4RANDOM], [1], [Define to 1 if you have the `arc4random' function.])
+      AC_MSG_RESULT([yes])],
+     [AC_MSG_RESULT([no])])])
 
+AC_ARG_WITH([getrandom],
+  [AS_HELP_STRING([--with-getrandom],
+                  [enforce the use of getrandom function in the system @<:@default=check@:>@])
+AS_HELP_STRING([--without-getrandom],
+               [skip auto detect of getrandom @<:@default=check@:>@])],
+  [],
+  [with_getrandom=check])
 
-AC_MSG_CHECKING([for getrandom (Linux 3.17+, glibc 2.25+)])
-AC_LINK_IFELSE([AC_LANG_SOURCE([
-  #include <stdlib.h>  /* for NULL */
-  #include <sys/random.h>
-  int main() {
-    return getrandom(NULL, 0U, 0U);
-  }
-])], [
-    AC_DEFINE([HAVE_GETRANDOM], [1],
-        [Define to 1 if you have the `getrandom' function.])
-    AC_MSG_RESULT([yes])
-], [
-    AC_MSG_RESULT([no])
+AS_IF([test "x$with_getrandom" != xno],
+  [AC_MSG_CHECKING([for getrandom (Linux 3.17+, glibc 2.25+)])
+   AC_LINK_IFELSE([AC_LANG_SOURCE([
+       #include <stdlib.h>  /* for NULL */
+       #include <sys/random.h>
+       int main() {
+         return getrandom(NULL, 0U, 0U);
+       }
+     ])],
+     [AC_DEFINE([HAVE_GETRANDOM], [1], [Define to 1 if you have the `getrandom' function.])
+      AC_MSG_RESULT([yes])],
+     [AC_MSG_RESULT([no])
+      AS_IF([test "x$with_getrandom" = xyes],
+        [AC_MSG_ERROR([enforced the use of getrandom --with-getrandom, but not detected])])])])
 
-    AC_MSG_CHECKING([for syscall SYS_getrandom (Linux 3.17+)])
-    AC_LINK_IFELSE([AC_LANG_SOURCE([
-      #include <stdlib.h>  /* for NULL */
-      #include <unistd.h>  /* for syscall */
-      #include <sys/syscall.h>  /* for SYS_getrandom */
-      int main() {
-        syscall(SYS_getrandom, NULL, 0, 0);
-        return 0;
-      }
-    ])], [
-        AC_DEFINE([HAVE_SYSCALL_GETRANDOM], [1],
-            [Define to 1 if you have `syscall' and `SYS_getrandom'.])
-        AC_MSG_RESULT([yes])
-    ], [
-        AC_MSG_RESULT([no])
-    ])
-])
+AC_ARG_WITH([sys_getrandom],
+  [AS_HELP_STRING([--with-sys-getrandom],
+                  [enforce the use of syscall SYS_getrandom function in the system @<:@default=check@:>@])
+AS_HELP_STRING([--without-sys-getrandom],
+               [skip auto detect of syscall SYS_getrandom @<:@default=check@:>@])],
+  [],
+  [with_sys_getrandom=check])
 
+AS_IF([test "x$with_sys_getrandom" != xno],
+  [AC_MSG_CHECKING([for syscall SYS_getrandom (Linux 3.17+)])
+   AC_LINK_IFELSE([AC_LANG_SOURCE([
+       #include <stdlib.h>  /* for NULL */
+       #include <unistd.h>  /* for syscall */
+       #include <sys/syscall.h>  /* for SYS_getrandom */
+       int main() {
+         syscall(SYS_getrandom, NULL, 0, 0);
+         return 0;
+     }
+   ])],
+     [AC_DEFINE([HAVE_SYSCALL_GETRANDOM], [1], [Define to 1 if you have `syscall' and `SYS_getrandom'.])
+      AC_MSG_RESULT([yes])],
+     [AC_MSG_RESULT([no])
+      AS_IF([test "x$with_sys_getrandom" = xyes],
+        [AC_MSG_ERROR([enforced the use of syscall SYS_getrandom --with-sys-getrandom, but not detected])])])])
 
 dnl Only needed for xmlwf:
 AC_CHECK_HEADERS(fcntl.h unistd.h)
 AC_TYPE_OFF_T
 AC_FUNC_MMAP
 
-if test "$ac_cv_func_mmap_fixed_mapped" = "yes"; then
-    FILEMAP=unixfilemap
-else
-    FILEMAP=readfilemap
-fi

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***


More information about the svn-src-all mailing list