uncommitted - dump

Ready changes

Summary

Import uploads missing from VCS:

Diff

diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index d9f8076..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,39 +0,0 @@
-*~
-*.[ao]
-*.l[ao]
-
-*.diff
-*.patch
-*.rej
-
-*.log
-*.trs
-
-.deps
-.libs
-Makefile
-Makefile.in
-
-/aclocal.m4
-/autom4te.cache/
-/compile
-/config.cache
-/config.guess
-/config.h
-/config.h.in
-/config.log
-/config.status
-/config.sub
-/configure
-/depcomp
-/install-sh
-/libtool
-/ltmain.sh
-/missing
-/test-driver
-/stamp-h1
-
-/m4/
-
-/dump.lsm
-/dump-*
diff --git a/AUTHORS b/AUTHORS
index 3ea2482..44514e2 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -104,7 +104,7 @@ Dietrich Rothe		d-rothe@users.sourceforge.net
 Bernhard Sadlowski	sadlowsk@Mathematik.Uni-Bielefeld.DE
 Peter Samuel		peters@e-smith.com
 Jan Sanislo		oystr@cs.washington.edu
-J�rg Schilling		schilling@fokus.gmd.de
+Jörg Schilling		schilling@fokus.gmd.de
 Patrik Schindler	poc@pocnet.net
 Gunther Schlegel	schlegel@riege.de
 Chris Siebenmann	cks@utcc.utoronto.ca
diff --git a/COPYING b/COPYING
index a9db587..0060bf8 100644
--- a/COPYING
+++ b/COPYING
@@ -3,7 +3,7 @@
  *	dump and restore backup suit
  *	Remy Card <card@Linux.EU.Org>, 1994-1997
  *	Stelian Pop <stelian@popies.net>, 1999-2000
- *	Stelian Pop <stelian@popies.net> - Alc�ve <www.alcove.com>, 2000-2002
+ *	Stelian Pop <stelian@popies.net> - Alcôve <www.alcove.com>, 2000-2002
  */
 
 /*-
diff --git a/MAINTAINERS b/MAINTAINERS
index 395b1b1..ba186b7 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1,11 +1,11 @@
 The dump and restore backup suit was ported to Linux's Second
-Extended File System by R�my Card <card@Linux.EU.Org>
+Extended File System by Rémy Card <card@Linux.EU.Org>
 
 He was the maintainer of the initial versions of dump (up and
-including 0.4b4, released in january 1997).
+including 0.4b4, released in January 1997).
 
-I decided to continue the developpement and release a new version.
-R�my didn't respond to any mail I sent to him, so I have
+I decided to continue the development and release a new version.
+Rémy didn't respond to any mail I sent to him, so I have
 promoted myself as the new maintainer :)
 
 So, starting with 0.4b5, the new maintainer is me,
diff --git a/Makefile.in b/Makefile.in
index c8c70da..7e15e91 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.2 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2020 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,7 +14,17 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -79,12 +89,6 @@ build_triplet = @build@
 host_triplet = @host@
 @BUILD_RMT_TRUE@am__append_1 = rmt
 subdir = .
-DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \
-	$(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/configure $(am__configure_deps) \
-	$(srcdir)/config.h.in $(srcdir)/dump.lsm.in COPYING TODO \
-	compile config.guess config.sub depcomp install-sh missing \
-	ltmain.sh
 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 \
@@ -92,6 +96,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
+	$(am__configure_deps) $(am__DIST_COMMON)
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
  configure.lineno config.status.lineno
 mkinstalldirs = $(install_sh) -d
@@ -132,9 +138,9 @@ 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
-am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
-	$(LISP)config.h.in
+	cscope distdir distdir-am dist dist-all distcheck
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \
+	config.h.in
 # Read a list of newline-separated strings from the standard input,
 # and print each of them once, without duplicates.  Input order is
 # *not* preserved.
@@ -155,6 +161,10 @@ ETAGS = etags
 CTAGS = ctags
 CSCOPE = cscope
 DIST_SUBDIRS = compat/lib common dump restore rmt
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
+	$(srcdir)/dump.lsm.in AUTHORS COPYING ChangeLog INSTALL NEWS \
+	README TODO compile config.guess config.sub depcomp install-sh \
+	ltmain.sh missing
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
@@ -216,6 +226,7 @@ COM_ERR_LIBS = @COM_ERR_LIBS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
+DATE = @DATE@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DLLTOOL = @DLLTOOL@
@@ -327,6 +338,7 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -385,15 +397,14 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
 	    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)
@@ -537,7 +548,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'`; \
@@ -602,7 +616,7 @@ distdir: $(DISTFILES)
 	  ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
 	|| chmod -R a+r "$(distdir)"
 dist-gzip: distdir
-	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
 	$(am__post_remove_distdir)
 
 dist-bzip2: distdir
@@ -617,18 +631,22 @@ dist-xz: distdir
 	tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
 	$(am__post_remove_distdir)
 
+dist-zstd: distdir
+	tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst
+	$(am__post_remove_distdir)
+
 dist-tarZ: distdir
-	@echo WARNING: "Support for shar distribution archives is" \
-	               "deprecated." >&2
+	@echo WARNING: "Support for distribution archives compressed with" \
+		       "legacy program 'compress' is deprecated." >&2
 	@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
 	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
 	$(am__post_remove_distdir)
 
 dist-shar: distdir
-	@echo WARNING: "Support for distribution archives compressed with" \
-		       "legacy program 'compress' is deprecated." >&2
+	@echo WARNING: "Support for shar distribution archives is" \
+	               "deprecated." >&2
 	@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
-	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+	shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
 	$(am__post_remove_distdir)
 
 dist-zip: distdir
@@ -646,7 +664,7 @@ dist dist-all:
 distcheck: dist
 	case '$(DIST_ARCHIVES)' in \
 	*.tar.gz*) \
-	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+	  eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
 	*.tar.bz2*) \
 	  bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
 	*.tar.lz*) \
@@ -656,23 +674,25 @@ distcheck: dist
 	*.tar.Z*) \
 	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
 	*.shar.gz*) \
-	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+	  eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
 	*.zip*) \
 	  unzip $(distdir).zip ;;\
+	*.tar.zst*) \
+	  zstd -dc $(distdir).tar.zst | $(am__untar) ;;\
 	esac
 	chmod -R a-w $(distdir)
 	chmod u+w $(distdir)
-	mkdir $(distdir)/_build $(distdir)/_inst
+	mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
 	chmod a-w $(distdir)
 	test -d $(distdir)/_build || exit 0; \
 	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
 	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
 	  && am__cwd=`pwd` \
-	  && $(am__cd) $(distdir)/_build \
-	  && ../configure \
+	  && $(am__cd) $(distdir)/_build/sub \
+	  && ../../configure \
 	    $(AM_DISTCHECK_CONFIGURE_FLAGS) \
 	    $(DISTCHECK_CONFIGURE_FLAGS) \
-	    --srcdir=.. --prefix="$$dc_install_base" \
+	    --srcdir=../.. --prefix="$$dc_install_base" \
 	  && $(MAKE) $(AM_MAKEFLAGS) \
 	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
 	  && $(MAKE) $(AM_MAKEFLAGS) check \
@@ -836,18 +856,20 @@ uninstall-am:
 	am--refresh check check-am clean clean-cscope clean-generic \
 	clean-libtool cscope cscopelist-am ctags ctags-am dist \
 	dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
-	dist-xz dist-zip distcheck distclean distclean-generic \
-	distclean-hdr distclean-libtool distclean-tags distcleancheck \
-	distdir distuninstallcheck dvi dvi-am html html-am info \
-	info-am install install-am install-data install-data-am \
-	install-dvi install-dvi-am install-exec install-exec-am \
-	install-html install-html-am install-info install-info-am \
-	install-man install-pdf install-pdf-am install-ps \
-	install-ps-am install-strip installcheck installcheck-am \
-	installdirs installdirs-am maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-generic \
-	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
-	uninstall-am
+	dist-xz dist-zip dist-zstd distcheck distclean \
+	distclean-generic distclean-hdr distclean-libtool \
+	distclean-tags distcleancheck distdir distuninstallcheck dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-man install-pdf \
+	install-pdf-am install-ps install-ps-am install-strip \
+	installcheck installcheck-am installdirs installdirs-am \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags tags-am uninstall uninstall-am
+
+.PRECIOUS: Makefile
 
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/NEWS b/NEWS
index 97833ed..3202d84 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,24 @@
+Changes between versions 0.4b46 and 0.4b47 (released Jan 01, 2021)
+===================================================================
+
+1.	Fix missing lzo return (Alexey Svistunov).
+
+2.	Fix building with OpenSSL 1.1 (Daniel Molkentin).
+
+3.	Fix bashisms in examples (Oleksandr Chumachenko).
+
+4.	Use xattrs funcs from the C library (Vaclav Dolezal).
+
+5.	Fix date mangling in man pages (Mike Frysinger).
+
+6.	Force -fcommon when building (Mike Frysinger).
+
+7.	Add error checking to SSL init transformation (Mike Frysinger).
+
+8.	Fix restore -C calls with ftruncate (Alexander Zangerl).
+
+9.	Restore symlink timestamps (Alexander Zangerl).
+
 Changes between versions 0.4b45 and 0.4b46 (released Sep 05, 2016)
 ===================================================================
 
@@ -36,7 +57,7 @@ Changes between versions 0.4b43 and 0.4b44 (released June 10, 2011)
 ===================================================================
 
 1.	Recognize ext4 partitions in dump -w commands (Sourceforge
-	bug #3125587, RedHat bug #658890). Thanks to Jan G�rig
+	bug #3125587, RedHat bug #658890). Thanks to Jan Görig
 	<jgorig@users.sourceforge.net> for reporting the bug and
 	submitting the patch.
 
@@ -91,7 +112,7 @@ Changes between versions 0.4b42 and 0.4b43 (released June 11, 2010)
 	Thanks to Igor Zhbanov <izh1979@gmail.com> for the bug report.
 
 5.	Don't attempt to set extended attributes on files that were not
-	extracted in 'restore -N' mode. Thanks to Jan G�rig
+	extracted in 'restore -N' mode. Thanks to Jan Görig
 	<jgorig@users.sourceforge.net> for the patch.
 
 6.	Make the dump man page explicit about ext4 support.
@@ -104,8 +125,8 @@ Changes between versions 0.4b42 and 0.4b43 (released June 11, 2010)
 
 8.	Fix some issues when restoring a dump which was generated using
 	exclusion patterns (either via -e or via the nodump attribute)
-	(see the Debian bug #574667 for details. Thanks to Fr�d�ric
-	Bri�re <fbriere@fbriere.net> for the bug report and the associated
+	(see the Debian bug #574667 for details. Thanks to Frédéric
+	Brière <fbriere@fbriere.net> for the bug report and the associated
 	patch.
 
 9.	Fix progress/estimated blocks display in dump when doing really
@@ -142,8 +163,7 @@ Changes between versions 0.4b41 and 0.4b42 (released June 18, 2009)
 3.	Enable restore to handle restoring onto a different SELinux
 	policy from the dump. Thanks to Tony Nelson
 	<tony_nelson@users.sourceforge.net> for the patch.
-	(see http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=189845
-	for details)
+	(see http://bugzilla.redhat.com/189845 for details)
 
 4.	Fix EA set failures when restoring immutable files. Thanks
 	to Andrew Kroeger for the patch.
@@ -679,7 +699,7 @@ Changes between versions 0.4b28 and 0.4b29 (released June 8, 2002)
 	non Linux clients were misinterpreted. The description of the problem
 	(incompatible numbering in Linux mtio opcodes) is documented at
 	ftp://ftp.fokus.gmd.de/pub/unix/star/README.mtio . Thanks to
-	J�rg Schilling <schilling@fokus.gmd.de> for reporting this bug and
+	Jörg Schilling <schilling@fokus.gmd.de> for reporting this bug and
 	providing an excellent, cross-platform replacement for rmt in his
 	star package.
 
@@ -692,7 +712,7 @@ Changes between versions 0.4b28 and 0.4b29 (released June 8, 2002)
 	that have the nodump flag set (or being excluded with -e/-E) were
 	sometimes incorrectly dumped (instead of being excluded). The original
 	fix is from David C Lawrence <tale@dd.org> in the FreeBSD version
-	of dump: http://www.FreeBSD.org/cgi/query-pr.cgi?pr=32414
+	of dump: https://bugs.freebsd.org/32414
 	Thanks to Ted Grzesik <tedgyz@roostme.com> for reporting the bug and
 	help testing the patch.
 
diff --git a/REPORTING-BUGS b/REPORTING-BUGS
index 391b0d5..dca9a50 100644
--- a/REPORTING-BUGS
+++ b/REPORTING-BUGS
@@ -51,7 +51,7 @@ never be solved!
 
 Ok, here are the pointers you may want to access:
 
-Dump latest release: http://sourceforge.net/project/filelist.php?group_id=1306
-Dump mailing lists: http://sourceforge.net/mail/?group_id=1306
-Dump bug system: http://sourceforge.net/bugs/?group_id=1306
+Dump latest release: https://sourceforge.net/projects/dump/files/
+Dump mailing lists: https://sourceforge.net/p/dump/mailman/
+Dump bug system: https://sourceforge.net/p/dump/bugs/
 My email: stelian@popies.net
diff --git a/aclocal.m4 b/aclocal.m4
index 23ea2f5..3798903 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.14.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.16.2 -*- Autoconf -*-
 
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2020 Free Software Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -20,32 +20,63 @@ You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
 
-# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
-# serial 1 (pkg-config-0.24)
-# 
-# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
+# pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
+# serial 12 (pkg-config-0.29.2)
 
-# PKG_PROG_PKG_CONFIG([MIN-VERSION])
-# ----------------------------------
+dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
+dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
+dnl
+dnl This program is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful, but
+dnl WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+dnl General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+dnl 02111-1307, USA.
+dnl
+dnl As a special exception to the GNU General Public License, if you
+dnl distribute this file as part of a program that contains a
+dnl configuration script generated by Autoconf, you may include it under
+dnl the same distribution terms that you use for the rest of that
+dnl program.
+
+dnl PKG_PREREQ(MIN-VERSION)
+dnl -----------------------
+dnl Since: 0.29
+dnl
+dnl Verify that the version of the pkg-config macros are at least
+dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
+dnl installed version of pkg-config, this checks the developer's version
+dnl of pkg.m4 when generating configure.
+dnl
+dnl To ensure that this macro is defined, also add:
+dnl m4_ifndef([PKG_PREREQ],
+dnl     [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
+dnl
+dnl See the "Since" comment for each macro you use to see what version
+dnl of the macros you require.
+m4_defun([PKG_PREREQ],
+[m4_define([PKG_MACROS_VERSION], [0.29.2])
+m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
+    [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
+])dnl PKG_PREREQ
+
+dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
+dnl ----------------------------------
+dnl Since: 0.16
+dnl
+dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
+dnl first found in the path. Checks that the version of pkg-config found
+dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
+dnl used since that's the first version where most current features of
+dnl pkg-config existed.
 AC_DEFUN([PKG_PROG_PKG_CONFIG],
 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
@@ -67,18 +98,19 @@ if test -n "$PKG_CONFIG"; then
 		PKG_CONFIG=""
 	fi
 fi[]dnl
-])# PKG_PROG_PKG_CONFIG
+])dnl PKG_PROG_PKG_CONFIG
 
-# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-#
-# Check to see whether a particular set of modules exists.  Similar
-# to PKG_CHECK_MODULES(), but does not set variables or print errors.
-#
-# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-# only at the first occurence in configure.ac, so if the first place
-# it's called might be skipped (such as if it is within an "if", you
-# have to call PKG_CHECK_EXISTS manually
-# --------------------------------------------------------------
+dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl -------------------------------------------------------------------
+dnl Since: 0.18
+dnl
+dnl Check to see whether a particular set of modules exists. Similar to
+dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
+dnl
+dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+dnl only at the first occurence in configure.ac, so if the first place
+dnl it's called might be skipped (such as if it is within an "if", you
+dnl have to call PKG_CHECK_EXISTS manually
 AC_DEFUN([PKG_CHECK_EXISTS],
 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 if test -n "$PKG_CONFIG" && \
@@ -88,8 +120,10 @@ m4_ifvaln([$3], [else
   $3])dnl
 fi])
 
-# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
-# ---------------------------------------------
+dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+dnl ---------------------------------------------
+dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
+dnl pkg_failed based on the result.
 m4_define([_PKG_CONFIG],
 [if test -n "$$1"; then
     pkg_cv_[]$1="$$1"
@@ -101,10 +135,11 @@ m4_define([_PKG_CONFIG],
  else
     pkg_failed=untried
 fi[]dnl
-])# _PKG_CONFIG
+])dnl _PKG_CONFIG
 
-# _PKG_SHORT_ERRORS_SUPPORTED
-# -----------------------------
+dnl _PKG_SHORT_ERRORS_SUPPORTED
+dnl ---------------------------
+dnl Internal check to see if pkg-config supports short errors.
 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@@ -112,26 +147,24 @@ if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
 else
         _pkg_short_errors_supported=no
 fi[]dnl
-])# _PKG_SHORT_ERRORS_SUPPORTED
+])dnl _PKG_SHORT_ERRORS_SUPPORTED
 
 
-# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
-# [ACTION-IF-NOT-FOUND])
-#
-#
-# Note that if there is a possibility the first call to
-# PKG_CHECK_MODULES might not happen, you should be sure to include an
-# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
-#
-#
-# --------------------------------------------------------------
+dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+dnl   [ACTION-IF-NOT-FOUND])
+dnl --------------------------------------------------------------
+dnl Since: 0.4.0
+dnl
+dnl Note that if there is a possibility the first call to
+dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
+dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
 AC_DEFUN([PKG_CHECK_MODULES],
 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
 
 pkg_failed=no
-AC_MSG_CHECKING([for $1])
+AC_MSG_CHECKING([for $2])
 
 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
@@ -141,11 +174,11 @@ and $1[]_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.])
 
 if test $pkg_failed = yes; then
-   	AC_MSG_RESULT([no])
+        AC_MSG_RESULT([no])
         _PKG_SHORT_ERRORS_SUPPORTED
         if test $_pkg_short_errors_supported = yes; then
 	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
-        else 
+        else
 	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
@@ -162,7 +195,7 @@ installed software in a non-standard prefix.
 _PKG_TEXT])[]dnl
         ])
 elif test $pkg_failed = untried; then
-     	AC_MSG_RESULT([no])
+        AC_MSG_RESULT([no])
 	m4_default([$4], [AC_MSG_FAILURE(
 [The pkg-config script could not be found or is too old.  Make sure it
 is in your PATH or set the PKG_CONFIG environment variable to the full
@@ -178,16 +211,40 @@ else
         AC_MSG_RESULT([yes])
 	$3
 fi[]dnl
-])# PKG_CHECK_MODULES
+])dnl PKG_CHECK_MODULES
 
 
-# PKG_INSTALLDIR(DIRECTORY)
-# -------------------------
-# Substitutes the variable pkgconfigdir as the location where a module
-# should install pkg-config .pc files. By default the directory is
-# $libdir/pkgconfig, but the default can be changed by passing
-# DIRECTORY. The user can override through the --with-pkgconfigdir
-# parameter.
+dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+dnl   [ACTION-IF-NOT-FOUND])
+dnl ---------------------------------------------------------------------
+dnl Since: 0.29
+dnl
+dnl Checks for existence of MODULES and gathers its build flags with
+dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
+dnl and VARIABLE-PREFIX_LIBS from --libs.
+dnl
+dnl Note that if there is a possibility the first call to
+dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
+dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
+dnl configure.ac.
+AC_DEFUN([PKG_CHECK_MODULES_STATIC],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+_save_PKG_CONFIG=$PKG_CONFIG
+PKG_CONFIG="$PKG_CONFIG --static"
+PKG_CHECK_MODULES($@)
+PKG_CONFIG=$_save_PKG_CONFIG[]dnl
+])dnl PKG_CHECK_MODULES_STATIC
+
+
+dnl PKG_INSTALLDIR([DIRECTORY])
+dnl -------------------------
+dnl Since: 0.27
+dnl
+dnl Substitutes the variable pkgconfigdir as the location where a module
+dnl should install pkg-config .pc files. By default the directory is
+dnl $libdir/pkgconfig, but the default can be changed by passing
+dnl DIRECTORY. The user can override through the --with-pkgconfigdir
+dnl parameter.
 AC_DEFUN([PKG_INSTALLDIR],
 [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
 m4_pushdef([pkg_description],
@@ -198,16 +255,18 @@ AC_ARG_WITH([pkgconfigdir],
 AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
 m4_popdef([pkg_default])
 m4_popdef([pkg_description])
-]) dnl PKG_INSTALLDIR
+])dnl PKG_INSTALLDIR
 
 
-# PKG_NOARCH_INSTALLDIR(DIRECTORY)
-# -------------------------
-# Substitutes the variable noarch_pkgconfigdir as the location where a
-# module should install arch-independent pkg-config .pc files. By
-# default the directory is $datadir/pkgconfig, but the default can be
-# changed by passing DIRECTORY. The user can override through the
-# --with-noarch-pkgconfigdir parameter.
+dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
+dnl --------------------------------
+dnl Since: 0.27
+dnl
+dnl Substitutes the variable noarch_pkgconfigdir as the location where a
+dnl module should install arch-independent pkg-config .pc files. By
+dnl default the directory is $datadir/pkgconfig, but the default can be
+dnl changed by passing DIRECTORY. The user can override through the
+dnl --with-noarch-pkgconfigdir parameter.
 AC_DEFUN([PKG_NOARCH_INSTALLDIR],
 [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
 m4_pushdef([pkg_description],
@@ -218,13 +277,15 @@ AC_ARG_WITH([noarch-pkgconfigdir],
 AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
 m4_popdef([pkg_default])
 m4_popdef([pkg_description])
-]) dnl PKG_NOARCH_INSTALLDIR
+])dnl PKG_NOARCH_INSTALLDIR
 
 
-# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
-# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-# -------------------------------------------
-# Retrieves the value of the pkg-config variable for the given module.
+dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
+dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl -------------------------------------------
+dnl Since: 0.28
+dnl
+dnl Retrieves the value of the pkg-config variable for the given module.
 AC_DEFUN([PKG_CHECK_VAR],
 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
@@ -233,9 +294,9 @@ _PKG_CONFIG([$1], [variable="][$3]["], [$2])
 AS_VAR_COPY([$1], [pkg_cv_][$1])
 
 AS_VAR_IF([$1], [""], [$5], [$4])dnl
-])# PKG_CHECK_VAR
+])dnl PKG_CHECK_VAR
 
-# Copyright (C) 2002-2013 Free Software Foundation, Inc.
+# Copyright (C) 2002-2020 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -247,10 +308,10 @@ AS_VAR_IF([$1], [""], [$5], [$4])dnl
 # generated from the m4 files accompanying Automake X.Y.
 # (This private macro should not be called outside this file.)
 AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.14'
+[am__api_version='1.16'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.14.1], [],
+m4_if([$1], [1.16.2], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -266,14 +327,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.14.1])dnl
+[AM_AUTOMAKE_VERSION([1.16.2])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2020 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -318,15 +379,14 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 # configured tree to be moved without reconfiguration.
 
 AC_DEFUN([AM_AUX_DIR_EXPAND],
-[dnl Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])dnl
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
+[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
 ])
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997-2013 Free Software Foundation, Inc.
+# Copyright (C) 1997-2020 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -357,7 +417,7 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2020 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -548,13 +608,12 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2020 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-
 # _AM_OUTPUT_DEPENDENCY_COMMANDS
 # ------------------------------
 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
@@ -562,49 +621,43 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
   # Older Autoconf quotes --file arguments for eval, but not when files
   # are listed without --file.  Let's play safe and only enable the eval
   # if we detect the quoting.
-  case $CONFIG_FILES in
-  *\'*) eval set x "$CONFIG_FILES" ;;
-  *)   set x $CONFIG_FILES ;;
-  esac
+  # TODO: see whether this extra hack can be removed once we start
+  # requiring Autoconf 2.70 or later.
+  AS_CASE([$CONFIG_FILES],
+          [*\'*], [eval set x "$CONFIG_FILES"],
+          [*], [set x $CONFIG_FILES])
   shift
-  for mf
+  # Used to flag and report bootstrapping failures.
+  am_rc=0
+  for am_mf
   do
     # Strip MF so we end up with the name of the file.
-    mf=`echo "$mf" | sed -e 's/:.*$//'`
-    # Check whether this is an Automake generated Makefile or not.
-    # We used to match only the files named 'Makefile.in', but
-    # some people rename them; so instead we look at the file content.
-    # Grep'ing the first line is not enough: some people post-process
-    # each Makefile.in and add a new line on top of each file to say so.
-    # Grep'ing the whole file is not good either: AIX grep has a line
+    am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile which includes
+    # dependency-tracking related rules and includes.
+    # Grep'ing the whole file directly is not great: AIX grep has a line
     # limit of 2048, but all sed's we know have understand at least 4000.
-    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
-      dirpart=`AS_DIRNAME("$mf")`
-    else
-      continue
-    fi
-    # Extract the definition of DEPDIR, am__include, and am__quote
-    # from the Makefile without running 'make'.
-    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-    test -z "$DEPDIR" && continue
-    am__include=`sed -n 's/^am__include = //p' < "$mf"`
-    test -z "$am__include" && continue
-    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-    # Find all dependency output files, they are included files with
-    # $(DEPDIR) in their names.  We invoke sed twice because it is the
-    # simplest approach to changing $(DEPDIR) to its actual value in the
-    # expansion.
-    for file in `sed -n "
-      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
-      # Make sure the directory exists.
-      test -f "$dirpart/$file" && continue
-      fdir=`AS_DIRNAME(["$file"])`
-      AS_MKDIR_P([$dirpart/$fdir])
-      # echo "creating $dirpart/$file"
-      echo '# dummy' > "$dirpart/$file"
-    done
+    sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
+      || continue
+    am_dirpart=`AS_DIRNAME(["$am_mf"])`
+    am_filepart=`AS_BASENAME(["$am_mf"])`
+    AM_RUN_LOG([cd "$am_dirpart" \
+      && sed -e '/# am--include-marker/d' "$am_filepart" \
+        | $MAKE -f - am--depfiles]) || am_rc=$?
   done
+  if test $am_rc -ne 0; then
+    AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
+    for automatic dependency tracking.  If GNU make was not used, consider
+    re-running the configure script with MAKE="gmake" (or whatever is
+    necessary).  You can also try re-running configure with the
+    '--disable-dependency-tracking' option to at least be able to build
+    the package (albeit without support for automatic dependency tracking).])
+  fi
+  AS_UNSET([am_dirpart])
+  AS_UNSET([am_filepart])
+  AS_UNSET([am_mf])
+  AS_UNSET([am_rc])
+  rm -f conftest-deps.mk
 }
 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
@@ -613,18 +666,17 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 # -----------------------------
 # This macro should only be invoked once -- use via AC_REQUIRE.
 #
-# This code is only required when automatic dependency tracking
-# is enabled.  FIXME.  This creates each '.P' file that we will
-# need in order to bootstrap the dependency handling code.
+# This code is only required when automatic dependency tracking is enabled.
+# This creates each '.Po' and '.Plo' makefile fragment that we'll need in
+# order to bootstrap the dependency handling code.
 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 [AC_CONFIG_COMMANDS([depfiles],
      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
-     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
-])
+     [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
 
 # Do all the work for Automake.                             -*- Autoconf -*-
 
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2020 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -711,11 +763,11 @@ AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
 # For better backward compatibility.  To be removed once Automake 1.9.x
 # dies out for good.  For more background, see:
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
+# We need awk for the "check" target (and possibly the TAP driver).  The
+# system "awk" is bad on some platforms.
 AC_REQUIRE([AC_PROG_AWK])dnl
 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
@@ -779,7 +831,7 @@ END
 Aborting the configuration process, to ensure you take notice of the issue.
 
 You can download and install GNU coreutils to get an 'rm' implementation
-that behaves properly: <http://www.gnu.org/software/coreutils/>.
+that behaves properly: <https://www.gnu.org/software/coreutils/>.
 
 If you want to complete the configuration process using your problematic
 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
@@ -788,7 +840,11 @@ to "yes", and re-run configure.
 END
     AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
   fi
-fi])
+fi
+dnl The trailing newline in this macro's definition is deliberate, for
+dnl backward compatibility and to allow trailing 'dnl'-style comments
+dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
+])
 
 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
@@ -817,7 +873,7 @@ for _am_header in $config_headers :; do
 done
 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2020 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -828,7 +884,7 @@ echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_co
 # Define $install_sh.
 AC_DEFUN([AM_PROG_INSTALL_SH],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-if test x"${install_sh}" != xset; then
+if test x"${install_sh+set}" != xset; then
   case $am_aux_dir in
   *\ * | *\	*)
     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
@@ -838,7 +894,7 @@ if test x"${install_sh}" != xset; then
 fi
 AC_SUBST([install_sh])])
 
-# Copyright (C) 2003-2013 Free Software Foundation, Inc.
+# Copyright (C) 2003-2020 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -859,7 +915,7 @@ AC_SUBST([am__leading_dot])])
 
 # Check to see how 'make' treats includes.	            -*- Autoconf -*-
 
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2020 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -867,49 +923,42 @@ AC_SUBST([am__leading_dot])])
 
 # AM_MAKE_INCLUDE()
 # -----------------
-# Check to see how make treats includes.
+# Check whether make has an 'include' directive that can support all
+# the idioms we need for our automatic dependency tracking code.
 AC_DEFUN([AM_MAKE_INCLUDE],
-[am_make=${MAKE-make}
-cat > confinc << 'END'
+[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
+cat > confinc.mk << 'END'
 am__doit:
-	@echo this is the am__doit target
+	@echo this is the am__doit target >confinc.out
 .PHONY: am__doit
 END
-# If we don't find an include directive, just comment out the code.
-AC_MSG_CHECKING([for style of include used by $am_make])
 am__include="#"
 am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# Ignore all kinds of additional output from 'make'.
-case `$am_make -s -f confmf 2> /dev/null` in #(
-*the\ am__doit\ target*)
-  am__include=include
-  am__quote=
-  _am_result=GNU
-  ;;
-esac
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   case `$am_make -s -f confmf 2> /dev/null` in #(
-   *the\ am__doit\ target*)
-     am__include=.include
-     am__quote="\""
-     _am_result=BSD
-     ;;
-   esac
-fi
-AC_SUBST([am__include])
-AC_SUBST([am__quote])
-AC_MSG_RESULT([$_am_result])
-rm -f confinc confmf
-])
+# BSD make does it like this.
+echo '.include "confinc.mk" # ignored' > confmf.BSD
+# Other make implementations (GNU, Solaris 10, AIX) do it like this.
+echo 'include confinc.mk # ignored' > confmf.GNU
+_am_result=no
+for s in GNU BSD; do
+  AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
+  AS_CASE([$?:`cat confinc.out 2>/dev/null`],
+      ['0:this is the am__doit target'],
+      [AS_CASE([$s],
+          [BSD], [am__include='.include' am__quote='"'],
+          [am__include='include' am__quote=''])])
+  if test "$am__include" != "#"; then
+    _am_result="yes ($s style)"
+    break
+  fi
+done
+rm -f confinc.* confmf.*
+AC_MSG_RESULT([${_am_result}])
+AC_SUBST([am__include])])
+AC_SUBST([am__quote])])
 
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997-2013 Free Software Foundation, Inc.
+# Copyright (C) 1997-2020 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -948,7 +997,7 @@ fi
 
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2020 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -977,7 +1026,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
 AC_DEFUN([_AM_IF_OPTION],
 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2020 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1024,7 +1073,7 @@ AC_LANG_POP([C])])
 # For backward compatibility.
 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
 
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2020 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1043,7 +1092,7 @@ AC_DEFUN([AM_RUN_LOG],
 
 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2020 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1124,7 +1173,7 @@ AC_CONFIG_COMMANDS_PRE(
 rm -f conftest.file
 ])
 
-# Copyright (C) 2009-2013 Free Software Foundation, Inc.
+# Copyright (C) 2009-2020 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1184,7 +1233,7 @@ AC_SUBST([AM_BACKSLASH])dnl
 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
 ])
 
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2020 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1212,7 +1261,7 @@ fi
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006-2013 Free Software Foundation, Inc.
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1231,7 +1280,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
 # Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004-2013 Free Software Foundation, Inc.
+# Copyright (C) 2004-2020 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
diff --git a/autogen.sh b/autogen.sh
deleted file mode 100755
index 0032ca1..0000000
--- a/autogen.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh -x
-mkdir -p m4
-autoreconf -f -i
-git checkout -f INSTALL
diff --git a/common/.gitignore b/common/.gitignore
deleted file mode 100644
index ceabe6e..0000000
--- a/common/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/indexer_test
-/transform_test
diff --git a/common/Makefile.in b/common/Makefile.in
index a77d830..b004382 100644
--- a/common/Makefile.in
+++ b/common/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.2 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2020 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -80,8 +90,6 @@ build_triplet = @build@
 host_triplet = @host@
 check_PROGRAMS = indexer_test$(EXEEXT)
 subdir = common
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp
 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 \
@@ -89,6 +97,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -125,7 +134,15 @@ am__v_at_0 = @
 am__v_at_1 = 
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ./$(DEPDIR)/dumprmt.Plo \
+	./$(DEPDIR)/indexer_test.Po ./$(DEPDIR)/legacy_indexer.Plo \
+	./$(DEPDIR)/sqlite_indexer.Plo \
+	./$(DEPDIR)/transformation_bzlib.Plo \
+	./$(DEPDIR)/transformation_lzo.Plo \
+	./$(DEPDIR)/transformation_null.Plo \
+	./$(DEPDIR)/transformation_ssl.Plo \
+	./$(DEPDIR)/transformation_zlib.Plo
 am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -171,6 +188,7 @@ am__define_uniq_tagged_files = \
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -191,6 +209,7 @@ COM_ERR_LIBS = @COM_ERR_LIBS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
+DATE = @DATE@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DLLTOOL = @DLLTOOL@
@@ -302,6 +321,7 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -351,14 +371,13 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu common/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu common/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
 	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
 	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
 	esac;
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -370,6 +389,15 @@ $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(am__aclocal_m4_deps):
 
+clean-checkPROGRAMS:
+	@list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+
 clean-noinstLTLIBRARIES:
 	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
 	@list='$(noinst_LTLIBRARIES)'; \
@@ -384,15 +412,6 @@ clean-noinstLTLIBRARIES:
 libcommon.la: $(libcommon_la_OBJECTS) $(libcommon_la_DEPENDENCIES) $(EXTRA_libcommon_la_DEPENDENCIES) 
 	$(AM_V_CCLD)$(LINK)  $(libcommon_la_OBJECTS) $(libcommon_la_LIBADD) $(LIBS)
 
-clean-checkPROGRAMS:
-	@list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
-	echo " rm -f" $$list; \
-	rm -f $$list || exit $$?; \
-	test -n "$(EXEEXT)" || exit 0; \
-	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
-	echo " rm -f" $$list; \
-	rm -f $$list
-
 indexer_test$(EXEEXT): $(indexer_test_OBJECTS) $(indexer_test_DEPENDENCIES) $(EXTRA_indexer_test_DEPENDENCIES) 
 	@rm -f indexer_test$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(indexer_test_OBJECTS) $(indexer_test_LDADD) $(LIBS)
@@ -403,15 +422,21 @@ mostlyclean-compile:
 distclean-compile:
 	-rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dumprmt.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indexer_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/legacy_indexer.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sqlite_indexer.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transformation_bzlib.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transformation_lzo.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transformation_null.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transformation_ssl.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transformation_zlib.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dumprmt.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indexer_test.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/legacy_indexer.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sqlite_indexer.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transformation_bzlib.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transformation_lzo.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transformation_null.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transformation_ssl.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transformation_zlib.Plo@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+	@$(MKDIR_P) $(@D)
+	@echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
 
 .c.o:
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -492,7 +517,10 @@ cscopelist-am: $(am__tagged_files)
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
-distdir: $(DISTFILES)
+distdir: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	list='$(DISTFILES)'; \
@@ -563,7 +591,15 @@ clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
 	clean-noinstLTLIBRARIES mostlyclean-am
 
 distclean: distclean-am
-	-rm -rf ./$(DEPDIR)
+		-rm -f ./$(DEPDIR)/dumprmt.Plo
+	-rm -f ./$(DEPDIR)/indexer_test.Po
+	-rm -f ./$(DEPDIR)/legacy_indexer.Plo
+	-rm -f ./$(DEPDIR)/sqlite_indexer.Plo
+	-rm -f ./$(DEPDIR)/transformation_bzlib.Plo
+	-rm -f ./$(DEPDIR)/transformation_lzo.Plo
+	-rm -f ./$(DEPDIR)/transformation_null.Plo
+	-rm -f ./$(DEPDIR)/transformation_ssl.Plo
+	-rm -f ./$(DEPDIR)/transformation_zlib.Plo
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
 	distclean-tags
@@ -609,7 +645,15 @@ install-ps-am:
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
-	-rm -rf ./$(DEPDIR)
+		-rm -f ./$(DEPDIR)/dumprmt.Plo
+	-rm -f ./$(DEPDIR)/indexer_test.Po
+	-rm -f ./$(DEPDIR)/legacy_indexer.Plo
+	-rm -f ./$(DEPDIR)/sqlite_indexer.Plo
+	-rm -f ./$(DEPDIR)/transformation_bzlib.Plo
+	-rm -f ./$(DEPDIR)/transformation_lzo.Plo
+	-rm -f ./$(DEPDIR)/transformation_null.Plo
+	-rm -f ./$(DEPDIR)/transformation_ssl.Plo
+	-rm -f ./$(DEPDIR)/transformation_zlib.Plo
 	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
@@ -630,7 +674,7 @@ uninstall-am:
 
 .MAKE: check-am install-am install-strip
 
-.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
 	clean-checkPROGRAMS clean-generic clean-libtool \
 	clean-noinstLTLIBRARIES cscopelist-am ctags ctags-am distclean \
 	distclean-compile distclean-generic distclean-libtool \
@@ -644,6 +688,8 @@ uninstall-am:
 	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # Disabled due to missing transform_test.c -- it was accidentally not added.
 # We can re-add when someone re-implements the test code :(.
diff --git a/common/dumprmt.c b/common/dumprmt.c
index 53d8e50..f0c37fb 100644
--- a/common/dumprmt.c
+++ b/common/dumprmt.c
@@ -3,7 +3,7 @@
  *	dump and restore backup suit
  *	Remy Card <card@Linux.EU.Org>, 1994-1997
  *	Stelian Pop <stelian@popies.net>, 1999-2000
- *	Stelian Pop <stelian@popies.net> - Alc�ve <www.alcove.com>, 2000-2002
+ *	Stelian Pop <stelian@popies.net> - Alcôve <www.alcove.com>, 2000-2002
  */
 
 /*-
diff --git a/common/transformation_ssl.c b/common/transformation_ssl.c
index 0b37e82..a2c8e9c 100644
--- a/common/transformation_ssl.c
+++ b/common/transformation_ssl.c
@@ -1,3 +1,4 @@
+#include <err.h>
 #include <stdio.h>
 #include <config.h>
 #include <sys/mman.h>
@@ -215,7 +216,10 @@ generateIV(Transformation *xform, unsigned char *salt, unsigned int *saltlen,
 	/* to be exposed to any attacker anyway. */
 	*saltlen = 16;
 	if (xform->enc == 1) {
-		RAND_pseudo_bytes(salt, *saltlen);
+		if (!RAND_bytes(salt, *saltlen) != 1) {
+			/* PRNG not sufficiently seeded */
+			return -1;
+		}
 	}
 	memcpy(ivbuffer, salt, 16);
 
@@ -274,7 +278,7 @@ ssl_compress(Transformation *xform, struct tapebuf *tpbin,
 	digestlen = sizeof(digest);
 
 	/* generate salt, put it in header */
-	generateIV(xform, salt, &saltlen, iv, &ivlen);
+	generateIV(xform, salt, &saltlen, iv, &ivlen); /* TODO: check return value */
 	memcpy(tpbin->buf, salt, saltlen);
 
 	/* compress the buffer first - increase the entropy */
@@ -351,7 +355,7 @@ ssl_decompress(Transformation *xform, struct tapebuf *tpbin,
 
 	// how to know salt length?
 	memcpy(salt, src, saltlen);
-	generateIV(xform, salt, &saltlen, iv, &ivlen);
+	generateIV(xform, salt, &saltlen, iv, &ivlen); /* TODO: check return value */
 
 	EVP_DecryptInit_ex(xform->state.ssl.dataCtx, xform->state.ssl.cipher,  xform->state.ssl.engine, NULL, NULL);
 	//EVP_CIPHER_CTX_set_key_length(&ctx, 8);
@@ -467,8 +471,6 @@ ssl_compress_ts_addr(char *state, struct tapebuf *comp_buf,
 /*
  * Factory. The cipher and digestnames should be read from a localized
  * policy file.
- *
- * TODO: indicate error if unknown cipher or digest.
  */
 Transformation
 *transformation_ssl_factory(int enc, int complvl, const char *ciphername, const char *digestname)
@@ -490,6 +492,11 @@ Transformation
 	t->state.ssl.cipher = EVP_get_cipherbyname(ciphername);
 	t->state.ssl.digest = EVP_get_digestbyname(digestname);
 	t->state.ssl.engine = NULL;
+
+	if (!t->state.ssl.cipher)
+		errx(1, "unknown cipher: '%s'", ciphername);
+	if (!t->state.ssl.digest)
+		errx(1, "unknown digest: '%s'", digestname);
 #endif
 
 	t->name = "ssl";
@@ -515,7 +522,8 @@ Transformation
 		//EVP_CIPHER_CTX_rand_key(ctx, t->state.ssl.key);
 		//EVP_CIPHER_CTX_cleanup(ctx);
 		//EVP_CIPHER_CTX_free(ctx);
-		RAND_bytes(t->state.ssl.key, t->state.ssl.cipher->key_len);
+		if (RAND_bytes(t->state.ssl.key, EVP_CIPHER_key_length(t->state.ssl.cipher)) != 1)
+			err(1, "unable to get random bytes");
 	} else {
 		// how do we get keys?
 	}
diff --git a/compat/include/bsdcompat.h b/compat/include/bsdcompat.h
index 37d9ad4..6e7f6a1 100644
--- a/compat/include/bsdcompat.h
+++ b/compat/include/bsdcompat.h
@@ -3,7 +3,7 @@
  *	dump and restore backup suit
  *	Remy Card <card@Linux.EU.Org>, 1994-1997
  *	Stelian Pop <stelian@popies.net>, 1999-2000
- *	Stelian Pop <stelian@popies.net> - Alc�ve <www.alcove.com>, 2000-2002
+ *	Stelian Pop <stelian@popies.net> - Alcôve <www.alcove.com>, 2000-2002
  */
 
 #include <config.h>
diff --git a/compat/include/bylabel.h b/compat/include/bylabel.h
index 49fec0f..e788508 100644
--- a/compat/include/bylabel.h
+++ b/compat/include/bylabel.h
@@ -1,7 +1,7 @@
 /*
  *	Ported to Linux's Second Extended File System as part of the
  *	dump and restore backup suit
- *	1999-02-22 Arkadiusz Mi�kiewicz <misiek@misiek.eu.org>
+ *	1999-02-22 Arkadiusz Miśkiewicz <misiek@misiek.eu.org>
  *	 - added Native Language Support
  *	2000-01-20 James Antill <james@and.org>
  *	 - Added error message if /proc/partitions cannot be opened
@@ -9,7 +9,7 @@
  *	- Added cache for UUID and disk labels
  *	Wed Aug 16 2000 Erik Troan <ewt@redhat.com>
  *	- Ported to dump/restore
- *	Stelian Pop <stelian@popies.net> - Alc�ve <www.alcove.com>, 2000-2002
+ *	Stelian Pop <stelian@popies.net> - Alcôve <www.alcove.com>, 2000-2002
  */
 
 #ifndef _BYLABEL_H_
diff --git a/compat/include/compaterr.h b/compat/include/compaterr.h
index 887de99..6952604 100644
--- a/compat/include/compaterr.h
+++ b/compat/include/compaterr.h
@@ -3,7 +3,7 @@
  *	dump and restore backup suit
  *	Remy Card <card@Linux.EU.Org>, 1994-1997
  *	Stelian Pop <stelian@popies.net>, 1999-2000
- *	Stelian Pop <stelian@popies.net> - Alc�ve <www.alcove.com>, 2000-2002
+ *	Stelian Pop <stelian@popies.net> - Alcôve <www.alcove.com>, 2000-2002
  */
 
 /*-
diff --git a/compat/include/compatglob.h b/compat/include/compatglob.h
index f5279f8..d635975 100644
--- a/compat/include/compatglob.h
+++ b/compat/include/compatglob.h
@@ -3,7 +3,7 @@
  *	dump and restore backup suit
  *	Remy Card <card@Linux.EU.Org>, 1994-1997
  *	Stelian Pop <stelian@popies.net>, 1999-2000
- *	Stelian Pop <stelian@popies.net> - Alc�ve <www.alcove.com>, 2000-2002
+ *	Stelian Pop <stelian@popies.net> - Alcôve <www.alcove.com>, 2000-2002
  */
 
 /*
diff --git a/compat/include/pathnames.h b/compat/include/pathnames.h
index 1b30c8c..53a1fe8 100644
--- a/compat/include/pathnames.h
+++ b/compat/include/pathnames.h
@@ -3,7 +3,7 @@
  *	dump and restore backup suit
  *	Remy Card <card@Linux.EU.Org>, 1994-1997
  *	Stelian Pop <stelian@popies.net>, 1999-2000
- *	Stelian Pop <stelian@popies.net> - Alc�ve <www.alcove.com>, 2000-2002
+ *	Stelian Pop <stelian@popies.net> - Alcôve <www.alcove.com>, 2000-2002
  */
 
 /*
diff --git a/compat/include/protocols/dumprestore.h b/compat/include/protocols/dumprestore.h
index 7fcdab5..743eb47 100644
--- a/compat/include/protocols/dumprestore.h
+++ b/compat/include/protocols/dumprestore.h
@@ -3,7 +3,7 @@
  *	dump and restore backup suit
  *	Remy Card <card@Linux.EU.Org>, 1994-1997
  *	Stelian Pop <stelian@popies.net>, 1999-2000
- *	Stelian Pop <stelian@popies.net> - Alc�ve <www.alcove.com>, 2000-2002
+ *	Stelian Pop <stelian@popies.net> - Alcôve <www.alcove.com>, 2000-2002
  */
 
 /*
diff --git a/compat/include/rmtflags.h b/compat/include/rmtflags.h
index 4563df1..d5143ff 100644
--- a/compat/include/rmtflags.h
+++ b/compat/include/rmtflags.h
@@ -3,7 +3,7 @@
  *	dump and restore backup suit
  *	Remy Card <card@Linux.EU.Org>, 1994-1997
  *	Stelian Pop <stelian@popies.net>, 1999-2000
- *	Stelian Pop <stelian@popies.net> - Alc�ve <www.alcove.com>, 2000-2002
+ *	Stelian Pop <stelian@popies.net> - Alcôve <www.alcove.com>, 2000-2002
  */
 
 /*
diff --git a/compat/include/system.h b/compat/include/system.h
index 3f62087..14f5f35 100644
--- a/compat/include/system.h
+++ b/compat/include/system.h
@@ -3,7 +3,7 @@
  *	dump and restore backup suit
  *	Remy Card <card@Linux.EU.Org>, 1994-1997
  *	Stelian Pop <stelian@popies.net>, 1999-2000
- *	Stelian Pop <stelian@popies.net> - Alc�ve <www.alcove.com>, 2000-2002
+ *	Stelian Pop <stelian@popies.net> - Alcôve <www.alcove.com>, 2000-2002
  */
 
 /*-
diff --git a/compat/lib/Makefile.in b/compat/lib/Makefile.in
index 804e2bf..e249b68 100644
--- a/compat/lib/Makefile.in
+++ b/compat/lib/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.2 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2020 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -79,8 +89,6 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = compat/lib
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp
 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 \
@@ -88,6 +96,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -116,7 +125,10 @@ am__v_at_0 = @
 am__v_at_1 = 
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ./$(DEPDIR)/bylabel.Plo \
+	./$(DEPDIR)/compaterr.Plo ./$(DEPDIR)/compatglob.Plo \
+	./$(DEPDIR)/rmtflags.Plo ./$(DEPDIR)/system.Plo
 am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -162,6 +174,7 @@ am__define_uniq_tagged_files = \
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -182,6 +195,7 @@ COM_ERR_LIBS = @COM_ERR_LIBS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
+DATE = @DATE@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DLLTOOL = @DLLTOOL@
@@ -293,6 +307,7 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -330,14 +345,13 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu compat/lib/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu compat/lib/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
 	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
 	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
 	esac;
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -369,11 +383,17 @@ mostlyclean-compile:
 distclean-compile:
 	-rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bylabel.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compaterr.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compatglob.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rmtflags.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/system.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bylabel.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compaterr.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compatglob.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rmtflags.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/system.Plo@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+	@$(MKDIR_P) $(@D)
+	@echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
 
 .c.o:
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -454,7 +474,10 @@ cscopelist-am: $(am__tagged_files)
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
-distdir: $(DISTFILES)
+distdir: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	list='$(DISTFILES)'; \
@@ -524,7 +547,11 @@ clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
 	mostlyclean-am
 
 distclean: distclean-am
-	-rm -rf ./$(DEPDIR)
+		-rm -f ./$(DEPDIR)/bylabel.Plo
+	-rm -f ./$(DEPDIR)/compaterr.Plo
+	-rm -f ./$(DEPDIR)/compatglob.Plo
+	-rm -f ./$(DEPDIR)/rmtflags.Plo
+	-rm -f ./$(DEPDIR)/system.Plo
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
 	distclean-tags
@@ -570,7 +597,11 @@ install-ps-am:
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
-	-rm -rf ./$(DEPDIR)
+		-rm -f ./$(DEPDIR)/bylabel.Plo
+	-rm -f ./$(DEPDIR)/compaterr.Plo
+	-rm -f ./$(DEPDIR)/compatglob.Plo
+	-rm -f ./$(DEPDIR)/rmtflags.Plo
+	-rm -f ./$(DEPDIR)/system.Plo
 	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
@@ -591,20 +622,22 @@ uninstall-am:
 
 .MAKE: install-am install-strip
 
-.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
-	clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \
-	ctags-am distclean distclean-compile distclean-generic \
-	distclean-libtool distclean-tags distdir dvi dvi-am html \
-	html-am info info-am install install-am install-data \
-	install-data-am install-dvi install-dvi-am install-exec \
-	install-exec-am install-html install-html-am install-info \
-	install-info-am install-man install-pdf install-pdf-am \
-	install-ps install-ps-am install-strip installcheck \
-	installcheck-am installdirs maintainer-clean \
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
+	clean-generic clean-libtool clean-noinstLTLIBRARIES \
+	cscopelist-am ctags ctags-am distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-man install-pdf \
+	install-pdf-am install-ps install-ps-am install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
 	maintainer-clean-generic mostlyclean mostlyclean-compile \
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # 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.
diff --git a/compat/lib/bylabel.c b/compat/lib/bylabel.c
index 6935c01..0b3d9f2 100644
--- a/compat/lib/bylabel.c
+++ b/compat/lib/bylabel.c
@@ -1,7 +1,7 @@
 /*
  * mount_by_label.c - aeb
  *
- * 1999-02-22 Arkadiusz Mi�kiewicz <misiek@misiek.eu.org>
+ * 1999-02-22 Arkadiusz Miśkiewicz <misiek@misiek.eu.org>
  * - added Native Language Support
  * 2000-01-20 James Antill <james@and.org>
  * - Added error message if /proc/partitions cannot be opened
diff --git a/compat/lib/compaterr.c b/compat/lib/compaterr.c
index ecf36ac..9fc5623 100644
--- a/compat/lib/compaterr.c
+++ b/compat/lib/compaterr.c
@@ -3,7 +3,7 @@
  *	dump and restore backup suit
  *	Remy Card <card@Linux.EU.Org>, 1994-1997
  *	Stelian Pop <stelian@popies.net>, 1999-2000
- *	Stelian Pop <stelian@popies.net> - Alc�ve <www.alcove.com>, 2000-2002
+ *	Stelian Pop <stelian@popies.net> - Alcôve <www.alcove.com>, 2000-2002
  */
 
 /*-
diff --git a/compat/lib/compatglob.c b/compat/lib/compatglob.c
index c9254fe..74c272f 100644
--- a/compat/lib/compatglob.c
+++ b/compat/lib/compatglob.c
@@ -3,7 +3,7 @@
  *	dump and restore backup suit
  *	Remy Card <card@Linux.EU.Org>, 1994-1997
  *	Stelian Pop <stelian@popies.net>, 1999-2000
- *	Stelian Pop <stelian@popies.net> - Alc�ve <www.alcove.com>, 2000-2002
+ *	Stelian Pop <stelian@popies.net> - Alcôve <www.alcove.com>, 2000-2002
  */
 
 /*
diff --git a/compat/lib/rmtflags.c b/compat/lib/rmtflags.c
index ae56d09..f07b06d 100644
--- a/compat/lib/rmtflags.c
+++ b/compat/lib/rmtflags.c
@@ -3,7 +3,7 @@
  *	dump and restore backup suit
  *	Remy Card <card@Linux.EU.Org>, 1994-1997
  *	Stelian Pop <stelian@popies.net>, 1999-2000
- *	Stelian Pop <stelian@popies.net> - Alc�ve <www.alcove.com>, 2000-2002
+ *	Stelian Pop <stelian@popies.net> - Alcôve <www.alcove.com>, 2000-2002
  */
 
 /*
@@ -101,7 +101,7 @@ struct openflags {
 	{ NULL,		0 }
 };
 
-/* Parts of this stolen again from J�rg Schilling's star package... */
+/* Parts of this stolen again from Jörg Schilling's star package... */
 int
 rmtflags_toint(char *filemode)
 {
diff --git a/compat/lib/system.c b/compat/lib/system.c
index 7442ee5..4e7fabf 100644
--- a/compat/lib/system.c
+++ b/compat/lib/system.c
@@ -3,7 +3,7 @@
  *	dump and restore backup suit
  *	Remy Card <card@Linux.EU.Org>, 1994-1997
  *	Stelian Pop <stelian@popies.net>, 1999-2000
- *	Stelian Pop <stelian@popies.net> - Alc�ve <www.alcove.com>, 2000-2002
+ *	Stelian Pop <stelian@popies.net> - Alcôve <www.alcove.com>, 2000-2002
  */
 
 /*-
diff --git a/compile b/compile
index 531136b..23fcba0 100755
--- a/compile
+++ b/compile
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Wrapper for compilers which do not understand '-c -o'.
 
-scriptversion=2012-10-14.11; # UTC
+scriptversion=2018-03-07.03; # UTC
 
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2020 Free Software Foundation, Inc.
 # Written by Tom Tromey <tromey@cygnus.com>.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -17,7 +17,7 @@ scriptversion=2012-10-14.11; # UTC
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -53,7 +53,7 @@ func_file_conv ()
 	  MINGW*)
 	    file_conv=mingw
 	    ;;
-	  CYGWIN*)
+	  CYGWIN* | MSYS*)
 	    file_conv=cygwin
 	    ;;
 	  *)
@@ -67,7 +67,7 @@ func_file_conv ()
 	mingw/*)
 	  file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
 	  ;;
-	cygwin/*)
+	cygwin/* | msys/*)
 	  file=`cygpath -m "$file" || echo "$file"`
 	  ;;
 	wine/*)
@@ -255,7 +255,8 @@ EOF
     echo "compile $scriptversion"
     exit $?
     ;;
-  cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
+  cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
+  icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
     func_cl_wrapper "$@"      # Doesn't return...
     ;;
 esac
@@ -339,9 +340,9 @@ exit $ret
 # Local Variables:
 # mode: shell-script
 # sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
 # time-stamp-end: "; # UTC"
 # End:
diff --git a/config.guess b/config.guess
index a2eeec3..92bfc33 100755
--- a/config.guess
+++ b/config.guess
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright 1992-2016 Free Software Foundation, Inc.
+#   Copyright 1992-2020 Free Software Foundation, Inc.
 
-timestamp='2016-04-02'
+timestamp='2020-04-26'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@ timestamp='2016-04-02'
 # General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
 #
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -27,7 +27,7 @@ timestamp='2016-04-02'
 # Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
 #
 # You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
 #
 # Please send patches to <config-patches@gnu.org>.
 
@@ -39,7 +39,7 @@ Usage: $0 [OPTION]
 
 Output the configuration name of the system \`$me' is run on.
 
-Operation modes:
+Options:
   -h, --help         print this help, then exit
   -t, --time-stamp   print date of last modification, then exit
   -v, --version      print version number, then exit
@@ -50,7 +50,7 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright 1992-2016 Free Software Foundation, Inc.
+Copyright 1992-2020 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -84,8 +84,6 @@ if test $# != 0; then
   exit 1
 fi
 
-trap 'exit 1' 1 2 15
-
 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
 # compiler to aid in system detection is discouraged as it requires
 # temporary files to be created and, as you can see below, it is a
@@ -96,34 +94,40 @@ trap 'exit 1' 1 2 15
 
 # Portable tmp directory creation inspired by the Autoconf team.
 
-set_cc_for_build='
-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-dummy=$tmp/dummy ;
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,)    echo "int x;" > $dummy.c ;
-	for c in cc gcc c89 c99 ; do
-	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
-	     CC_FOR_BUILD="$c"; break ;
-	  fi ;
-	done ;
-	if test x"$CC_FOR_BUILD" = x ; then
-	  CC_FOR_BUILD=no_compiler_found ;
-	fi
-	;;
- ,,*)   CC_FOR_BUILD=$CC ;;
- ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
-esac ; set_cc_for_build= ;'
+tmp=
+# shellcheck disable=SC2172
+trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
+
+set_cc_for_build() {
+    # prevent multiple calls if $tmp is already set
+    test "$tmp" && return 0
+    : "${TMPDIR=/tmp}"
+    # shellcheck disable=SC2039
+    { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+	{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
+	{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+	{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
+    dummy=$tmp/dummy
+    case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
+	,,)    echo "int x;" > "$dummy.c"
+	       for driver in cc gcc c89 c99 ; do
+		   if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
+		       CC_FOR_BUILD="$driver"
+		       break
+		   fi
+	       done
+	       if test x"$CC_FOR_BUILD" = x ; then
+		   CC_FOR_BUILD=no_compiler_found
+	       fi
+	       ;;
+	,,*)   CC_FOR_BUILD=$CC ;;
+	,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+    esac
+}
 
 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
 # (ghazi@noc.rutgers.edu 1994-08-24)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+if test -f /.attbin/uname ; then
 	PATH=$PATH:/.attbin ; export PATH
 fi
 
@@ -132,14 +136,14 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
 UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
 
-case "${UNAME_SYSTEM}" in
+case "$UNAME_SYSTEM" in
 Linux|GNU|GNU/*)
 	# If the system lacks a compiler, then just pick glibc.
 	# We could probably try harder.
 	LIBC=gnu
 
-	eval $set_cc_for_build
-	cat <<-EOF > $dummy.c
+	set_cc_for_build
+	cat <<-EOF > "$dummy.c"
 	#include <features.h>
 	#if defined(__UCLIBC__)
 	LIBC=uclibc
@@ -149,13 +153,20 @@ Linux|GNU|GNU/*)
 	LIBC=gnu
 	#endif
 	EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+	eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
+
+	# If ldd exists, use it to detect musl libc.
+	if command -v ldd >/dev/null && \
+		ldd --version 2>&1 | grep -q ^musl
+	then
+	    LIBC=musl
+	fi
 	;;
 esac
 
 # Note: order is significant - the case branches are not exclusive.
 
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
     *:NetBSD:*:*)
 	# NetBSD (nbsd) targets should (where applicable) match one or
 	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
@@ -169,27 +180,30 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	# portion of the name.  We always set it to "unknown".
 	sysctl="sysctl -n hw.machine_arch"
 	UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
-	    /sbin/$sysctl 2>/dev/null || \
-	    /usr/sbin/$sysctl 2>/dev/null || \
+	    "/sbin/$sysctl" 2>/dev/null || \
+	    "/usr/sbin/$sysctl" 2>/dev/null || \
 	    echo unknown)`
-	case "${UNAME_MACHINE_ARCH}" in
+	case "$UNAME_MACHINE_ARCH" in
 	    armeb) machine=armeb-unknown ;;
 	    arm*) machine=arm-unknown ;;
 	    sh3el) machine=shl-unknown ;;
 	    sh3eb) machine=sh-unknown ;;
 	    sh5el) machine=sh5le-unknown ;;
 	    earmv*)
-		arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
-		endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
-		machine=${arch}${endian}-unknown
+		arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+		endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
+		machine="${arch}${endian}"-unknown
 		;;
-	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+	    *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
 	esac
 	# The Operating System including object format, if it has switched
-	# to ELF recently, or will in the future.
-	case "${UNAME_MACHINE_ARCH}" in
-	    arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax)
-		eval $set_cc_for_build
+	# to ELF recently (or will in the future) and ABI.
+	case "$UNAME_MACHINE_ARCH" in
+	    earm*)
+		os=netbsdelf
+		;;
+	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+		set_cc_for_build
 		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
 			| grep -q __ELF__
 		then
@@ -205,10 +219,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 		;;
 	esac
 	# Determine ABI tags.
-	case "${UNAME_MACHINE_ARCH}" in
+	case "$UNAME_MACHINE_ARCH" in
 	    earm*)
 		expr='s/^earmv[0-9]/-eabi/;s/eb$//'
-		abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
+		abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
 		;;
 	esac
 	# The OS release
@@ -216,45 +230,60 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	# thus, need a distinct triplet. However, they do not need
 	# kernel version information, so it can be replaced with a
 	# suitable tag, in the style of linux-gnu.
-	case "${UNAME_VERSION}" in
+	case "$UNAME_VERSION" in
 	    Debian*)
 		release='-gnu'
 		;;
 	    *)
-		release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
+		release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
 		;;
 	esac
 	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
 	# contains redundant information, the shorter form:
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-	echo "${machine}-${os}${release}${abi}"
+	echo "$machine-${os}${release}${abi-}"
 	exit ;;
     *:Bitrig:*:*)
 	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
-	echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+	echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
 	exit ;;
     *:OpenBSD:*:*)
 	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
-	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+	echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
 	exit ;;
     *:LibertyBSD:*:*)
 	UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
-	echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
+	echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
+	exit ;;
+    *:MidnightBSD:*:*)
+	echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
 	exit ;;
     *:ekkoBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+	echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
 	exit ;;
     *:SolidBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+	echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
+	exit ;;
+    *:OS108:*:*)
+	echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE"
 	exit ;;
     macppc:MirBSD:*:*)
-	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+	echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
 	exit ;;
     *:MirBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+	echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
 	exit ;;
     *:Sortix:*:*)
-	echo ${UNAME_MACHINE}-unknown-sortix
+	echo "$UNAME_MACHINE"-unknown-sortix
+	exit ;;
+    *:Twizzler:*:*)
+	echo "$UNAME_MACHINE"-unknown-twizzler
+	exit ;;
+    *:Redox:*:*)
+	echo "$UNAME_MACHINE"-unknown-redox
+	exit ;;
+    mips:OSF1:*.*)
+	echo mips-dec-osf1
 	exit ;;
     alpha:OSF1:*:*)
 	case $UNAME_RELEASE in
@@ -307,28 +336,19 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	# A Tn.n version is a released field test version.
 	# A Xn.n version is an unreleased experimental baselevel.
 	# 1.2 uses "1.2" for uname -r.
-	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+	echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
 	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
 	exitcode=$?
 	trap '' 0
 	exit $exitcode ;;
-    Alpha\ *:Windows_NT*:*)
-	# How do we know it's Interix rather than the generic POSIX subsystem?
-	# Should we change UNAME_MACHINE based on the output of uname instead
-	# of the specific Alpha model?
-	echo alpha-pc-interix
-	exit ;;
-    21064:Windows_NT:50:3)
-	echo alpha-dec-winnt3.5
-	exit ;;
     Amiga*:UNIX_System_V:4.0:*)
 	echo m68k-unknown-sysv4
 	exit ;;
     *:[Aa]miga[Oo][Ss]:*:*)
-	echo ${UNAME_MACHINE}-unknown-amigaos
+	echo "$UNAME_MACHINE"-unknown-amigaos
 	exit ;;
     *:[Mm]orph[Oo][Ss]:*:*)
-	echo ${UNAME_MACHINE}-unknown-morphos
+	echo "$UNAME_MACHINE"-unknown-morphos
 	exit ;;
     *:OS/390:*:*)
 	echo i370-ibm-openedition
@@ -340,7 +360,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	echo powerpc-ibm-os400
 	exit ;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
-	echo arm-acorn-riscix${UNAME_RELEASE}
+	echo arm-acorn-riscix"$UNAME_RELEASE"
 	exit ;;
     arm*:riscos:*:*|arm*:RISCOS:*:*)
 	echo arm-unknown-riscos
@@ -367,19 +387,19 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	    sparc) echo sparc-icl-nx7; exit ;;
 	esac ;;
     s390x:SunOS:*:*)
-	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
 	exit ;;
     sun4H:SunOS:5.*:*)
-	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
 	exit ;;
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
-	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
 	exit ;;
     i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
-	echo i386-pc-auroraux${UNAME_RELEASE}
+	echo i386-pc-auroraux"$UNAME_RELEASE"
 	exit ;;
     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
-	eval $set_cc_for_build
+	set_cc_for_build
 	SUN_ARCH=i386
 	# If there is a compiler, see if it is configured for 64-bit objects.
 	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
@@ -392,13 +412,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 		SUN_ARCH=x86_64
 	    fi
 	fi
-	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
 	exit ;;
     sun4*:SunOS:6*:*)
 	# According to config.sub, this is the proper way to canonicalize
 	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
 	# it's likely to be more like Solaris than SunOS4.
-	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
 	exit ;;
     sun4*:SunOS:*:*)
 	case "`/usr/bin/arch -k`" in
@@ -407,25 +427,25 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 		;;
 	esac
 	# Japanese Language versions have a version number like `4.1.3-JL'.
-	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+	echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
 	exit ;;
     sun3*:SunOS:*:*)
-	echo m68k-sun-sunos${UNAME_RELEASE}
+	echo m68k-sun-sunos"$UNAME_RELEASE"
 	exit ;;
     sun*:*:4.2BSD:*)
 	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
-	test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
+	test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
 	case "`/bin/arch`" in
 	    sun3)
-		echo m68k-sun-sunos${UNAME_RELEASE}
+		echo m68k-sun-sunos"$UNAME_RELEASE"
 		;;
 	    sun4)
-		echo sparc-sun-sunos${UNAME_RELEASE}
+		echo sparc-sun-sunos"$UNAME_RELEASE"
 		;;
 	esac
 	exit ;;
     aushp:SunOS:*:*)
-	echo sparc-auspex-sunos${UNAME_RELEASE}
+	echo sparc-auspex-sunos"$UNAME_RELEASE"
 	exit ;;
     # The situation for MiNT is a little confusing.  The machine name
     # can be virtually everything (everything which is not
@@ -436,44 +456,44 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     # MiNT.  But MiNT is downward compatible to TOS, so this should
     # be no problem.
     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-	echo m68k-atari-mint${UNAME_RELEASE}
+	echo m68k-atari-mint"$UNAME_RELEASE"
 	exit ;;
     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
-	echo m68k-atari-mint${UNAME_RELEASE}
+	echo m68k-atari-mint"$UNAME_RELEASE"
 	exit ;;
     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-	echo m68k-atari-mint${UNAME_RELEASE}
+	echo m68k-atari-mint"$UNAME_RELEASE"
 	exit ;;
     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-	echo m68k-milan-mint${UNAME_RELEASE}
+	echo m68k-milan-mint"$UNAME_RELEASE"
 	exit ;;
     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-	echo m68k-hades-mint${UNAME_RELEASE}
+	echo m68k-hades-mint"$UNAME_RELEASE"
 	exit ;;
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-	echo m68k-unknown-mint${UNAME_RELEASE}
+	echo m68k-unknown-mint"$UNAME_RELEASE"
 	exit ;;
     m68k:machten:*:*)
-	echo m68k-apple-machten${UNAME_RELEASE}
+	echo m68k-apple-machten"$UNAME_RELEASE"
 	exit ;;
     powerpc:machten:*:*)
-	echo powerpc-apple-machten${UNAME_RELEASE}
+	echo powerpc-apple-machten"$UNAME_RELEASE"
 	exit ;;
     RISC*:Mach:*:*)
 	echo mips-dec-mach_bsd4.3
 	exit ;;
     RISC*:ULTRIX:*:*)
-	echo mips-dec-ultrix${UNAME_RELEASE}
+	echo mips-dec-ultrix"$UNAME_RELEASE"
 	exit ;;
     VAX*:ULTRIX*:*:*)
-	echo vax-dec-ultrix${UNAME_RELEASE}
+	echo vax-dec-ultrix"$UNAME_RELEASE"
 	exit ;;
     2020:CLIX:*:* | 2430:CLIX:*:*)
-	echo clipper-intergraph-clix${UNAME_RELEASE}
+	echo clipper-intergraph-clix"$UNAME_RELEASE"
 	exit ;;
     mips:*:*:UMIPS | mips:*:*:RISCos)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
+	set_cc_for_build
+	sed 's/^	//' << EOF > "$dummy.c"
 #ifdef __cplusplus
 #include <stdio.h>  /* for printf() prototype */
 	int main (int argc, char *argv[]) {
@@ -482,23 +502,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 #endif
 	#if defined (host_mips) && defined (MIPSEB)
 	#if defined (SYSTYPE_SYSV)
-	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+	  printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
 	#endif
 	#if defined (SYSTYPE_SVR4)
-	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+	  printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
 	#endif
 	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
-	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+	  printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
 	#endif
 	#endif
 	  exit (-1);
 	}
 EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c &&
-	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
-	  SYSTEM_NAME=`$dummy $dummyarg` &&
+	$CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
+	  dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+	  SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
 	    { echo "$SYSTEM_NAME"; exit; }
-	echo mips-mips-riscos${UNAME_RELEASE}
+	echo mips-mips-riscos"$UNAME_RELEASE"
 	exit ;;
     Motorola:PowerMAX_OS:*:*)
 	echo powerpc-motorola-powermax
@@ -524,17 +544,17 @@ EOF
     AViiON:dgux:*:*)
 	# DG/UX returns AViiON for all architectures
 	UNAME_PROCESSOR=`/usr/bin/uname -p`
-	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+	if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
 	then
-	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
-	       [ ${TARGET_BINARY_INTERFACE}x = x ]
+	    if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
+	       [ "$TARGET_BINARY_INTERFACE"x = x ]
 	    then
-		echo m88k-dg-dgux${UNAME_RELEASE}
+		echo m88k-dg-dgux"$UNAME_RELEASE"
 	    else
-		echo m88k-dg-dguxbcs${UNAME_RELEASE}
+		echo m88k-dg-dguxbcs"$UNAME_RELEASE"
 	    fi
 	else
-	    echo i586-dg-dgux${UNAME_RELEASE}
+	    echo i586-dg-dgux"$UNAME_RELEASE"
 	fi
 	exit ;;
     M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
@@ -551,7 +571,7 @@ EOF
 	echo m68k-tektronix-bsd
 	exit ;;
     *:IRIX*:*:*)
-	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+	echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
 	exit ;;
     ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
 	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
@@ -563,14 +583,14 @@ EOF
 	if [ -x /usr/bin/oslevel ] ; then
 		IBM_REV=`/usr/bin/oslevel`
 	else
-		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+		IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
 	fi
-	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+	echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
 	exit ;;
     *:AIX:2:3)
 	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
-		eval $set_cc_for_build
-		sed 's/^		//' << EOF >$dummy.c
+		set_cc_for_build
+		sed 's/^		//' << EOF > "$dummy.c"
 		#include <sys/systemcfg.h>
 
 		main()
@@ -581,7 +601,7 @@ EOF
 			exit(0);
 			}
 EOF
-		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+		if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
 		then
 			echo "$SYSTEM_NAME"
 		else
@@ -595,7 +615,7 @@ EOF
 	exit ;;
     *:AIX:*:[4567])
 	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
-	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+	if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
 		IBM_ARCH=rs6000
 	else
 		IBM_ARCH=powerpc
@@ -604,18 +624,18 @@ EOF
 		IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
 			   awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
 	else
-		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+		IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
 	fi
-	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+	echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
 	exit ;;
     *:AIX:*:*)
 	echo rs6000-ibm-aix
 	exit ;;
-    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+    ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
 	echo romp-ibm-bsd4.4
 	exit ;;
     ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
-	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+	echo romp-ibm-bsd"$UNAME_RELEASE"   # 4.3 with uname added to
 	exit ;;                             # report: romp-ibm BSD 4.3
     *:BOSX:*:*)
 	echo rs6000-bull-bosx
@@ -630,28 +650,28 @@ EOF
 	echo m68k-hp-bsd4.4
 	exit ;;
     9000/[34678]??:HP-UX:*:*)
-	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-	case "${UNAME_MACHINE}" in
-	    9000/31? )            HP_ARCH=m68000 ;;
-	    9000/[34]?? )         HP_ARCH=m68k ;;
+	HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
+	case "$UNAME_MACHINE" in
+	    9000/31?)            HP_ARCH=m68000 ;;
+	    9000/[34]??)         HP_ARCH=m68k ;;
 	    9000/[678][0-9][0-9])
 		if [ -x /usr/bin/getconf ]; then
 		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
 		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-		    case "${sc_cpu_version}" in
+		    case "$sc_cpu_version" in
 		      523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
 		      528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
 		      532)                      # CPU_PA_RISC2_0
-			case "${sc_kernel_bits}" in
+			case "$sc_kernel_bits" in
 			  32) HP_ARCH=hppa2.0n ;;
 			  64) HP_ARCH=hppa2.0w ;;
 			  '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
 			esac ;;
 		    esac
 		fi
-		if [ "${HP_ARCH}" = "" ]; then
-		    eval $set_cc_for_build
-		    sed 's/^		//' << EOF >$dummy.c
+		if [ "$HP_ARCH" = "" ]; then
+		    set_cc_for_build
+		    sed 's/^		//' << EOF > "$dummy.c"
 
 		#define _HPUX_SOURCE
 		#include <stdlib.h>
@@ -684,13 +704,13 @@ EOF
 		    exit (0);
 		}
 EOF
-		    (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+		    (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
 		    test -z "$HP_ARCH" && HP_ARCH=hppa
 		fi ;;
 	esac
-	if [ ${HP_ARCH} = hppa2.0w ]
+	if [ "$HP_ARCH" = hppa2.0w ]
 	then
-	    eval $set_cc_for_build
+	    set_cc_for_build
 
 	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
 	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
@@ -709,15 +729,15 @@ EOF
 		HP_ARCH=hppa64
 	    fi
 	fi
-	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+	echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
 	exit ;;
     ia64:HP-UX:*:*)
-	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-	echo ia64-hp-hpux${HPUX_REV}
+	HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
+	echo ia64-hp-hpux"$HPUX_REV"
 	exit ;;
     3050*:HI-UX:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
+	set_cc_for_build
+	sed 's/^	//' << EOF > "$dummy.c"
 	#include <unistd.h>
 	int
 	main ()
@@ -742,11 +762,11 @@ EOF
 	  exit (0);
 	}
 EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+	$CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
 		{ echo "$SYSTEM_NAME"; exit; }
 	echo unknown-hitachi-hiuxwe2
 	exit ;;
-    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
 	echo hppa1.1-hp-bsd
 	exit ;;
     9000/8??:4.3bsd:*:*)
@@ -755,7 +775,7 @@ EOF
     *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
 	echo hppa1.0-hp-mpeix
 	exit ;;
-    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
 	echo hppa1.1-hp-osf
 	exit ;;
     hp8??:OSF1:*:*)
@@ -763,9 +783,9 @@ EOF
 	exit ;;
     i*86:OSF1:*:*)
 	if [ -x /usr/sbin/sysversion ] ; then
-	    echo ${UNAME_MACHINE}-unknown-osf1mk
+	    echo "$UNAME_MACHINE"-unknown-osf1mk
 	else
-	    echo ${UNAME_MACHINE}-unknown-osf1
+	    echo "$UNAME_MACHINE"-unknown-osf1
 	fi
 	exit ;;
     parisc*:Lites*:*:*)
@@ -790,130 +810,123 @@ EOF
 	echo c4-convex-bsd
 	exit ;;
     CRAY*Y-MP:*:*:*)
-	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
 	exit ;;
     CRAY*[A-Z]90:*:*:*)
-	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+	echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
 	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
 	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
 	      -e 's/\.[^.]*$/.X/'
 	exit ;;
     CRAY*TS:*:*:*)
-	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
 	exit ;;
     CRAY*T3E:*:*:*)
-	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
 	exit ;;
     CRAY*SV1:*:*:*)
-	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
 	exit ;;
     *:UNICOS/mp:*:*)
-	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
 	exit ;;
     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
 	FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
 	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
-	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+	FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
 	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
 	exit ;;
     5000:UNIX_System_V:4.*:*)
 	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
-	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
+	FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
 	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
 	exit ;;
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
-	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+	echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
 	exit ;;
     sparc*:BSD/OS:*:*)
-	echo sparc-unknown-bsdi${UNAME_RELEASE}
+	echo sparc-unknown-bsdi"$UNAME_RELEASE"
 	exit ;;
     *:BSD/OS:*:*)
-	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+	echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
+	exit ;;
+    arm:FreeBSD:*:*)
+	UNAME_PROCESSOR=`uname -p`
+	set_cc_for_build
+	if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+	    | grep -q __ARM_PCS_VFP
+	then
+	    echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi
+	else
+	    echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf
+	fi
 	exit ;;
     *:FreeBSD:*:*)
 	UNAME_PROCESSOR=`/usr/bin/uname -p`
-	case ${UNAME_PROCESSOR} in
+	case "$UNAME_PROCESSOR" in
 	    amd64)
-		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-	    *)
-		echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+		UNAME_PROCESSOR=x86_64 ;;
+	    i386)
+		UNAME_PROCESSOR=i586 ;;
 	esac
+	echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
 	exit ;;
     i*:CYGWIN*:*)
-	echo ${UNAME_MACHINE}-pc-cygwin
+	echo "$UNAME_MACHINE"-pc-cygwin
 	exit ;;
     *:MINGW64*:*)
-	echo ${UNAME_MACHINE}-pc-mingw64
+	echo "$UNAME_MACHINE"-pc-mingw64
 	exit ;;
     *:MINGW*:*)
-	echo ${UNAME_MACHINE}-pc-mingw32
+	echo "$UNAME_MACHINE"-pc-mingw32
 	exit ;;
     *:MSYS*:*)
-	echo ${UNAME_MACHINE}-pc-msys
-	exit ;;
-    i*:windows32*:*)
-	# uname -m includes "-pc" on this system.
-	echo ${UNAME_MACHINE}-mingw32
+	echo "$UNAME_MACHINE"-pc-msys
 	exit ;;
     i*:PW*:*)
-	echo ${UNAME_MACHINE}-pc-pw32
+	echo "$UNAME_MACHINE"-pc-pw32
 	exit ;;
     *:Interix*:*)
-	case ${UNAME_MACHINE} in
+	case "$UNAME_MACHINE" in
 	    x86)
-		echo i586-pc-interix${UNAME_RELEASE}
+		echo i586-pc-interix"$UNAME_RELEASE"
 		exit ;;
 	    authenticamd | genuineintel | EM64T)
-		echo x86_64-unknown-interix${UNAME_RELEASE}
+		echo x86_64-unknown-interix"$UNAME_RELEASE"
 		exit ;;
 	    IA64)
-		echo ia64-unknown-interix${UNAME_RELEASE}
+		echo ia64-unknown-interix"$UNAME_RELEASE"
 		exit ;;
 	esac ;;
-    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
-	echo i${UNAME_MACHINE}-pc-mks
-	exit ;;
-    8664:Windows_NT:*)
-	echo x86_64-pc-mks
-	exit ;;
-    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
-	# How do we know it's Interix rather than the generic POSIX subsystem?
-	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
-	# UNAME_MACHINE based on the output of uname instead of i386?
-	echo i586-pc-interix
-	exit ;;
     i*:UWIN*:*)
-	echo ${UNAME_MACHINE}-pc-uwin
+	echo "$UNAME_MACHINE"-pc-uwin
 	exit ;;
     amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
-	echo x86_64-unknown-cygwin
-	exit ;;
-    p*:CYGWIN*:*)
-	echo powerpcle-unknown-cygwin
+	echo x86_64-pc-cygwin
 	exit ;;
     prep*:SunOS:5.*:*)
-	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
 	exit ;;
     *:GNU:*:*)
 	# the GNU system
-	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+	echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
 	exit ;;
     *:GNU/*:*:*)
 	# other systems with GNU libc and userland
-	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+	echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
 	exit ;;
-    i*86:Minix:*:*)
-	echo ${UNAME_MACHINE}-pc-minix
+    *:Minix:*:*)
+	echo "$UNAME_MACHINE"-unknown-minix
 	exit ;;
     aarch64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     aarch64_be:Linux:*:*)
 	UNAME_MACHINE=aarch64_be
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     alpha:Linux:*:*)
-	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
 	  EV5)   UNAME_MACHINE=alphaev5 ;;
 	  EV56)  UNAME_MACHINE=alphaev56 ;;
 	  PCA56) UNAME_MACHINE=alphapca56 ;;
@@ -924,145 +937,178 @@ EOF
 	esac
 	objdump --private-headers /bin/sh | grep -q ld.so.1
 	if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     arc:Linux:*:* | arceb:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     arm*:Linux:*:*)
-	eval $set_cc_for_build
+	set_cc_for_build
 	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
 	    | grep -q __ARM_EABI__
 	then
-	    echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	    echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	else
 	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
 		| grep -q __ARM_PCS_VFP
 	    then
-		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+		echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
 	    else
-		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
+		echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
 	    fi
 	fi
 	exit ;;
     avr32*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     cris:Linux:*:*)
-	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+	echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
 	exit ;;
     crisv32:Linux:*:*)
-	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+	echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
 	exit ;;
     e2k:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     frv:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     hexagon:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     i*86:Linux:*:*)
-	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+	echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
 	exit ;;
     ia64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     k1om:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     m32r*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     m68*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     mips:Linux:*:* | mips64:Linux:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
+	set_cc_for_build
+	IS_GLIBC=0
+	test x"${LIBC}" = xgnu && IS_GLIBC=1
+	sed 's/^	//' << EOF > "$dummy.c"
 	#undef CPU
-	#undef ${UNAME_MACHINE}
-	#undef ${UNAME_MACHINE}el
+	#undef mips
+	#undef mipsel
+	#undef mips64
+	#undef mips64el
+	#if ${IS_GLIBC} && defined(_ABI64)
+	LIBCABI=gnuabi64
+	#else
+	#if ${IS_GLIBC} && defined(_ABIN32)
+	LIBCABI=gnuabin32
+	#else
+	LIBCABI=${LIBC}
+	#endif
+	#endif
+
+	#if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
+	CPU=mipsisa64r6
+	#else
+	#if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
+	CPU=mipsisa32r6
+	#else
+	#if defined(__mips64)
+	CPU=mips64
+	#else
+	CPU=mips
+	#endif
+	#endif
+	#endif
+
 	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-	CPU=${UNAME_MACHINE}el
+	MIPS_ENDIAN=el
 	#else
 	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-	CPU=${UNAME_MACHINE}
+	MIPS_ENDIAN=
 	#else
-	CPU=
+	MIPS_ENDIAN=
 	#endif
 	#endif
 EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
-	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+	eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`"
+	test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
 	;;
+    mips64el:Linux:*:*)
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+	exit ;;
     openrisc*:Linux:*:*)
-	echo or1k-unknown-linux-${LIBC}
+	echo or1k-unknown-linux-"$LIBC"
 	exit ;;
     or32:Linux:*:* | or1k*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     padre:Linux:*:*)
-	echo sparc-unknown-linux-${LIBC}
+	echo sparc-unknown-linux-"$LIBC"
 	exit ;;
     parisc64:Linux:*:* | hppa64:Linux:*:*)
-	echo hppa64-unknown-linux-${LIBC}
+	echo hppa64-unknown-linux-"$LIBC"
 	exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
 	# Look for CPU level
 	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-	  PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
-	  PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
-	  *)    echo hppa-unknown-linux-${LIBC} ;;
+	  PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
+	  PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
+	  *)    echo hppa-unknown-linux-"$LIBC" ;;
 	esac
 	exit ;;
     ppc64:Linux:*:*)
-	echo powerpc64-unknown-linux-${LIBC}
+	echo powerpc64-unknown-linux-"$LIBC"
 	exit ;;
     ppc:Linux:*:*)
-	echo powerpc-unknown-linux-${LIBC}
+	echo powerpc-unknown-linux-"$LIBC"
 	exit ;;
     ppc64le:Linux:*:*)
-	echo powerpc64le-unknown-linux-${LIBC}
+	echo powerpc64le-unknown-linux-"$LIBC"
 	exit ;;
     ppcle:Linux:*:*)
-	echo powerpcle-unknown-linux-${LIBC}
+	echo powerpcle-unknown-linux-"$LIBC"
+	exit ;;
+    riscv32:Linux:*:* | riscv64:Linux:*:*)
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
-	echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
+	echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
 	exit ;;
     sh64*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     sh*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     sparc:Linux:*:* | sparc64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     tile*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     vax:Linux:*:*)
-	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+	echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
 	exit ;;
     x86_64:Linux:*:*)
-	eval $set_cc_for_build
-	X86_64_ABI=
-	# If there is a compiler, see if it is configured for 32-bit objects.
-	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+	set_cc_for_build
+	LIBCABI=$LIBC
+	if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
 	    if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
-		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
 		grep IS_X32 >/dev/null
 	    then
-		X86_64_ABI=x32
+		LIBCABI="$LIBC"x32
 	    fi
 	fi
-	echo ${UNAME_MACHINE}-pc-linux-${LIBC}${X86_64_ABI}
+	echo "$UNAME_MACHINE"-pc-linux-"$LIBCABI"
 	exit ;;
     xtensa*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     i*86:DYNIX/ptx:4*:*)
 	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -1076,34 +1122,34 @@ EOF
 	# I am not positive that other SVR4 systems won't match this,
 	# I just have to hope.  -- rms.
 	# Use sysv4.2uw... so that sysv4* matches it.
-	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+	echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
 	exit ;;
     i*86:OS/2:*:*)
 	# If we were able to find `uname', then EMX Unix compatibility
 	# is probably installed.
-	echo ${UNAME_MACHINE}-pc-os2-emx
+	echo "$UNAME_MACHINE"-pc-os2-emx
 	exit ;;
     i*86:XTS-300:*:STOP)
-	echo ${UNAME_MACHINE}-unknown-stop
+	echo "$UNAME_MACHINE"-unknown-stop
 	exit ;;
     i*86:atheos:*:*)
-	echo ${UNAME_MACHINE}-unknown-atheos
+	echo "$UNAME_MACHINE"-unknown-atheos
 	exit ;;
     i*86:syllable:*:*)
-	echo ${UNAME_MACHINE}-pc-syllable
+	echo "$UNAME_MACHINE"-pc-syllable
 	exit ;;
     i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
-	echo i386-unknown-lynxos${UNAME_RELEASE}
+	echo i386-unknown-lynxos"$UNAME_RELEASE"
 	exit ;;
     i*86:*DOS:*:*)
-	echo ${UNAME_MACHINE}-pc-msdosdjgpp
+	echo "$UNAME_MACHINE"-pc-msdosdjgpp
 	exit ;;
-    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
-	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+    i*86:*:4.*:*)
+	UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
 	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
-		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+		echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
 	else
-		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+		echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
 	fi
 	exit ;;
     i*86:*:5:[678]*)
@@ -1113,12 +1159,12 @@ EOF
 	    *Pentium)	     UNAME_MACHINE=i586 ;;
 	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
 	esac
-	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+	echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}"
 	exit ;;
     i*86:*:3.2:*)
 	if test -f /usr/options/cb.name; then
 		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
-		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+		echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL"
 	elif /bin/uname -X 2>/dev/null >/dev/null ; then
 		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
 		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
@@ -1128,9 +1174,9 @@ EOF
 			&& UNAME_MACHINE=i686
 		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
 			&& UNAME_MACHINE=i686
-		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+		echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
 	else
-		echo ${UNAME_MACHINE}-pc-sysv32
+		echo "$UNAME_MACHINE"-pc-sysv32
 	fi
 	exit ;;
     pc:*:*:*)
@@ -1150,9 +1196,9 @@ EOF
 	exit ;;
     i860:*:4.*:*) # i860-SVR4
 	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
-	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+	  echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
 	else # Add other i860-SVR4 vendors below as they are discovered.
-	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+	  echo i860-unknown-sysv"$UNAME_RELEASE"  # Unknown i860-SVR4
 	fi
 	exit ;;
     mini*:CTIX:SYS*5:*)
@@ -1172,9 +1218,9 @@ EOF
 	test -r /etc/.relid \
 	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
 	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+	  && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
 	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+	  && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
 	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
 	  && { echo i486-ncr-sysv4; exit; } ;;
@@ -1183,28 +1229,28 @@ EOF
 	test -r /etc/.relid \
 	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
 	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+	    && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
 	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+	    && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
 	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
-	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+	    && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
     m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
-	echo m68k-unknown-lynxos${UNAME_RELEASE}
+	echo m68k-unknown-lynxos"$UNAME_RELEASE"
 	exit ;;
     mc68030:UNIX_System_V:4.*:*)
 	echo m68k-atari-sysv4
 	exit ;;
     TSUNAMI:LynxOS:2.*:*)
-	echo sparc-unknown-lynxos${UNAME_RELEASE}
+	echo sparc-unknown-lynxos"$UNAME_RELEASE"
 	exit ;;
     rs6000:LynxOS:2.*:*)
-	echo rs6000-unknown-lynxos${UNAME_RELEASE}
+	echo rs6000-unknown-lynxos"$UNAME_RELEASE"
 	exit ;;
     PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
-	echo powerpc-unknown-lynxos${UNAME_RELEASE}
+	echo powerpc-unknown-lynxos"$UNAME_RELEASE"
 	exit ;;
     SM[BE]S:UNIX_SV:*:*)
-	echo mips-dde-sysv${UNAME_RELEASE}
+	echo mips-dde-sysv"$UNAME_RELEASE"
 	exit ;;
     RM*:ReliantUNIX-*:*:*)
 	echo mips-sni-sysv4
@@ -1215,7 +1261,7 @@ EOF
     *:SINIX-*:*:*)
 	if uname -p 2>/dev/null >/dev/null ; then
 		UNAME_MACHINE=`(uname -p) 2>/dev/null`
-		echo ${UNAME_MACHINE}-sni-sysv4
+		echo "$UNAME_MACHINE"-sni-sysv4
 	else
 		echo ns32k-sni-sysv
 	fi
@@ -1235,23 +1281,23 @@ EOF
 	exit ;;
     i*86:VOS:*:*)
 	# From Paul.Green@stratus.com.
-	echo ${UNAME_MACHINE}-stratus-vos
+	echo "$UNAME_MACHINE"-stratus-vos
 	exit ;;
     *:VOS:*:*)
 	# From Paul.Green@stratus.com.
 	echo hppa1.1-stratus-vos
 	exit ;;
     mc68*:A/UX:*:*)
-	echo m68k-apple-aux${UNAME_RELEASE}
+	echo m68k-apple-aux"$UNAME_RELEASE"
 	exit ;;
     news*:NEWS-OS:6*:*)
 	echo mips-sony-newsos6
 	exit ;;
     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
 	if [ -d /usr/nec ]; then
-		echo mips-nec-sysv${UNAME_RELEASE}
+		echo mips-nec-sysv"$UNAME_RELEASE"
 	else
-		echo mips-unknown-sysv${UNAME_RELEASE}
+		echo mips-unknown-sysv"$UNAME_RELEASE"
 	fi
 	exit ;;
     BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
@@ -1270,60 +1316,68 @@ EOF
 	echo x86_64-unknown-haiku
 	exit ;;
     SX-4:SUPER-UX:*:*)
-	echo sx4-nec-superux${UNAME_RELEASE}
+	echo sx4-nec-superux"$UNAME_RELEASE"
 	exit ;;
     SX-5:SUPER-UX:*:*)
-	echo sx5-nec-superux${UNAME_RELEASE}
+	echo sx5-nec-superux"$UNAME_RELEASE"
 	exit ;;
     SX-6:SUPER-UX:*:*)
-	echo sx6-nec-superux${UNAME_RELEASE}
+	echo sx6-nec-superux"$UNAME_RELEASE"
 	exit ;;
     SX-7:SUPER-UX:*:*)
-	echo sx7-nec-superux${UNAME_RELEASE}
+	echo sx7-nec-superux"$UNAME_RELEASE"
 	exit ;;
     SX-8:SUPER-UX:*:*)
-	echo sx8-nec-superux${UNAME_RELEASE}
+	echo sx8-nec-superux"$UNAME_RELEASE"
 	exit ;;
     SX-8R:SUPER-UX:*:*)
-	echo sx8r-nec-superux${UNAME_RELEASE}
+	echo sx8r-nec-superux"$UNAME_RELEASE"
 	exit ;;
     SX-ACE:SUPER-UX:*:*)
-	echo sxace-nec-superux${UNAME_RELEASE}
+	echo sxace-nec-superux"$UNAME_RELEASE"
 	exit ;;
     Power*:Rhapsody:*:*)
-	echo powerpc-apple-rhapsody${UNAME_RELEASE}
+	echo powerpc-apple-rhapsody"$UNAME_RELEASE"
 	exit ;;
     *:Rhapsody:*:*)
-	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+	echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
 	exit ;;
     *:Darwin:*:*)
-	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
-	eval $set_cc_for_build
-	if test "$UNAME_PROCESSOR" = unknown ; then
-	    UNAME_PROCESSOR=powerpc
+	UNAME_PROCESSOR=`uname -p`
+	case $UNAME_PROCESSOR in
+	    unknown) UNAME_PROCESSOR=powerpc ;;
+	esac
+	if command -v xcode-select > /dev/null 2> /dev/null && \
+		! xcode-select --print-path > /dev/null 2> /dev/null ; then
+	    # Avoid executing cc if there is no toolchain installed as
+	    # cc will be a stub that puts up a graphical alert
+	    # prompting the user to install developer tools.
+	    CC_FOR_BUILD=no_compiler_found
+	else
+	    set_cc_for_build
 	fi
-	if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
-	    if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
-		if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
-		    (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
-		    grep IS_64BIT_ARCH >/dev/null
-		then
-		    case $UNAME_PROCESSOR in
-			i386) UNAME_PROCESSOR=x86_64 ;;
-			powerpc) UNAME_PROCESSOR=powerpc64 ;;
-		    esac
-		fi
+	if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
+	    if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+		   (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+		   grep IS_64BIT_ARCH >/dev/null
+	    then
+		case $UNAME_PROCESSOR in
+		    i386) UNAME_PROCESSOR=x86_64 ;;
+		    powerpc) UNAME_PROCESSOR=powerpc64 ;;
+		esac
+	    fi
+	    # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
+	    if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
+		   (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+		   grep IS_PPC >/dev/null
+	    then
+		UNAME_PROCESSOR=powerpc
 	    fi
 	elif test "$UNAME_PROCESSOR" = i386 ; then
-	    # Avoid executing cc on OS X 10.9, as it ships with a stub
-	    # that puts up a graphical alert prompting to install
-	    # developer tools.  Any system running Mac OS X 10.7 or
-	    # later (Darwin 11 and later) is required to have a 64-bit
-	    # processor. This is not true of the ARM version of Darwin
-	    # that Apple uses in portable devices.
-	    UNAME_PROCESSOR=x86_64
+	    # uname -m returns i386 or x86_64
+	    UNAME_PROCESSOR=$UNAME_MACHINE
 	fi
-	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+	echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
 	exit ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
 	UNAME_PROCESSOR=`uname -p`
@@ -1331,19 +1385,25 @@ EOF
 		UNAME_PROCESSOR=i386
 		UNAME_MACHINE=pc
 	fi
-	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+	echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
 	exit ;;
     *:QNX:*:4*)
 	echo i386-pc-qnx
 	exit ;;
-    NEO-?:NONSTOP_KERNEL:*:*)
-	echo neo-tandem-nsk${UNAME_RELEASE}
+    NEO-*:NONSTOP_KERNEL:*:*)
+	echo neo-tandem-nsk"$UNAME_RELEASE"
 	exit ;;
     NSE-*:NONSTOP_KERNEL:*:*)
-	echo nse-tandem-nsk${UNAME_RELEASE}
+	echo nse-tandem-nsk"$UNAME_RELEASE"
+	exit ;;
+    NSR-*:NONSTOP_KERNEL:*:*)
+	echo nsr-tandem-nsk"$UNAME_RELEASE"
+	exit ;;
+    NSV-*:NONSTOP_KERNEL:*:*)
+	echo nsv-tandem-nsk"$UNAME_RELEASE"
 	exit ;;
-    NSR-?:NONSTOP_KERNEL:*:*)
-	echo nsr-tandem-nsk${UNAME_RELEASE}
+    NSX-*:NONSTOP_KERNEL:*:*)
+	echo nsx-tandem-nsk"$UNAME_RELEASE"
 	exit ;;
     *:NonStop-UX:*:*)
 	echo mips-compaq-nonstopux
@@ -1352,18 +1412,19 @@ EOF
 	echo bs2000-siemens-sysv
 	exit ;;
     DS/*:UNIX_System_V:*:*)
-	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+	echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
 	exit ;;
     *:Plan9:*:*)
 	# "uname -m" is not consistent, so use $cputype instead. 386
 	# is converted to i386 for consistency with other x86
 	# operating systems.
+	# shellcheck disable=SC2154
 	if test "$cputype" = 386; then
 	    UNAME_MACHINE=i386
 	else
 	    UNAME_MACHINE="$cputype"
 	fi
-	echo ${UNAME_MACHINE}-unknown-plan9
+	echo "$UNAME_MACHINE"-unknown-plan9
 	exit ;;
     *:TOPS-10:*:*)
 	echo pdp10-unknown-tops10
@@ -1384,14 +1445,14 @@ EOF
 	echo pdp10-unknown-its
 	exit ;;
     SEI:*:*:SEIUX)
-	echo mips-sei-seiux${UNAME_RELEASE}
+	echo mips-sei-seiux"$UNAME_RELEASE"
 	exit ;;
     *:DragonFly:*:*)
-	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
 	exit ;;
     *:*VMS:*:*)
 	UNAME_MACHINE=`(uname -p) 2>/dev/null`
-	case "${UNAME_MACHINE}" in
+	case "$UNAME_MACHINE" in
 	    A*) echo alpha-dec-vms ; exit ;;
 	    I*) echo ia64-dec-vms ; exit ;;
 	    V*) echo vax-dec-vms ; exit ;;
@@ -1400,37 +1461,194 @@ EOF
 	echo i386-pc-xenix
 	exit ;;
     i*86:skyos:*:*)
-	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
+	echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`"
 	exit ;;
     i*86:rdos:*:*)
-	echo ${UNAME_MACHINE}-pc-rdos
+	echo "$UNAME_MACHINE"-pc-rdos
 	exit ;;
     i*86:AROS:*:*)
-	echo ${UNAME_MACHINE}-pc-aros
+	echo "$UNAME_MACHINE"-pc-aros
 	exit ;;
     x86_64:VMkernel:*:*)
-	echo ${UNAME_MACHINE}-unknown-esx
+	echo "$UNAME_MACHINE"-unknown-esx
 	exit ;;
     amd64:Isilon\ OneFS:*:*)
 	echo x86_64-unknown-onefs
 	exit ;;
+    *:Unleashed:*:*)
+	echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE"
+	exit ;;
+esac
+
+# No uname command or uname output not recognized.
+set_cc_for_build
+cat > "$dummy.c" <<EOF
+#ifdef _SEQUENT_
+#include <sys/types.h>
+#include <sys/utsname.h>
+#endif
+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
+#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
+#include <signal.h>
+#if defined(_SIZE_T_) || defined(SIGLOST)
+#include <sys/utsname.h>
+#endif
+#endif
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+  "4"
+#else
+  ""
+#endif
+  ); exit (0);
+#endif
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+  struct utsname un;
+
+  uname(&un);
+  if (strncmp(un.version, "V2", 2) == 0) {
+    printf ("i386-sequent-ptx2\n"); exit (0);
+  }
+  if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+    printf ("i386-sequent-ptx1\n"); exit (0);
+  }
+  printf ("i386-sequent-ptx\n"); exit (0);
+#endif
+
+#if defined (vax)
+#if !defined (ultrix)
+#include <sys/param.h>
+#if defined (BSD)
+#if BSD == 43
+  printf ("vax-dec-bsd4.3\n"); exit (0);
+#else
+#if BSD == 199006
+  printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#else
+  printf ("vax-dec-bsd\n"); exit (0);
+#endif
+#endif
+#else
+  printf ("vax-dec-bsd\n"); exit (0);
+#endif
+#else
+#if defined(_SIZE_T_) || defined(SIGLOST)
+  struct utsname un;
+  uname (&un);
+  printf ("vax-dec-ultrix%s\n", un.release); exit (0);
+#else
+  printf ("vax-dec-ultrix\n"); exit (0);
+#endif
+#endif
+#endif
+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
+#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
+#if defined(_SIZE_T_) || defined(SIGLOST)
+  struct utsname *un;
+  uname (&un);
+  printf ("mips-dec-ultrix%s\n", un.release); exit (0);
+#else
+  printf ("mips-dec-ultrix\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+	{ echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; }
+
+echo "$0: unable to guess system type" >&2
+
+case "$UNAME_MACHINE:$UNAME_SYSTEM" in
+    mips:Linux | mips64:Linux)
+	# If we got here on MIPS GNU/Linux, output extra information.
+	cat >&2 <<EOF
+
+NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
+the system type. Please install a C compiler and try again.
+EOF
+	;;
 esac
 
 cat >&2 <<EOF
-$0: unable to guess system type
 
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
+This script (version $timestamp), has failed to recognize the
+operating system you are using. If your script is old, overwrite *all*
+copies of config.guess and config.sub with the latest versions from:
 
-  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+  https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
 and
-  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+  https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+EOF
+
+year=`echo $timestamp | sed 's,-.*,,'`
+# shellcheck disable=SC2003
+if test "`expr "\`date +%Y\`" - "$year"`" -lt 3 ; then
+   cat >&2 <<EOF
 
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> in order to provide the needed
-information to handle your system.
+If $0 has already been updated, send the following data and any
+information you think might be pertinent to config-patches@gnu.org to
+provide the necessary information to handle your system.
 
 config.guess timestamp = $timestamp
 
@@ -1449,16 +1667,17 @@ hostinfo               = `(hostinfo) 2>/dev/null`
 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
 
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM  = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
+UNAME_MACHINE = "$UNAME_MACHINE"
+UNAME_RELEASE = "$UNAME_RELEASE"
+UNAME_SYSTEM  = "$UNAME_SYSTEM"
+UNAME_VERSION = "$UNAME_VERSION"
 EOF
+fi
 
 exit 1
 
 # Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
 # time-stamp-start: "timestamp='"
 # time-stamp-format: "%:y-%02m-%02d"
 # time-stamp-end: "'"
diff --git a/config.h.in b/config.h.in
index 0ea1d69..3058a01 100644
--- a/config.h.in
+++ b/config.h.in
@@ -96,6 +96,9 @@
 /* Define to 1 if you have the <unistd.h> header file. */
 #undef HAVE_UNISTD_H
 
+/* Define to 1 if you have the `utimensat' function. */
+#undef HAVE_UTIMENSAT
+
 /* Define this if you have the uuid library. */
 #undef HAVE_UUID
 
diff --git a/config.sub b/config.sub
index b01fff0..44ec7d8 100755
--- a/config.sub
+++ b/config.sub
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Configuration validation subroutine script.
-#   Copyright 1992-2016 Free Software Foundation, Inc.
+#   Copyright 1992-2020 Free Software Foundation, Inc.
 
-timestamp='2016-03-30'
+timestamp='2020-06-20'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@ timestamp='2016-03-30'
 # General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
 #
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -33,7 +33,7 @@ timestamp='2016-03-30'
 # Otherwise, we print the canonical config type on stdout and succeed.
 
 # You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
 
 # This file is supposed to be the same for all GNU packages
 # and recognize all the CPU types, system types and aliases
@@ -57,7 +57,7 @@ Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
 
 Canonicalize a configuration name.
 
-Operation modes:
+Options:
   -h, --help         print this help, then exit
   -t, --time-stamp   print date of last modification, then exit
   -v, --version      print version number, then exit
@@ -67,7 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright 1992-2016 Free Software Foundation, Inc.
+Copyright 1992-2020 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -89,12 +89,12 @@ while test $# -gt 0 ; do
     - )	# Use stdin as input.
        break ;;
     -* )
-       echo "$me: invalid option $1$help"
+       echo "$me: invalid option $1$help" >&2
        exit 1 ;;
 
     *local*)
        # First pass through any local machine types.
-       echo $1
+       echo "$1"
        exit ;;
 
     * )
@@ -110,1252 +110,1186 @@ case $# in
     exit 1;;
 esac
 
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
-  linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
-  knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
-  kopensolaris*-gnu* | \
-  storm-chaos* | os2-emx* | rtmk-nova*)
-    os=-$maybe_os
-    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
-    ;;
-  android-linux)
-    os=-linux-android
-    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
-    ;;
-  *)
-    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
-    if [ $basic_machine != $1 ]
-    then os=`echo $1 | sed 's/.*-/-/'`
-    else os=; fi
-    ;;
-esac
+# Split fields of configuration type
+# shellcheck disable=SC2162
+IFS="-" read field1 field2 field3 field4 <<EOF
+$1
+EOF
 
-### Let's recognize common machines as not being operating systems so
-### that things like config.sub decstation-3100 work.  We also
-### recognize some manufacturers as not being operating systems, so we
-### can provide default operating systems below.
-case $os in
-	-sun*os*)
-		# Prevent following clause from handling this invalid input.
-		;;
-	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
-	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
-	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
-	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-	-apple | -axis | -knuth | -cray | -microblaze*)
-		os=
-		basic_machine=$1
-		;;
-	-bluegene*)
-		os=-cnk
-		;;
-	-sim | -cisco | -oki | -wec | -winbond)
-		os=
-		basic_machine=$1
-		;;
-	-scout)
-		;;
-	-wrs)
-		os=-vxworks
-		basic_machine=$1
-		;;
-	-chorusos*)
-		os=-chorusos
-		basic_machine=$1
-		;;
-	-chorusrdb)
-		os=-chorusrdb
-		basic_machine=$1
-		;;
-	-hiux*)
-		os=-hiuxwe2
-		;;
-	-sco6)
-		os=-sco5v6
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco5)
-		os=-sco3.2v5
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco4)
-		os=-sco3.2v4
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco3.2.[4-9]*)
-		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco3.2v[4-9]*)
-		# Don't forget version if it is 3.2v4 or newer.
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco5v6*)
-		# Don't forget version if it is 3.2v4 or newer.
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco*)
-		os=-sco3.2v2
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-udk*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-isc)
-		os=-isc2.2
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-clix*)
-		basic_machine=clipper-intergraph
-		;;
-	-isc*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-lynx*178)
-		os=-lynxos178
-		;;
-	-lynx*5)
-		os=-lynxos5
-		;;
-	-lynx*)
-		os=-lynxos
+# Separate into logical components for further validation
+case $1 in
+	*-*-*-*-*)
+		echo Invalid configuration \`"$1"\': more than four components >&2
+		exit 1
 		;;
-	-ptx*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+	*-*-*-*)
+		basic_machine=$field1-$field2
+		os=$field3-$field4
 		;;
-	-windowsnt*)
-		os=`echo $os | sed -e 's/windowsnt/winnt/'`
+	*-*-*)
+		# Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
+		# parts
+		maybe_os=$field2-$field3
+		case $maybe_os in
+			nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \
+			| linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \
+			| uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
+			| netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
+			| storm-chaos* | os2-emx* | rtmk-nova*)
+				basic_machine=$field1
+				os=$maybe_os
+				;;
+			android-linux)
+				basic_machine=$field1-unknown
+				os=linux-android
+				;;
+			*)
+				basic_machine=$field1-$field2
+				os=$field3
+				;;
+		esac
 		;;
-	-psos*)
-		os=-psos
+	*-*)
+		# A lone config we happen to match not fitting any pattern
+		case $field1-$field2 in
+			decstation-3100)
+				basic_machine=mips-dec
+				os=
+				;;
+			*-*)
+				# Second component is usually, but not always the OS
+				case $field2 in
+					# Prevent following clause from handling this valid os
+					sun*os*)
+						basic_machine=$field1
+						os=$field2
+						;;
+					# Manufacturers
+					dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
+					| att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
+					| unicom* | ibm* | next | hp | isi* | apollo | altos* \
+					| convergent* | ncr* | news | 32* | 3600* | 3100* \
+					| hitachi* | c[123]* | convex* | sun | crds | omron* | dg \
+					| ultra | tti* | harris | dolphin | highlevel | gould \
+					| cbm | ns | masscomp | apple | axis | knuth | cray \
+					| microblaze* | sim | cisco \
+					| oki | wec | wrs | winbond)
+						basic_machine=$field1-$field2
+						os=
+						;;
+					*)
+						basic_machine=$field1
+						os=$field2
+						;;
+				esac
+			;;
+		esac
 		;;
-	-mint | -mint[0-9]*)
-		basic_machine=m68k-atari
-		os=-mint
+	*)
+		# Convert single-component short-hands not valid as part of
+		# multi-component configurations.
+		case $field1 in
+			386bsd)
+				basic_machine=i386-pc
+				os=bsd
+				;;
+			a29khif)
+				basic_machine=a29k-amd
+				os=udi
+				;;
+			adobe68k)
+				basic_machine=m68010-adobe
+				os=scout
+				;;
+			alliant)
+				basic_machine=fx80-alliant
+				os=
+				;;
+			altos | altos3068)
+				basic_machine=m68k-altos
+				os=
+				;;
+			am29k)
+				basic_machine=a29k-none
+				os=bsd
+				;;
+			amdahl)
+				basic_machine=580-amdahl
+				os=sysv
+				;;
+			amiga)
+				basic_machine=m68k-unknown
+				os=
+				;;
+			amigaos | amigados)
+				basic_machine=m68k-unknown
+				os=amigaos
+				;;
+			amigaunix | amix)
+				basic_machine=m68k-unknown
+				os=sysv4
+				;;
+			apollo68)
+				basic_machine=m68k-apollo
+				os=sysv
+				;;
+			apollo68bsd)
+				basic_machine=m68k-apollo
+				os=bsd
+				;;
+			aros)
+				basic_machine=i386-pc
+				os=aros
+				;;
+			aux)
+				basic_machine=m68k-apple
+				os=aux
+				;;
+			balance)
+				basic_machine=ns32k-sequent
+				os=dynix
+				;;
+			blackfin)
+				basic_machine=bfin-unknown
+				os=linux
+				;;
+			cegcc)
+				basic_machine=arm-unknown
+				os=cegcc
+				;;
+			convex-c1)
+				basic_machine=c1-convex
+				os=bsd
+				;;
+			convex-c2)
+				basic_machine=c2-convex
+				os=bsd
+				;;
+			convex-c32)
+				basic_machine=c32-convex
+				os=bsd
+				;;
+			convex-c34)
+				basic_machine=c34-convex
+				os=bsd
+				;;
+			convex-c38)
+				basic_machine=c38-convex
+				os=bsd
+				;;
+			cray)
+				basic_machine=j90-cray
+				os=unicos
+				;;
+			crds | unos)
+				basic_machine=m68k-crds
+				os=
+				;;
+			da30)
+				basic_machine=m68k-da30
+				os=
+				;;
+			decstation | pmax | pmin | dec3100 | decstatn)
+				basic_machine=mips-dec
+				os=
+				;;
+			delta88)
+				basic_machine=m88k-motorola
+				os=sysv3
+				;;
+			dicos)
+				basic_machine=i686-pc
+				os=dicos
+				;;
+			djgpp)
+				basic_machine=i586-pc
+				os=msdosdjgpp
+				;;
+			ebmon29k)
+				basic_machine=a29k-amd
+				os=ebmon
+				;;
+			es1800 | OSE68k | ose68k | ose | OSE)
+				basic_machine=m68k-ericsson
+				os=ose
+				;;
+			gmicro)
+				basic_machine=tron-gmicro
+				os=sysv
+				;;
+			go32)
+				basic_machine=i386-pc
+				os=go32
+				;;
+			h8300hms)
+				basic_machine=h8300-hitachi
+				os=hms
+				;;
+			h8300xray)
+				basic_machine=h8300-hitachi
+				os=xray
+				;;
+			h8500hms)
+				basic_machine=h8500-hitachi
+				os=hms
+				;;
+			harris)
+				basic_machine=m88k-harris
+				os=sysv3
+				;;
+			hp300 | hp300hpux)
+				basic_machine=m68k-hp
+				os=hpux
+				;;
+			hp300bsd)
+				basic_machine=m68k-hp
+				os=bsd
+				;;
+			hppaosf)
+				basic_machine=hppa1.1-hp
+				os=osf
+				;;
+			hppro)
+				basic_machine=hppa1.1-hp
+				os=proelf
+				;;
+			i386mach)
+				basic_machine=i386-mach
+				os=mach
+				;;
+			isi68 | isi)
+				basic_machine=m68k-isi
+				os=sysv
+				;;
+			m68knommu)
+				basic_machine=m68k-unknown
+				os=linux
+				;;
+			magnum | m3230)
+				basic_machine=mips-mips
+				os=sysv
+				;;
+			merlin)
+				basic_machine=ns32k-utek
+				os=sysv
+				;;
+			mingw64)
+				basic_machine=x86_64-pc
+				os=mingw64
+				;;
+			mingw32)
+				basic_machine=i686-pc
+				os=mingw32
+				;;
+			mingw32ce)
+				basic_machine=arm-unknown
+				os=mingw32ce
+				;;
+			monitor)
+				basic_machine=m68k-rom68k
+				os=coff
+				;;
+			morphos)
+				basic_machine=powerpc-unknown
+				os=morphos
+				;;
+			moxiebox)
+				basic_machine=moxie-unknown
+				os=moxiebox
+				;;
+			msdos)
+				basic_machine=i386-pc
+				os=msdos
+				;;
+			msys)
+				basic_machine=i686-pc
+				os=msys
+				;;
+			mvs)
+				basic_machine=i370-ibm
+				os=mvs
+				;;
+			nacl)
+				basic_machine=le32-unknown
+				os=nacl
+				;;
+			ncr3000)
+				basic_machine=i486-ncr
+				os=sysv4
+				;;
+			netbsd386)
+				basic_machine=i386-pc
+				os=netbsd
+				;;
+			netwinder)
+				basic_machine=armv4l-rebel
+				os=linux
+				;;
+			news | news700 | news800 | news900)
+				basic_machine=m68k-sony
+				os=newsos
+				;;
+			news1000)
+				basic_machine=m68030-sony
+				os=newsos
+				;;
+			necv70)
+				basic_machine=v70-nec
+				os=sysv
+				;;
+			nh3000)
+				basic_machine=m68k-harris
+				os=cxux
+				;;
+			nh[45]000)
+				basic_machine=m88k-harris
+				os=cxux
+				;;
+			nindy960)
+				basic_machine=i960-intel
+				os=nindy
+				;;
+			mon960)
+				basic_machine=i960-intel
+				os=mon960
+				;;
+			nonstopux)
+				basic_machine=mips-compaq
+				os=nonstopux
+				;;
+			os400)
+				basic_machine=powerpc-ibm
+				os=os400
+				;;
+			OSE68000 | ose68000)
+				basic_machine=m68000-ericsson
+				os=ose
+				;;
+			os68k)
+				basic_machine=m68k-none
+				os=os68k
+				;;
+			paragon)
+				basic_machine=i860-intel
+				os=osf
+				;;
+			parisc)
+				basic_machine=hppa-unknown
+				os=linux
+				;;
+			psp)
+				basic_machine=mipsallegrexel-sony
+				os=psp
+				;;
+			pw32)
+				basic_machine=i586-unknown
+				os=pw32
+				;;
+			rdos | rdos64)
+				basic_machine=x86_64-pc
+				os=rdos
+				;;
+			rdos32)
+				basic_machine=i386-pc
+				os=rdos
+				;;
+			rom68k)
+				basic_machine=m68k-rom68k
+				os=coff
+				;;
+			sa29200)
+				basic_machine=a29k-amd
+				os=udi
+				;;
+			sei)
+				basic_machine=mips-sei
+				os=seiux
+				;;
+			sequent)
+				basic_machine=i386-sequent
+				os=
+				;;
+			sps7)
+				basic_machine=m68k-bull
+				os=sysv2
+				;;
+			st2000)
+				basic_machine=m68k-tandem
+				os=
+				;;
+			stratus)
+				basic_machine=i860-stratus
+				os=sysv4
+				;;
+			sun2)
+				basic_machine=m68000-sun
+				os=
+				;;
+			sun2os3)
+				basic_machine=m68000-sun
+				os=sunos3
+				;;
+			sun2os4)
+				basic_machine=m68000-sun
+				os=sunos4
+				;;
+			sun3)
+				basic_machine=m68k-sun
+				os=
+				;;
+			sun3os3)
+				basic_machine=m68k-sun
+				os=sunos3
+				;;
+			sun3os4)
+				basic_machine=m68k-sun
+				os=sunos4
+				;;
+			sun4)
+				basic_machine=sparc-sun
+				os=
+				;;
+			sun4os3)
+				basic_machine=sparc-sun
+				os=sunos3
+				;;
+			sun4os4)
+				basic_machine=sparc-sun
+				os=sunos4
+				;;
+			sun4sol2)
+				basic_machine=sparc-sun
+				os=solaris2
+				;;
+			sun386 | sun386i | roadrunner)
+				basic_machine=i386-sun
+				os=
+				;;
+			sv1)
+				basic_machine=sv1-cray
+				os=unicos
+				;;
+			symmetry)
+				basic_machine=i386-sequent
+				os=dynix
+				;;
+			t3e)
+				basic_machine=alphaev5-cray
+				os=unicos
+				;;
+			t90)
+				basic_machine=t90-cray
+				os=unicos
+				;;
+			toad1)
+				basic_machine=pdp10-xkl
+				os=tops20
+				;;
+			tpf)
+				basic_machine=s390x-ibm
+				os=tpf
+				;;
+			udi29k)
+				basic_machine=a29k-amd
+				os=udi
+				;;
+			ultra3)
+				basic_machine=a29k-nyu
+				os=sym1
+				;;
+			v810 | necv810)
+				basic_machine=v810-nec
+				os=none
+				;;
+			vaxv)
+				basic_machine=vax-dec
+				os=sysv
+				;;
+			vms)
+				basic_machine=vax-dec
+				os=vms
+				;;
+			vsta)
+				basic_machine=i386-pc
+				os=vsta
+				;;
+			vxworks960)
+				basic_machine=i960-wrs
+				os=vxworks
+				;;
+			vxworks68)
+				basic_machine=m68k-wrs
+				os=vxworks
+				;;
+			vxworks29k)
+				basic_machine=a29k-wrs
+				os=vxworks
+				;;
+			xbox)
+				basic_machine=i686-pc
+				os=mingw32
+				;;
+			ymp)
+				basic_machine=ymp-cray
+				os=unicos
+				;;
+			*)
+				basic_machine=$1
+				os=
+				;;
+		esac
 		;;
 esac
 
-# Decode aliases for certain CPU-COMPANY combinations.
+# Decode 1-component or ad-hoc basic machines
 case $basic_machine in
-	# Recognize the basic CPU types without company name.
-	# Some are omitted here because they have special meanings below.
-	1750a | 580 \
-	| a29k \
-	| aarch64 | aarch64_be \
-	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
-	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
-	| am33_2.0 \
-	| arc | arceb \
-	| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
-	| avr | avr32 \
-	| ba \
-	| be32 | be64 \
-	| bfin \
-	| c4x | c8051 | clipper \
-	| d10v | d30v | dlx | dsp16xx | dvp \
-	| e2k | epiphany \
-	| fido | fr30 | frv | ft32 \
-	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
-	| hexagon \
-	| i370 | i860 | i960 | ia64 \
-	| ip2k | iq2000 \
-	| k1om \
-	| le32 | le64 \
-	| lm32 \
-	| m32c | m32r | m32rle | m68000 | m68k | m88k \
-	| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
-	| mips | mipsbe | mipseb | mipsel | mipsle \
-	| mips16 \
-	| mips64 | mips64el \
-	| mips64octeon | mips64octeonel \
-	| mips64orion | mips64orionel \
-	| mips64r5900 | mips64r5900el \
-	| mips64vr | mips64vrel \
-	| mips64vr4100 | mips64vr4100el \
-	| mips64vr4300 | mips64vr4300el \
-	| mips64vr5000 | mips64vr5000el \
-	| mips64vr5900 | mips64vr5900el \
-	| mipsisa32 | mipsisa32el \
-	| mipsisa32r2 | mipsisa32r2el \
-	| mipsisa32r6 | mipsisa32r6el \
-	| mipsisa64 | mipsisa64el \
-	| mipsisa64r2 | mipsisa64r2el \
-	| mipsisa64r6 | mipsisa64r6el \
-	| mipsisa64sb1 | mipsisa64sb1el \
-	| mipsisa64sr71k | mipsisa64sr71kel \
-	| mipsr5900 | mipsr5900el \
-	| mipstx39 | mipstx39el \
-	| mn10200 | mn10300 \
-	| moxie \
-	| mt \
-	| msp430 \
-	| nds32 | nds32le | nds32be \
-	| nios | nios2 | nios2eb | nios2el \
-	| ns16k | ns32k \
-	| open8 | or1k | or1knd | or32 \
-	| pdp10 | pdp11 | pj | pjl \
-	| powerpc | powerpc64 | powerpc64le | powerpcle \
-	| pyramid \
-	| riscv32 | riscv64 \
-	| rl78 | rx \
-	| score \
-	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
-	| sh64 | sh64le \
-	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
-	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
-	| spu \
-	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
-	| ubicom32 \
-	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
-	| visium \
-	| we32k \
-	| x86 | xc16x | xstormy16 | xtensa \
-	| z8k | z80)
-		basic_machine=$basic_machine-unknown
-		;;
-	c54x)
-		basic_machine=tic54x-unknown
-		;;
-	c55x)
-		basic_machine=tic55x-unknown
-		;;
-	c6x)
-		basic_machine=tic6x-unknown
-		;;
-	leon|leon[3-9])
-		basic_machine=sparc-$basic_machine
-		;;
-	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
-		basic_machine=$basic_machine-unknown
-		os=-none
+	# Here we handle the default manufacturer of certain CPU types.  It is in
+	# some cases the only manufacturer, in others, it is the most popular.
+	w89k)
+		cpu=hppa1.1
+		vendor=winbond
 		;;
-	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+	op50n)
+		cpu=hppa1.1
+		vendor=oki
 		;;
-	ms1)
-		basic_machine=mt-unknown
+	op60c)
+		cpu=hppa1.1
+		vendor=oki
 		;;
-
-	strongarm | thumb | xscale)
-		basic_machine=arm-unknown
+	ibm*)
+		cpu=i370
+		vendor=ibm
 		;;
-	xgate)
-		basic_machine=$basic_machine-unknown
-		os=-none
+	orion105)
+		cpu=clipper
+		vendor=highlevel
 		;;
-	xscaleeb)
-		basic_machine=armeb-unknown
+	mac | mpw | mac-mpw)
+		cpu=m68k
+		vendor=apple
 		;;
-
-	xscaleel)
-		basic_machine=armel-unknown
+	pmac | pmac-mpw)
+		cpu=powerpc
+		vendor=apple
 		;;
 
-	# We use `pc' rather than `unknown'
-	# because (1) that's what they normally are, and
-	# (2) the word "unknown" tends to confuse beginning users.
-	i*86 | x86_64)
-	  basic_machine=$basic_machine-pc
-	  ;;
-	# Object if more than one company name word.
-	*-*-*)
-		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-		exit 1
-		;;
-	# Recognize the basic CPU types with company name.
-	580-* \
-	| a29k-* \
-	| aarch64-* | aarch64_be-* \
-	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
-	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
-	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
-	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
-	| avr-* | avr32-* \
-	| ba-* \
-	| be32-* | be64-* \
-	| bfin-* | bs2000-* \
-	| c[123]* | c30-* | [cjt]90-* | c4x-* \
-	| c8051-* | clipper-* | craynv-* | cydra-* \
-	| d10v-* | d30v-* | dlx-* \
-	| e2k-* | elxsi-* \
-	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
-	| h8300-* | h8500-* \
-	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
-	| hexagon-* \
-	| i*86-* | i860-* | i960-* | ia64-* \
-	| ip2k-* | iq2000-* \
-	| k1om-* \
-	| le32-* | le64-* \
-	| lm32-* \
-	| m32c-* | m32r-* | m32rle-* \
-	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
-	| microblaze-* | microblazeel-* \
-	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
-	| mips16-* \
-	| mips64-* | mips64el-* \
-	| mips64octeon-* | mips64octeonel-* \
-	| mips64orion-* | mips64orionel-* \
-	| mips64r5900-* | mips64r5900el-* \
-	| mips64vr-* | mips64vrel-* \
-	| mips64vr4100-* | mips64vr4100el-* \
-	| mips64vr4300-* | mips64vr4300el-* \
-	| mips64vr5000-* | mips64vr5000el-* \
-	| mips64vr5900-* | mips64vr5900el-* \
-	| mipsisa32-* | mipsisa32el-* \
-	| mipsisa32r2-* | mipsisa32r2el-* \
-	| mipsisa32r6-* | mipsisa32r6el-* \
-	| mipsisa64-* | mipsisa64el-* \
-	| mipsisa64r2-* | mipsisa64r2el-* \
-	| mipsisa64r6-* | mipsisa64r6el-* \
-	| mipsisa64sb1-* | mipsisa64sb1el-* \
-	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
-	| mipsr5900-* | mipsr5900el-* \
-	| mipstx39-* | mipstx39el-* \
-	| mmix-* \
-	| mt-* \
-	| msp430-* \
-	| nds32-* | nds32le-* | nds32be-* \
-	| nios-* | nios2-* | nios2eb-* | nios2el-* \
-	| none-* | np1-* | ns16k-* | ns32k-* \
-	| open8-* \
-	| or1k*-* \
-	| orion-* \
-	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
-	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
-	| pyramid-* \
-	| riscv32-* | riscv64-* \
-	| rl78-* | romp-* | rs6000-* | rx-* \
-	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
-	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
-	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
-	| sparclite-* \
-	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
-	| tahoe-* \
-	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
-	| tile*-* \
-	| tron-* \
-	| ubicom32-* \
-	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
-	| vax-* \
-	| visium-* \
-	| we32k-* \
-	| x86-* | x86_64-* | xc16x-* | xps100-* \
-	| xstormy16-* | xtensa*-* \
-	| ymp-* \
-	| z8k-* | z80-*)
-		;;
-	# Recognize the basic CPU types without company name, with glob match.
-	xtensa*)
-		basic_machine=$basic_machine-unknown
-		;;
 	# Recognize the various machine names and aliases which stand
 	# for a CPU type and a company and sometimes even an OS.
-	386bsd)
-		basic_machine=i386-unknown
-		os=-bsd
-		;;
 	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
-		basic_machine=m68000-att
+		cpu=m68000
+		vendor=att
 		;;
 	3b*)
-		basic_machine=we32k-att
-		;;
-	a29khif)
-		basic_machine=a29k-amd
-		os=-udi
-		;;
-	abacus)
-		basic_machine=abacus-unknown
-		;;
-	adobe68k)
-		basic_machine=m68010-adobe
-		os=-scout
-		;;
-	alliant | fx80)
-		basic_machine=fx80-alliant
-		;;
-	altos | altos3068)
-		basic_machine=m68k-altos
-		;;
-	am29k)
-		basic_machine=a29k-none
-		os=-bsd
-		;;
-	amd64)
-		basic_machine=x86_64-pc
-		;;
-	amd64-*)
-		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	amdahl)
-		basic_machine=580-amdahl
-		os=-sysv
-		;;
-	amiga | amiga-*)
-		basic_machine=m68k-unknown
-		;;
-	amigaos | amigados)
-		basic_machine=m68k-unknown
-		os=-amigaos
-		;;
-	amigaunix | amix)
-		basic_machine=m68k-unknown
-		os=-sysv4
-		;;
-	apollo68)
-		basic_machine=m68k-apollo
-		os=-sysv
-		;;
-	apollo68bsd)
-		basic_machine=m68k-apollo
-		os=-bsd
-		;;
-	aros)
-		basic_machine=i386-pc
-		os=-aros
-		;;
-	asmjs)
-		basic_machine=asmjs-unknown
-		;;
-	aux)
-		basic_machine=m68k-apple
-		os=-aux
-		;;
-	balance)
-		basic_machine=ns32k-sequent
-		os=-dynix
-		;;
-	blackfin)
-		basic_machine=bfin-unknown
-		os=-linux
-		;;
-	blackfin-*)
-		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
-		os=-linux
+		cpu=we32k
+		vendor=att
 		;;
 	bluegene*)
-		basic_machine=powerpc-ibm
-		os=-cnk
-		;;
-	c54x-*)
-		basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	c55x-*)
-		basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	c6x-*)
-		basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	c90)
-		basic_machine=c90-cray
-		os=-unicos
-		;;
-	cegcc)
-		basic_machine=arm-unknown
-		os=-cegcc
-		;;
-	convex-c1)
-		basic_machine=c1-convex
-		os=-bsd
-		;;
-	convex-c2)
-		basic_machine=c2-convex
-		os=-bsd
-		;;
-	convex-c32)
-		basic_machine=c32-convex
-		os=-bsd
-		;;
-	convex-c34)
-		basic_machine=c34-convex
-		os=-bsd
-		;;
-	convex-c38)
-		basic_machine=c38-convex
-		os=-bsd
-		;;
-	cray | j90)
-		basic_machine=j90-cray
-		os=-unicos
-		;;
-	craynv)
-		basic_machine=craynv-cray
-		os=-unicosmp
-		;;
-	cr16 | cr16-*)
-		basic_machine=cr16-unknown
-		os=-elf
-		;;
-	crds | unos)
-		basic_machine=m68k-crds
-		;;
-	crisv32 | crisv32-* | etraxfs*)
-		basic_machine=crisv32-axis
-		;;
-	cris | cris-* | etrax*)
-		basic_machine=cris-axis
-		;;
-	crx)
-		basic_machine=crx-unknown
-		os=-elf
-		;;
-	da30 | da30-*)
-		basic_machine=m68k-da30
-		;;
-	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
-		basic_machine=mips-dec
+		cpu=powerpc
+		vendor=ibm
+		os=cnk
 		;;
 	decsystem10* | dec10*)
-		basic_machine=pdp10-dec
-		os=-tops10
+		cpu=pdp10
+		vendor=dec
+		os=tops10
 		;;
 	decsystem20* | dec20*)
-		basic_machine=pdp10-dec
-		os=-tops20
+		cpu=pdp10
+		vendor=dec
+		os=tops20
 		;;
 	delta | 3300 | motorola-3300 | motorola-delta \
 	      | 3300-motorola | delta-motorola)
-		basic_machine=m68k-motorola
-		;;
-	delta88)
-		basic_machine=m88k-motorola
-		os=-sysv3
-		;;
-	dicos)
-		basic_machine=i686-pc
-		os=-dicos
+		cpu=m68k
+		vendor=motorola
 		;;
-	djgpp)
-		basic_machine=i586-pc
-		os=-msdosdjgpp
-		;;
-	dpx20 | dpx20-*)
-		basic_machine=rs6000-bull
-		os=-bosx
-		;;
-	dpx2* | dpx2*-bull)
-		basic_machine=m68k-bull
-		os=-sysv3
-		;;
-	ebmon29k)
-		basic_machine=a29k-amd
-		os=-ebmon
-		;;
-	elxsi)
-		basic_machine=elxsi-elxsi
-		os=-bsd
+	dpx2*)
+		cpu=m68k
+		vendor=bull
+		os=sysv3
 		;;
 	encore | umax | mmax)
-		basic_machine=ns32k-encore
+		cpu=ns32k
+		vendor=encore
 		;;
-	es1800 | OSE68k | ose68k | ose | OSE)
-		basic_machine=m68k-ericsson
-		os=-ose
+	elxsi)
+		cpu=elxsi
+		vendor=elxsi
+		os=${os:-bsd}
 		;;
 	fx2800)
-		basic_machine=i860-alliant
+		cpu=i860
+		vendor=alliant
 		;;
 	genix)
-		basic_machine=ns32k-ns
-		;;
-	gmicro)
-		basic_machine=tron-gmicro
-		os=-sysv
-		;;
-	go32)
-		basic_machine=i386-pc
-		os=-go32
+		cpu=ns32k
+		vendor=ns
 		;;
 	h3050r* | hiux*)
-		basic_machine=hppa1.1-hitachi
-		os=-hiuxwe2
-		;;
-	h8300hms)
-		basic_machine=h8300-hitachi
-		os=-hms
-		;;
-	h8300xray)
-		basic_machine=h8300-hitachi
-		os=-xray
-		;;
-	h8500hms)
-		basic_machine=h8500-hitachi
-		os=-hms
-		;;
-	harris)
-		basic_machine=m88k-harris
-		os=-sysv3
-		;;
-	hp300-*)
-		basic_machine=m68k-hp
-		;;
-	hp300bsd)
-		basic_machine=m68k-hp
-		os=-bsd
-		;;
-	hp300hpux)
-		basic_machine=m68k-hp
-		os=-hpux
+		cpu=hppa1.1
+		vendor=hitachi
+		os=hiuxwe2
 		;;
 	hp3k9[0-9][0-9] | hp9[0-9][0-9])
-		basic_machine=hppa1.0-hp
+		cpu=hppa1.0
+		vendor=hp
 		;;
 	hp9k2[0-9][0-9] | hp9k31[0-9])
-		basic_machine=m68000-hp
+		cpu=m68000
+		vendor=hp
 		;;
 	hp9k3[2-9][0-9])
-		basic_machine=m68k-hp
+		cpu=m68k
+		vendor=hp
 		;;
 	hp9k6[0-9][0-9] | hp6[0-9][0-9])
-		basic_machine=hppa1.0-hp
+		cpu=hppa1.0
+		vendor=hp
 		;;
 	hp9k7[0-79][0-9] | hp7[0-79][0-9])
-		basic_machine=hppa1.1-hp
+		cpu=hppa1.1
+		vendor=hp
 		;;
 	hp9k78[0-9] | hp78[0-9])
 		# FIXME: really hppa2.0-hp
-		basic_machine=hppa1.1-hp
+		cpu=hppa1.1
+		vendor=hp
 		;;
 	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
 		# FIXME: really hppa2.0-hp
-		basic_machine=hppa1.1-hp
+		cpu=hppa1.1
+		vendor=hp
 		;;
 	hp9k8[0-9][13679] | hp8[0-9][13679])
-		basic_machine=hppa1.1-hp
+		cpu=hppa1.1
+		vendor=hp
 		;;
 	hp9k8[0-9][0-9] | hp8[0-9][0-9])
-		basic_machine=hppa1.0-hp
-		;;
-	hppa-next)
-		os=-nextstep3
-		;;
-	hppaosf)
-		basic_machine=hppa1.1-hp
-		os=-osf
-		;;
-	hppro)
-		basic_machine=hppa1.1-hp
-		os=-proelf
-		;;
-	i370-ibm* | ibm*)
-		basic_machine=i370-ibm
+		cpu=hppa1.0
+		vendor=hp
 		;;
 	i*86v32)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv32
+		cpu=`echo "$1" | sed -e 's/86.*/86/'`
+		vendor=pc
+		os=sysv32
 		;;
 	i*86v4*)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv4
+		cpu=`echo "$1" | sed -e 's/86.*/86/'`
+		vendor=pc
+		os=sysv4
 		;;
 	i*86v)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv
+		cpu=`echo "$1" | sed -e 's/86.*/86/'`
+		vendor=pc
+		os=sysv
 		;;
 	i*86sol2)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-solaris2
-		;;
-	i386mach)
-		basic_machine=i386-mach
-		os=-mach
+		cpu=`echo "$1" | sed -e 's/86.*/86/'`
+		vendor=pc
+		os=solaris2
 		;;
-	i386-vsta | vsta)
-		basic_machine=i386-unknown
-		os=-vsta
+	j90 | j90-cray)
+		cpu=j90
+		vendor=cray
+		os=${os:-unicos}
 		;;
 	iris | iris4d)
-		basic_machine=mips-sgi
+		cpu=mips
+		vendor=sgi
 		case $os in
-		    -irix*)
+		    irix*)
 			;;
 		    *)
-			os=-irix4
+			os=irix4
 			;;
 		esac
 		;;
-	isi68 | isi)
-		basic_machine=m68k-isi
-		os=-sysv
-		;;
-	leon-*|leon[3-9]-*)
-		basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
-		;;
-	m68knommu)
-		basic_machine=m68k-unknown
-		os=-linux
-		;;
-	m68knommu-*)
-		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
-		os=-linux
-		;;
-	m88k-omron*)
-		basic_machine=m88k-omron
-		;;
-	magnum | m3230)
-		basic_machine=mips-mips
-		os=-sysv
-		;;
-	merlin)
-		basic_machine=ns32k-utek
-		os=-sysv
-		;;
-	microblaze*)
-		basic_machine=microblaze-xilinx
-		;;
-	mingw64)
-		basic_machine=x86_64-pc
-		os=-mingw64
-		;;
-	mingw32)
-		basic_machine=i686-pc
-		os=-mingw32
-		;;
-	mingw32ce)
-		basic_machine=arm-unknown
-		os=-mingw32ce
-		;;
 	miniframe)
-		basic_machine=m68000-convergent
+		cpu=m68000
+		vendor=convergent
 		;;
-	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
-		basic_machine=m68k-atari
-		os=-mint
+	*mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
+		cpu=m68k
+		vendor=atari
+		os=mint
 		;;
-	mipsEE* | ee | ps2)
-		basic_machine=mips64r5900el-scei
+	mipsEE* | ee)
+		cpu=mips64r5900el
+		vendor=scei
 		case $os in
-		    -linux*)
+		    linux*)
 			;;
 		    *)
-			os=-elf
+			os=elf
 			;;
 		esac
 		;;
 	iop)
-		basic_machine=mipsel-scei
-		os=-irx
+		cpu=mipsel
+		vendor=scei
+		os=irx
 		;;
 	dvp)
-		basic_machine=dvp-scei
-		os=-elf
-		;;
-	mips3*-*)
-		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
-		;;
-	mips3*)
-		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
-		;;
-	monitor)
-		basic_machine=m68k-rom68k
-		os=-coff
-		;;
-	morphos)
-		basic_machine=powerpc-unknown
-		os=-morphos
-		;;
-	moxiebox)
-		basic_machine=moxie-unknown
-		os=-moxiebox
-		;;
-	msdos)
-		basic_machine=i386-pc
-		os=-msdos
-		;;
-	ms1-*)
-		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
-		;;
-	msys)
-		basic_machine=i686-pc
-		os=-msys
-		;;
-	mvs)
-		basic_machine=i370-ibm
-		os=-mvs
-		;;
-	nacl)
-		basic_machine=le32-unknown
-		os=-nacl
-		;;
-	ncr3000)
-		basic_machine=i486-ncr
-		os=-sysv4
-		;;
-	netbsd386)
-		basic_machine=i386-unknown
-		os=-netbsd
-		;;
-	netwinder)
-		basic_machine=armv4l-rebel
-		os=-linux
-		;;
-	news | news700 | news800 | news900)
-		basic_machine=m68k-sony
-		os=-newsos
-		;;
-	news1000)
-		basic_machine=m68030-sony
-		os=-newsos
+		cpu=dvp
+		vendor=scei
+		os=elf
 		;;
 	news-3600 | risc-news)
-		basic_machine=mips-sony
-		os=-newsos
-		;;
-	necv70)
-		basic_machine=v70-nec
-		os=-sysv
+		cpu=mips
+		vendor=sony
+		os=newsos
 		;;
-	next | m*-next )
-		basic_machine=m68k-next
+	next | m*-next)
+		cpu=m68k
+		vendor=next
 		case $os in
-		    -nextstep* )
+		    openstep*)
+		        ;;
+		    nextstep*)
 			;;
-		    -ns2*)
-		      os=-nextstep2
+		    ns2*)
+		      os=nextstep2
 			;;
 		    *)
-		      os=-nextstep3
+		      os=nextstep3
 			;;
 		esac
 		;;
-	nh3000)
-		basic_machine=m68k-harris
-		os=-cxux
-		;;
-	nh[45]000)
-		basic_machine=m88k-harris
-		os=-cxux
-		;;
-	nindy960)
-		basic_machine=i960-intel
-		os=-nindy
-		;;
-	mon960)
-		basic_machine=i960-intel
-		os=-mon960
-		;;
-	nonstopux)
-		basic_machine=mips-compaq
-		os=-nonstopux
-		;;
 	np1)
-		basic_machine=np1-gould
-		;;
-	neo-tandem)
-		basic_machine=neo-tandem
-		;;
-	nse-tandem)
-		basic_machine=nse-tandem
-		;;
-	nsr-tandem)
-		basic_machine=nsr-tandem
+		cpu=np1
+		vendor=gould
 		;;
 	op50n-* | op60c-*)
-		basic_machine=hppa1.1-oki
-		os=-proelf
-		;;
-	openrisc | openrisc-*)
-		basic_machine=or32-unknown
-		;;
-	os400)
-		basic_machine=powerpc-ibm
-		os=-os400
-		;;
-	OSE68000 | ose68000)
-		basic_machine=m68000-ericsson
-		os=-ose
-		;;
-	os68k)
-		basic_machine=m68k-none
-		os=-os68k
+		cpu=hppa1.1
+		vendor=oki
+		os=proelf
 		;;
 	pa-hitachi)
-		basic_machine=hppa1.1-hitachi
-		os=-hiuxwe2
-		;;
-	paragon)
-		basic_machine=i860-intel
-		os=-osf
-		;;
-	parisc)
-		basic_machine=hppa-unknown
-		os=-linux
-		;;
-	parisc-*)
-		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
-		os=-linux
+		cpu=hppa1.1
+		vendor=hitachi
+		os=hiuxwe2
 		;;
 	pbd)
-		basic_machine=sparc-tti
+		cpu=sparc
+		vendor=tti
 		;;
 	pbb)
-		basic_machine=m68k-tti
-		;;
-	pc532 | pc532-*)
-		basic_machine=ns32k-pc532
+		cpu=m68k
+		vendor=tti
 		;;
-	pc98)
-		basic_machine=i386-pc
-		;;
-	pc98-*)
-		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentium | p5 | k5 | k6 | nexgen | viac3)
-		basic_machine=i586-pc
-		;;
-	pentiumpro | p6 | 6x86 | athlon | athlon_*)
-		basic_machine=i686-pc
-		;;
-	pentiumii | pentium2 | pentiumiii | pentium3)
-		basic_machine=i686-pc
-		;;
-	pentium4)
-		basic_machine=i786-pc
-		;;
-	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
-		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentiumpro-* | p6-* | 6x86-* | athlon-*)
-		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
-		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentium4-*)
-		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+	pc532)
+		cpu=ns32k
+		vendor=pc532
 		;;
 	pn)
-		basic_machine=pn-gould
-		;;
-	power)	basic_machine=power-ibm
+		cpu=pn
+		vendor=gould
 		;;
-	ppc | ppcbe)	basic_machine=powerpc-unknown
-		;;
-	ppc-* | ppcbe-*)
-		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ppcle | powerpclittle | ppc-le | powerpc-little)
-		basic_machine=powerpcle-unknown
-		;;
-	ppcle-* | powerpclittle-*)
-		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ppc64)	basic_machine=powerpc64-unknown
-		;;
-	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
-		basic_machine=powerpc64le-unknown
-		;;
-	ppc64le-* | powerpc64little-*)
-		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+	power)
+		cpu=power
+		vendor=ibm
 		;;
 	ps2)
-		basic_machine=i386-ibm
-		;;
-	pw32)
-		basic_machine=i586-unknown
-		os=-pw32
-		;;
-	rdos | rdos64)
-		basic_machine=x86_64-pc
-		os=-rdos
-		;;
-	rdos32)
-		basic_machine=i386-pc
-		os=-rdos
-		;;
-	rom68k)
-		basic_machine=m68k-rom68k
-		os=-coff
+		cpu=i386
+		vendor=ibm
 		;;
 	rm[46]00)
-		basic_machine=mips-siemens
+		cpu=mips
+		vendor=siemens
 		;;
 	rtpc | rtpc-*)
-		basic_machine=romp-ibm
-		;;
-	s390 | s390-*)
-		basic_machine=s390-ibm
-		;;
-	s390x | s390x-*)
-		basic_machine=s390x-ibm
-		;;
-	sa29200)
-		basic_machine=a29k-amd
-		os=-udi
-		;;
-	sb1)
-		basic_machine=mipsisa64sb1-unknown
-		;;
-	sb1el)
-		basic_machine=mipsisa64sb1el-unknown
+		cpu=romp
+		vendor=ibm
 		;;
 	sde)
-		basic_machine=mipsisa32-sde
-		os=-elf
+		cpu=mipsisa32
+		vendor=sde
+		os=${os:-elf}
 		;;
-	sei)
-		basic_machine=mips-sei
-		os=-seiux
+	simso-wrs)
+		cpu=sparclite
+		vendor=wrs
+		os=vxworks
 		;;
-	sequent)
-		basic_machine=i386-sequent
+	tower | tower-32)
+		cpu=m68k
+		vendor=ncr
 		;;
-	sh)
-		basic_machine=sh-hitachi
-		os=-hms
+	vpp*|vx|vx-*)
+		cpu=f301
+		vendor=fujitsu
 		;;
-	sh5el)
-		basic_machine=sh5le-unknown
+	w65)
+		cpu=w65
+		vendor=wdc
 		;;
-	sh64)
-		basic_machine=sh64-unknown
+	w89k-*)
+		cpu=hppa1.1
+		vendor=winbond
+		os=proelf
 		;;
-	sparclite-wrs | simso-wrs)
-		basic_machine=sparclite-wrs
-		os=-vxworks
+	none)
+		cpu=none
+		vendor=none
 		;;
-	sps7)
-		basic_machine=m68k-bull
-		os=-sysv2
+	leon|leon[3-9])
+		cpu=sparc
+		vendor=$basic_machine
 		;;
-	spur)
-		basic_machine=spur-unknown
+	leon-*|leon[3-9]-*)
+		cpu=sparc
+		vendor=`echo "$basic_machine" | sed 's/-.*//'`
 		;;
-	st2000)
-		basic_machine=m68k-tandem
+
+	*-*)
+		# shellcheck disable=SC2162
+		IFS="-" read cpu vendor <<EOF
+$basic_machine
+EOF
 		;;
-	stratus)
-		basic_machine=i860-stratus
-		os=-sysv4
+	# We use `pc' rather than `unknown'
+	# because (1) that's what they normally are, and
+	# (2) the word "unknown" tends to confuse beginning users.
+	i*86 | x86_64)
+		cpu=$basic_machine
+		vendor=pc
 		;;
-	strongarm-* | thumb-*)
-		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+	# These rules are duplicated from below for sake of the special case above;
+	# i.e. things that normalized to x86 arches should also default to "pc"
+	pc98)
+		cpu=i386
+		vendor=pc
 		;;
-	sun2)
-		basic_machine=m68000-sun
+	x64 | amd64)
+		cpu=x86_64
+		vendor=pc
 		;;
-	sun2os3)
-		basic_machine=m68000-sun
-		os=-sunos3
+	# Recognize the basic CPU types without company name.
+	*)
+		cpu=$basic_machine
+		vendor=unknown
 		;;
-	sun2os4)
-		basic_machine=m68000-sun
-		os=-sunos4
+esac
+
+unset -v basic_machine
+
+# Decode basic machines in the full and proper CPU-Company form.
+case $cpu-$vendor in
+	# Here we handle the default manufacturer of certain CPU types in canonical form. It is in
+	# some cases the only manufacturer, in others, it is the most popular.
+	craynv-unknown)
+		vendor=cray
+		os=${os:-unicosmp}
 		;;
-	sun3os3)
-		basic_machine=m68k-sun
-		os=-sunos3
+	c90-unknown | c90-cray)
+		vendor=cray
+		os=${os:-unicos}
 		;;
-	sun3os4)
-		basic_machine=m68k-sun
-		os=-sunos4
+	fx80-unknown)
+		vendor=alliant
 		;;
-	sun4os3)
-		basic_machine=sparc-sun
-		os=-sunos3
+	romp-unknown)
+		vendor=ibm
 		;;
-	sun4os4)
-		basic_machine=sparc-sun
-		os=-sunos4
+	mmix-unknown)
+		vendor=knuth
 		;;
-	sun4sol2)
-		basic_machine=sparc-sun
-		os=-solaris2
+	microblaze-unknown | microblazeel-unknown)
+		vendor=xilinx
 		;;
-	sun3 | sun3-*)
-		basic_machine=m68k-sun
+	rs6000-unknown)
+		vendor=ibm
 		;;
-	sun4)
-		basic_machine=sparc-sun
+	vax-unknown)
+		vendor=dec
 		;;
-	sun386 | sun386i | roadrunner)
-		basic_machine=i386-sun
+	pdp11-unknown)
+		vendor=dec
 		;;
-	sv1)
-		basic_machine=sv1-cray
-		os=-unicos
+	we32k-unknown)
+		vendor=att
 		;;
-	symmetry)
-		basic_machine=i386-sequent
-		os=-dynix
+	cydra-unknown)
+		vendor=cydrome
 		;;
-	t3e)
-		basic_machine=alphaev5-cray
-		os=-unicos
+	i370-ibm*)
+		vendor=ibm
 		;;
-	t90)
-		basic_machine=t90-cray
-		os=-unicos
+	orion-unknown)
+		vendor=highlevel
 		;;
-	tile*)
-		basic_machine=$basic_machine-unknown
-		os=-linux-gnu
+	xps-unknown | xps100-unknown)
+		cpu=xps100
+		vendor=honeywell
 		;;
-	tx39)
-		basic_machine=mipstx39-unknown
+
+	# Here we normalize CPU types with a missing or matching vendor
+	dpx20-unknown | dpx20-bull)
+		cpu=rs6000
+		vendor=bull
+		os=${os:-bosx}
 		;;
-	tx39el)
-		basic_machine=mipstx39el-unknown
+
+	# Here we normalize CPU types irrespective of the vendor
+	amd64-*)
+		cpu=x86_64
 		;;
-	toad1)
-		basic_machine=pdp10-xkl
-		os=-tops20
+	blackfin-*)
+		cpu=bfin
+		os=linux
 		;;
-	tower | tower-32)
-		basic_machine=m68k-ncr
+	c54x-*)
+		cpu=tic54x
 		;;
-	tpf)
-		basic_machine=s390x-ibm
-		os=-tpf
+	c55x-*)
+		cpu=tic55x
 		;;
-	udi29k)
-		basic_machine=a29k-amd
-		os=-udi
+	c6x-*)
+		cpu=tic6x
 		;;
-	ultra3)
-		basic_machine=a29k-nyu
-		os=-sym1
+	e500v[12]-*)
+		cpu=powerpc
+		os=$os"spe"
 		;;
-	v810 | necv810)
-		basic_machine=v810-nec
-		os=-none
+	mips3*-*)
+		cpu=mips64
 		;;
-	vaxv)
-		basic_machine=vax-dec
-		os=-sysv
+	ms1-*)
+		cpu=mt
 		;;
-	vms)
-		basic_machine=vax-dec
-		os=-vms
+	m68knommu-*)
+		cpu=m68k
+		os=linux
 		;;
-	vpp*|vx|vx-*)
-		basic_machine=f301-fujitsu
+	m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
+		cpu=s12z
 		;;
-	vxworks960)
-		basic_machine=i960-wrs
-		os=-vxworks
+	openrisc-*)
+		cpu=or32
 		;;
-	vxworks68)
-		basic_machine=m68k-wrs
-		os=-vxworks
+	parisc-*)
+		cpu=hppa
+		os=linux
 		;;
-	vxworks29k)
-		basic_machine=a29k-wrs
-		os=-vxworks
+	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+		cpu=i586
 		;;
-	w65*)
-		basic_machine=w65-wdc
-		os=-none
+	pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
+		cpu=i686
 		;;
-	w89k-*)
-		basic_machine=hppa1.1-winbond
-		os=-proelf
+	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+		cpu=i686
 		;;
-	xbox)
-		basic_machine=i686-pc
-		os=-mingw32
+	pentium4-*)
+		cpu=i786
 		;;
-	xps | xps100)
-		basic_machine=xps100-honeywell
+	pc98-*)
+		cpu=i386
 		;;
-	xscale-* | xscalee[bl]-*)
-		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+	ppc-* | ppcbe-*)
+		cpu=powerpc
 		;;
-	ymp)
-		basic_machine=ymp-cray
-		os=-unicos
+	ppcle-* | powerpclittle-*)
+		cpu=powerpcle
 		;;
-	z8k-*-coff)
-		basic_machine=z8k-unknown
-		os=-sim
+	ppc64-*)
+		cpu=powerpc64
 		;;
-	z80-*-coff)
-		basic_machine=z80-unknown
-		os=-sim
+	ppc64le-* | powerpc64little-*)
+		cpu=powerpc64le
 		;;
-	none)
-		basic_machine=none-none
-		os=-none
+	sb1-*)
+		cpu=mipsisa64sb1
 		;;
-
-# Here we handle the default manufacturer of certain CPU types.  It is in
-# some cases the only manufacturer, in others, it is the most popular.
-	w89k)
-		basic_machine=hppa1.1-winbond
+	sb1el-*)
+		cpu=mipsisa64sb1el
 		;;
-	op50n)
-		basic_machine=hppa1.1-oki
+	sh5e[lb]-*)
+		cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'`
 		;;
-	op60c)
-		basic_machine=hppa1.1-oki
+	spur-*)
+		cpu=spur
 		;;
-	romp)
-		basic_machine=romp-ibm
+	strongarm-* | thumb-*)
+		cpu=arm
 		;;
-	mmix)
-		basic_machine=mmix-knuth
+	tx39-*)
+		cpu=mipstx39
 		;;
-	rs6000)
-		basic_machine=rs6000-ibm
+	tx39el-*)
+		cpu=mipstx39el
 		;;
-	vax)
-		basic_machine=vax-dec
+	x64-*)
+		cpu=x86_64
 		;;
-	pdp10)
-		# there are many clones, so DEC is not a safe bet
-		basic_machine=pdp10-unknown
+	xscale-* | xscalee[bl]-*)
+		cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
 		;;
-	pdp11)
-		basic_machine=pdp11-dec
+
+	# Recognize the canonical CPU Types that limit and/or modify the
+	# company names they are paired with.
+	cr16-*)
+		os=${os:-elf}
 		;;
-	we32k)
-		basic_machine=we32k-att
+	crisv32-* | etraxfs*-*)
+		cpu=crisv32
+		vendor=axis
 		;;
-	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
-		basic_machine=sh-unknown
+	cris-* | etrax*-*)
+		cpu=cris
+		vendor=axis
 		;;
-	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
-		basic_machine=sparc-sun
+	crx-*)
+		os=${os:-elf}
 		;;
-	cydra)
-		basic_machine=cydra-cydrome
+	neo-tandem)
+		cpu=neo
+		vendor=tandem
 		;;
-	orion)
-		basic_machine=orion-highlevel
+	nse-tandem)
+		cpu=nse
+		vendor=tandem
 		;;
-	orion105)
-		basic_machine=clipper-highlevel
+	nsr-tandem)
+		cpu=nsr
+		vendor=tandem
 		;;
-	mac | mpw | mac-mpw)
-		basic_machine=m68k-apple
+	nsv-tandem)
+		cpu=nsv
+		vendor=tandem
 		;;
-	pmac | pmac-mpw)
-		basic_machine=powerpc-apple
+	nsx-tandem)
+		cpu=nsx
+		vendor=tandem
+		;;
+	mipsallegrexel-sony)
+		cpu=mipsallegrexel
+		vendor=sony
 		;;
-	*-unknown)
-		# Make sure to match an already-canonicalized machine name.
+	tile*-*)
+		os=${os:-linux-gnu}
 		;;
+
 	*)
-		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-		exit 1
+		# Recognize the canonical CPU types that are allowed with any
+		# company name.
+		case $cpu in
+			1750a | 580 \
+			| a29k \
+			| aarch64 | aarch64_be \
+			| abacus \
+			| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
+			| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
+			| alphapca5[67] | alpha64pca5[67] \
+			| am33_2.0 \
+			| amdgcn \
+			| arc | arceb \
+			| arm  | arm[lb]e | arme[lb] | armv* \
+			| avr | avr32 \
+			| asmjs \
+			| ba \
+			| be32 | be64 \
+			| bfin | bpf | bs2000 \
+			| c[123]* | c30 | [cjt]90 | c4x \
+			| c8051 | clipper | craynv | csky | cydra \
+			| d10v | d30v | dlx | dsp16xx | dvp \
+			| e2k | elxsi | epiphany \
+			| f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
+			| h8300 | h8500 \
+			| hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+			| hexagon \
+			| i370 | i*86 | i860 | i960 | ia16 | ia64 \
+			| ip2k | iq2000 \
+			| k1om \
+			| le32 | le64 \
+			| lm32 \
+			| m32c | m32r | m32rle \
+			| m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
+			| m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
+			| m88110 | m88k | maxq | mb | mcore | mep | metag \
+			| microblaze | microblazeel \
+			| mips | mipsbe | mipseb | mipsel | mipsle \
+			| mips16 \
+			| mips64 | mips64eb | mips64el \
+			| mips64octeon | mips64octeonel \
+			| mips64orion | mips64orionel \
+			| mips64r5900 | mips64r5900el \
+			| mips64vr | mips64vrel \
+			| mips64vr4100 | mips64vr4100el \
+			| mips64vr4300 | mips64vr4300el \
+			| mips64vr5000 | mips64vr5000el \
+			| mips64vr5900 | mips64vr5900el \
+			| mipsisa32 | mipsisa32el \
+			| mipsisa32r2 | mipsisa32r2el \
+			| mipsisa32r6 | mipsisa32r6el \
+			| mipsisa64 | mipsisa64el \
+			| mipsisa64r2 | mipsisa64r2el \
+			| mipsisa64r6 | mipsisa64r6el \
+			| mipsisa64sb1 | mipsisa64sb1el \
+			| mipsisa64sr71k | mipsisa64sr71kel \
+			| mipsr5900 | mipsr5900el \
+			| mipstx39 | mipstx39el \
+			| mmix \
+			| mn10200 | mn10300 \
+			| moxie \
+			| mt \
+			| msp430 \
+			| nds32 | nds32le | nds32be \
+			| nfp \
+			| nios | nios2 | nios2eb | nios2el \
+			| none | np1 | ns16k | ns32k | nvptx \
+			| open8 \
+			| or1k* \
+			| or32 \
+			| orion \
+			| picochip \
+			| pdp10 | pdp11 | pj | pjl | pn | power \
+			| powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
+			| pru \
+			| pyramid \
+			| riscv | riscv32 | riscv64 \
+			| rl78 | romp | rs6000 | rx \
+			| s390 | s390x \
+			| score \
+			| sh | shl \
+			| sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
+			| sh[1234]e[lb] |  sh[12345][lb]e | sh[23]ele | sh64 | sh64le \
+			| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \
+			| sparclite \
+			| sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
+			| spu \
+			| tahoe \
+			| tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
+			| tron \
+			| ubicom32 \
+			| v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
+			| vax \
+			| visium \
+			| w65 \
+			| wasm32 | wasm64 \
+			| we32k \
+			| x86 | x86_64 | xc16x | xgate | xps100 \
+			| xstormy16 | xtensa* \
+			| ymp \
+			| z8k | z80)
+				;;
+
+			*)
+				echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2
+				exit 1
+				;;
+		esac
 		;;
 esac
 
 # Here we canonicalize certain aliases for manufacturers.
-case $basic_machine in
-	*-digital*)
-		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+case $vendor in
+	digital*)
+		vendor=dec
 		;;
-	*-commodore*)
-		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+	commodore*)
+		vendor=cbm
 		;;
 	*)
 		;;
@@ -1363,200 +1297,246 @@ esac
 
 # Decode manufacturer-specific aliases for certain operating systems.
 
-if [ x"$os" != x"" ]
+if [ x$os != x ]
 then
 case $os in
-	# First match some system type aliases
-	# that might get confused with valid system types.
-	# -solaris* is a basic system type, with this one exception.
-	-auroraux)
-		os=-auroraux
+	# First match some system type aliases that might get confused
+	# with valid system types.
+	# solaris* is a basic system type, with this one exception.
+	auroraux)
+		os=auroraux
 		;;
-	-solaris1 | -solaris1.*)
-		os=`echo $os | sed -e 's|solaris1|sunos4|'`
+	bluegene*)
+		os=cnk
 		;;
-	-solaris)
-		os=-solaris2
+	solaris1 | solaris1.*)
+		os=`echo $os | sed -e 's|solaris1|sunos4|'`
 		;;
-	-svr4*)
-		os=-sysv4
+	solaris)
+		os=solaris2
 		;;
-	-unixware*)
-		os=-sysv4.2uw
+	unixware*)
+		os=sysv4.2uw
 		;;
-	-gnu/linux*)
+	gnu/linux*)
 		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
 		;;
-	# First accept the basic system types.
+	# es1800 is here to avoid being matched by es* (a different OS)
+	es1800*)
+		os=ose
+		;;
+	# Some version numbers need modification
+	chorusos*)
+		os=chorusos
+		;;
+	isc)
+		os=isc2.2
+		;;
+	sco6)
+		os=sco5v6
+		;;
+	sco5)
+		os=sco3.2v5
+		;;
+	sco4)
+		os=sco3.2v4
+		;;
+	sco3.2.[4-9]*)
+		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+		;;
+	sco3.2v[4-9]* | sco5v6*)
+		# Don't forget version if it is 3.2v4 or newer.
+		;;
+	scout)
+		# Don't match below
+		;;
+	sco*)
+		os=sco3.2v2
+		;;
+	psos*)
+		os=psos
+		;;
+	# Now accept the basic system types.
 	# The portable systems comes first.
-	# Each alternative MUST END IN A *, to match a version number.
-	# -sysv* is not here because it comes later, after sysvr4.
-	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
-	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
-	      | -sym* | -kopensolaris* | -plan9* \
-	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-	      | -aos* | -aros* | -cloudabi* | -sortix* \
-	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
-	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
-	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
-	      | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
-	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
-	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
-	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
-	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-	      | -chorusos* | -chorusrdb* | -cegcc* \
-	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-	      | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
-	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
-	      | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
-	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
-	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
-	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -irx* \
-	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
-	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
-	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
-	      | -onefs* | -tirtos*)
+	# Each alternative MUST end in a * to match a version number.
+	# sysv* is not here because it comes later, after sysvr4.
+	gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
+	     | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\
+	     | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
+	     | sym* | kopensolaris* | plan9* \
+	     | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
+	     | aos* | aros* | cloudabi* | sortix* | twizzler* \
+	     | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
+	     | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
+	     | knetbsd* | mirbsd* | netbsd* \
+	     | bitrig* | openbsd* | solidbsd* | libertybsd* | os108* \
+	     | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \
+	     | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
+	     | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
+	     | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \
+	     | chorusrdb* | cegcc* | glidix* \
+	     | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
+	     | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \
+	     | linux-newlib* | linux-musl* | linux-uclibc* \
+	     | uxpv* | beos* | mpeix* | udk* | moxiebox* \
+	     | interix* | uwin* | mks* | rhapsody* | darwin* \
+	     | openstep* | oskit* | conix* | pw32* | nonstopux* \
+	     | storm-chaos* | tops10* | tenex* | tops20* | its* | irx* \
+	     | os2* | vos* | palmos* | uclinux* | nucleus* \
+	     | morphos* | superux* | rtmk* | windiss* \
+	     | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
+	     | skyos* | haiku* | rdos* | toppers* | drops* | es* \
+	     | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
+	     | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
+	     | nsk* | powerunix* | genode*)
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
-	-qnx*)
-		case $basic_machine in
-		    x86-* | i*86-*)
+	qnx*)
+		case $cpu in
+		    x86 | i*86)
 			;;
 		    *)
-			os=-nto$os
+			os=nto-$os
 			;;
 		esac
 		;;
-	-nto-qnx*)
+	hiux*)
+		os=hiuxwe2
 		;;
-	-nto*)
-		os=`echo $os | sed -e 's|nto|nto-qnx|'`
+	nto-qnx*)
 		;;
-	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
-	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
-	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+	nto*)
+		os=`echo $os | sed -e 's|nto|nto-qnx|'`
 		;;
-	-mac*)
-		os=`echo $os | sed -e 's|mac|macos|'`
+	sim | xray | os68k* | v88r* \
+	    | windows* | osx | abug | netware* | os9* \
+	    | macos* | mpw* | magic* | mmixware* | mon960* | lnews*)
 		;;
-	-linux-dietlibc)
-		os=-linux-dietlibc
+	linux-dietlibc)
+		os=linux-dietlibc
 		;;
-	-linux*)
+	linux*)
 		os=`echo $os | sed -e 's|linux|linux-gnu|'`
 		;;
-	-sunos5*)
-		os=`echo $os | sed -e 's|sunos5|solaris2|'`
+	lynx*178)
+		os=lynxos178
+		;;
+	lynx*5)
+		os=lynxos5
 		;;
-	-sunos6*)
-		os=`echo $os | sed -e 's|sunos6|solaris3|'`
+	lynx*)
+		os=lynxos
 		;;
-	-opened*)
-		os=-openedition
+	mac*)
+		os=`echo "$os" | sed -e 's|mac|macos|'`
 		;;
-	-os400*)
-		os=-os400
+	opened*)
+		os=openedition
 		;;
-	-wince*)
-		os=-wince
+	os400*)
+		os=os400
 		;;
-	-osfrose*)
-		os=-osfrose
+	sunos5*)
+		os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
 		;;
-	-osf*)
-		os=-osf
+	sunos6*)
+		os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
 		;;
-	-utek*)
-		os=-bsd
+	wince*)
+		os=wince
 		;;
-	-dynix*)
-		os=-bsd
+	utek*)
+		os=bsd
 		;;
-	-acis*)
-		os=-aos
+	dynix*)
+		os=bsd
 		;;
-	-atheos*)
-		os=-atheos
+	acis*)
+		os=aos
 		;;
-	-syllable*)
-		os=-syllable
+	atheos*)
+		os=atheos
 		;;
-	-386bsd)
-		os=-bsd
+	syllable*)
+		os=syllable
 		;;
-	-ctix* | -uts*)
-		os=-sysv
+	386bsd)
+		os=bsd
 		;;
-	-nova*)
-		os=-rtmk-nova
+	ctix* | uts*)
+		os=sysv
 		;;
-	-ns2 )
-		os=-nextstep2
+	nova*)
+		os=rtmk-nova
 		;;
-	-nsk*)
-		os=-nsk
+	ns2)
+		os=nextstep2
 		;;
 	# Preserve the version number of sinix5.
-	-sinix5.*)
+	sinix5.*)
 		os=`echo $os | sed -e 's|sinix|sysv|'`
 		;;
-	-sinix*)
-		os=-sysv4
+	sinix*)
+		os=sysv4
 		;;
-	-tpf*)
-		os=-tpf
+	tpf*)
+		os=tpf
 		;;
-	-triton*)
-		os=-sysv3
+	triton*)
+		os=sysv3
 		;;
-	-oss*)
-		os=-sysv3
+	oss*)
+		os=sysv3
 		;;
-	-svr4)
-		os=-sysv4
+	svr4*)
+		os=sysv4
 		;;
-	-svr3)
-		os=-sysv3
+	svr3)
+		os=sysv3
 		;;
-	-sysvr4)
-		os=-sysv4
+	sysvr4)
+		os=sysv4
 		;;
-	# This must come after -sysvr4.
-	-sysv*)
+	# This must come after sysvr4.
+	sysv*)
 		;;
-	-ose*)
-		os=-ose
+	ose*)
+		os=ose
 		;;
-	-es1800*)
-		os=-ose
+	*mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
+		os=mint
 		;;
-	-xenix)
-		os=-xenix
+	zvmoe)
+		os=zvmoe
 		;;
-	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-		os=-mint
+	dicos*)
+		os=dicos
 		;;
-	-aros*)
-		os=-aros
+	pikeos*)
+		# Until real need of OS specific support for
+		# particular features comes up, bare metal
+		# configurations are quite functional.
+		case $cpu in
+		    arm*)
+			os=eabi
+			;;
+		    *)
+			os=elf
+			;;
+		esac
 		;;
-	-zvmoe)
-		os=-zvmoe
+	nacl*)
 		;;
-	-dicos*)
-		os=-dicos
+	ios)
 		;;
-	-nacl*)
+	psp)
 		;;
-	-ios)
+	none)
 		;;
-	-none)
+	*-eabi)
 		;;
 	*)
-		# Get rid of the `-' at the beginning of $os.
-		os=`echo $os | sed 's/[^-]*-//'`
-		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+		echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
 		exit 1
 		;;
 esac
@@ -1572,261 +1552,265 @@ else
 # will signal an error saying that MANUFACTURER isn't an operating
 # system, and we'll never get to this point.
 
-case $basic_machine in
+case $cpu-$vendor in
 	score-*)
-		os=-elf
+		os=elf
 		;;
 	spu-*)
-		os=-elf
+		os=elf
 		;;
 	*-acorn)
-		os=-riscix1.2
+		os=riscix1.2
 		;;
 	arm*-rebel)
-		os=-linux
+		os=linux
 		;;
 	arm*-semi)
-		os=-aout
+		os=aout
 		;;
 	c4x-* | tic4x-*)
-		os=-coff
+		os=coff
 		;;
 	c8051-*)
-		os=-elf
+		os=elf
+		;;
+	clipper-intergraph)
+		os=clix
 		;;
 	hexagon-*)
-		os=-elf
+		os=elf
 		;;
 	tic54x-*)
-		os=-coff
+		os=coff
 		;;
 	tic55x-*)
-		os=-coff
+		os=coff
 		;;
 	tic6x-*)
-		os=-coff
+		os=coff
 		;;
 	# This must come before the *-dec entry.
 	pdp10-*)
-		os=-tops20
+		os=tops20
 		;;
 	pdp11-*)
-		os=-none
+		os=none
 		;;
 	*-dec | vax-*)
-		os=-ultrix4.2
+		os=ultrix4.2
 		;;
 	m68*-apollo)
-		os=-domain
+		os=domain
 		;;
 	i386-sun)
-		os=-sunos4.0.2
+		os=sunos4.0.2
 		;;
 	m68000-sun)
-		os=-sunos3
+		os=sunos3
 		;;
 	m68*-cisco)
-		os=-aout
+		os=aout
 		;;
 	mep-*)
-		os=-elf
+		os=elf
 		;;
 	mips*-cisco)
-		os=-elf
+		os=elf
 		;;
 	mips*-*)
-		os=-elf
+		os=elf
 		;;
 	or32-*)
-		os=-coff
+		os=coff
 		;;
 	*-tti)	# must be before sparc entry or we get the wrong os.
-		os=-sysv3
+		os=sysv3
 		;;
 	sparc-* | *-sun)
-		os=-sunos4.1.1
+		os=sunos4.1.1
 		;;
-	*-be)
-		os=-beos
+	pru-*)
+		os=elf
 		;;
-	*-haiku)
-		os=-haiku
+	*-be)
+		os=beos
 		;;
 	*-ibm)
-		os=-aix
+		os=aix
 		;;
 	*-knuth)
-		os=-mmixware
+		os=mmixware
 		;;
 	*-wec)
-		os=-proelf
+		os=proelf
 		;;
 	*-winbond)
-		os=-proelf
+		os=proelf
 		;;
 	*-oki)
-		os=-proelf
+		os=proelf
 		;;
 	*-hp)
-		os=-hpux
+		os=hpux
 		;;
 	*-hitachi)
-		os=-hiux
+		os=hiux
 		;;
 	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
-		os=-sysv
+		os=sysv
 		;;
 	*-cbm)
-		os=-amigaos
+		os=amigaos
 		;;
 	*-dg)
-		os=-dgux
+		os=dgux
 		;;
 	*-dolphin)
-		os=-sysv3
+		os=sysv3
 		;;
 	m68k-ccur)
-		os=-rtu
+		os=rtu
 		;;
 	m88k-omron*)
-		os=-luna
+		os=luna
 		;;
-	*-next )
-		os=-nextstep
+	*-next)
+		os=nextstep
 		;;
 	*-sequent)
-		os=-ptx
+		os=ptx
 		;;
 	*-crds)
-		os=-unos
+		os=unos
 		;;
 	*-ns)
-		os=-genix
+		os=genix
 		;;
 	i370-*)
-		os=-mvs
-		;;
-	*-next)
-		os=-nextstep3
+		os=mvs
 		;;
 	*-gould)
-		os=-sysv
+		os=sysv
 		;;
 	*-highlevel)
-		os=-bsd
+		os=bsd
 		;;
 	*-encore)
-		os=-bsd
+		os=bsd
 		;;
 	*-sgi)
-		os=-irix
+		os=irix
 		;;
 	*-siemens)
-		os=-sysv4
+		os=sysv4
 		;;
 	*-masscomp)
-		os=-rtu
+		os=rtu
 		;;
 	f30[01]-fujitsu | f700-fujitsu)
-		os=-uxpv
+		os=uxpv
 		;;
 	*-rom68k)
-		os=-coff
+		os=coff
 		;;
 	*-*bug)
-		os=-coff
+		os=coff
 		;;
 	*-apple)
-		os=-macos
+		os=macos
 		;;
 	*-atari*)
-		os=-mint
+		os=mint
+		;;
+	*-wrs)
+		os=vxworks
 		;;
 	*)
-		os=-none
+		os=none
 		;;
 esac
 fi
 
 # Here we handle the case where we know the os, and the CPU type, but not the
 # manufacturer.  We pick the logical manufacturer.
-vendor=unknown
-case $basic_machine in
-	*-unknown)
+case $vendor in
+	unknown)
 		case $os in
-			-riscix*)
+			riscix*)
 				vendor=acorn
 				;;
-			-sunos*)
+			sunos*)
 				vendor=sun
 				;;
-			-cnk*|-aix*)
+			cnk*|-aix*)
 				vendor=ibm
 				;;
-			-beos*)
+			beos*)
 				vendor=be
 				;;
-			-hpux*)
+			hpux*)
 				vendor=hp
 				;;
-			-mpeix*)
+			mpeix*)
 				vendor=hp
 				;;
-			-hiux*)
+			hiux*)
 				vendor=hitachi
 				;;
-			-unos*)
+			unos*)
 				vendor=crds
 				;;
-			-dgux*)
+			dgux*)
 				vendor=dg
 				;;
-			-luna*)
+			luna*)
 				vendor=omron
 				;;
-			-genix*)
+			genix*)
 				vendor=ns
 				;;
-			-mvs* | -opened*)
+			clix*)
+				vendor=intergraph
+				;;
+			mvs* | opened*)
 				vendor=ibm
 				;;
-			-os400*)
+			os400*)
 				vendor=ibm
 				;;
-			-ptx*)
+			ptx*)
 				vendor=sequent
 				;;
-			-tpf*)
+			tpf*)
 				vendor=ibm
 				;;
-			-vxsim* | -vxworks* | -windiss*)
+			vxsim* | vxworks* | windiss*)
 				vendor=wrs
 				;;
-			-aux*)
+			aux*)
 				vendor=apple
 				;;
-			-hms*)
+			hms*)
 				vendor=hitachi
 				;;
-			-mpw* | -macos*)
+			mpw* | macos*)
 				vendor=apple
 				;;
-			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+			*mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
 				vendor=atari
 				;;
-			-vos*)
+			vos*)
 				vendor=stratus
 				;;
 		esac
-		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
 		;;
 esac
 
-echo $basic_machine$os
+echo "$cpu-$vendor-$os"
 exit
 
 # Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
 # time-stamp-start: "timestamp='"
 # time-stamp-format: "%:y-%02m-%02d"
 # time-stamp-end: "'"
diff --git a/configure b/configure
index bf18750..789b103 100755
--- a/configure
+++ b/configure
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for dump 0.4b46.
+# Generated by GNU Autoconf 2.69 for dump 0.4b47.
 #
-# Report bugs to <http://dump.sourceforge.net>.
+# Report bugs to <https://dump.sourceforge.io>.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -275,7 +275,7 @@ fi
     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
   else
     $as_echo "$0: Please tell bug-autoconf@gnu.org and
-$0: http://dump.sourceforge.net about your system,
+$0: https://dump.sourceforge.io about your system,
 $0: including any error possibly output before this
 $0: message. Then install a modern shell, or manually run
 $0: the script under such a shell if you do have one."
@@ -590,9 +590,9 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='dump'
 PACKAGE_TARNAME='dump'
-PACKAGE_VERSION='0.4b46'
-PACKAGE_STRING='dump 0.4b46'
-PACKAGE_BUGREPORT='http://dump.sourceforge.net'
+PACKAGE_VERSION='0.4b47'
+PACKAGE_STRING='dump 0.4b47'
+PACKAGE_BUGREPORT='https://dump.sourceforge.io'
 PACKAGE_URL=''
 
 # Factoring default headers for most tests.
@@ -659,6 +659,7 @@ BUILD_ERMT_FALSE
 BUILD_ERMT_TRUE
 BUILD_RMT_FALSE
 BUILD_RMT_TRUE
+DATE
 LT_SYS_LIBRARY_PATH
 OTOOL64
 OTOOL
@@ -696,7 +697,6 @@ am__nodep
 AMDEPBACKSLASH
 AMDEP_FALSE
 AMDEP_TRUE
-am__quote
 am__include
 DEPDIR
 OBJEXT
@@ -756,6 +756,7 @@ infodir
 docdir
 oldincludedir
 includedir
+runstatedir
 localstatedir
 sharedstatedir
 sysconfdir
@@ -774,7 +775,8 @@ PACKAGE_VERSION
 PACKAGE_TARNAME
 PACKAGE_NAME
 PATH_SEPARATOR
-SHELL'
+SHELL
+am__quote'
 ac_subst_files=''
 ac_user_opts='
 enable_option_checking
@@ -875,6 +877,7 @@ datadir='${datarootdir}'
 sysconfdir='${prefix}/etc'
 sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1127,6 +1130,15 @@ do
   | -silent | --silent | --silen | --sile | --sil)
     silent=yes ;;
 
+  -runstatedir | --runstatedir | --runstatedi | --runstated \
+  | --runstate | --runstat | --runsta | --runst | --runs \
+  | --run | --ru | --r)
+    ac_prev=runstatedir ;;
+  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+  | --run=* | --ru=* | --r=*)
+    runstatedir=$ac_optarg ;;
+
   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
     ac_prev=sbindir ;;
   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1264,7 +1276,7 @@ fi
 for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
 		datadir sysconfdir sharedstatedir localstatedir includedir \
 		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
-		libdir localedir mandir
+		libdir localedir mandir runstatedir
 do
   eval ac_val=\$$ac_var
   # Remove trailing slashes.
@@ -1377,7 +1389,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures dump 0.4b46 to adapt to many kinds of systems.
+\`configure' configures dump 0.4b47 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1417,6 +1429,7 @@ Fine tuning of the installation directories:
   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
   --libdir=DIR            object code libraries [EPREFIX/lib]
   --includedir=DIR        C header files [PREFIX/include]
   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
@@ -1447,7 +1460,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of dump 0.4b46:";;
+     short | recursive ) echo "Configuration of dump 0.4b47:";;
    esac
   cat <<\_ACEOF
 
@@ -1545,7 +1558,7 @@ Some influential environment variables:
 Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.
 
-Report bugs to <http://dump.sourceforge.net>.
+Report bugs to <https://dump.sourceforge.io>.
 _ACEOF
 ac_status=$?
 fi
@@ -1608,7 +1621,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-dump configure 0.4b46
+dump configure 0.4b47
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1768,7 +1781,7 @@ $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >
     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
 ( $as_echo "## ------------------------------------------ ##
-## Report this to http://dump.sourceforge.net ##
+## Report this to https://dump.sourceforge.io ##
 ## ------------------------------------------ ##"
      ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
@@ -2136,7 +2149,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by dump $as_me 0.4b46, which was
+It was created by dump $as_me 0.4b47, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2485,7 +2498,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
-am__api_version='1.14'
+am__api_version='1.16'
 
 ac_aux_dir=
 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
@@ -2686,8 +2699,8 @@ test "$program_suffix" != NONE &&
 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
 
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
 
 if test x"${MISSING+set}" != xset; then
   case $am_aux_dir in
@@ -2706,7 +2719,7 @@ else
 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
 fi
 
-if test x"${install_sh}" != xset; then
+if test x"${install_sh+set}" != xset; then
   case $am_aux_dir in
   *\ * | *\	*)
     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
@@ -3000,7 +3013,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='dump'
- VERSION='0.4b46'
+ VERSION='0.4b47'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -3030,12 +3043,12 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
 
 # For better backward compatibility.  To be removed once Automake 1.9.x
 # dies out for good.  For more background, see:
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
 mkdir_p='$(MKDIR_P)'
 
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
+# We need awk for the "check" target (and possibly the TAP driver).  The
+# system "awk" is bad on some platforms.
 # Always define AMTAR for backward compatibility.  Yes, it's still used
 # in the wild :-(  We should find a proper way to deprecate it ...
 AMTAR='$${TAR-tar}'
@@ -3082,7 +3095,7 @@ END
 Aborting the configuration process, to ensure you take notice of the issue.
 
 You can download and install GNU coreutils to get an 'rm' implementation
-that behaves properly: <http://www.gnu.org/software/coreutils/>.
+that behaves properly: <https://www.gnu.org/software/coreutils/>.
 
 If you want to complete the configuration process using your problematic
 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
@@ -3092,6 +3105,7 @@ END
     as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
   fi
 fi
+
 # Check whether --enable-silent-rules was given.
 if test "${enable_silent_rules+set}" = set; then :
   enableval=$enable_silent_rules;
@@ -4149,45 +4163,45 @@ DEPDIR="${am__leading_dot}deps"
 
 ac_config_commands="$ac_config_commands depfiles"
 
-
-am_make=${MAKE-make}
-cat > confinc << 'END'
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
+$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; }
+cat > confinc.mk << 'END'
 am__doit:
-	@echo this is the am__doit target
+	@echo this is the am__doit target >confinc.out
 .PHONY: am__doit
 END
-# If we don't find an include directive, just comment out the code.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
-$as_echo_n "checking for style of include used by $am_make... " >&6; }
 am__include="#"
 am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# Ignore all kinds of additional output from 'make'.
-case `$am_make -s -f confmf 2> /dev/null` in #(
-*the\ am__doit\ target*)
-  am__include=include
-  am__quote=
-  _am_result=GNU
-  ;;
-esac
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   case `$am_make -s -f confmf 2> /dev/null` in #(
-   *the\ am__doit\ target*)
-     am__include=.include
-     am__quote="\""
-     _am_result=BSD
+# BSD make does it like this.
+echo '.include "confinc.mk" # ignored' > confmf.BSD
+# Other make implementations (GNU, Solaris 10, AIX) do it like this.
+echo 'include confinc.mk # ignored' > confmf.GNU
+_am_result=no
+for s in GNU BSD; do
+  { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
+   (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }
+  case $?:`cat confinc.out 2>/dev/null` in #(
+  '0:this is the am__doit target') :
+    case $s in #(
+  BSD) :
+    am__include='.include' am__quote='"' ;; #(
+  *) :
+    am__include='include' am__quote='' ;;
+esac ;; #(
+  *) :
      ;;
-   esac
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
-$as_echo "$_am_result" >&6; }
-rm -f confinc confmf
+esac
+  if test "$am__include" != "#"; then
+    _am_result="yes ($s style)"
+    break
+  fi
+done
+rm -f confinc.* confmf.*
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
+$as_echo "${_am_result}" >&6; }
 
 # Check whether --enable-dependency-tracking was given.
 if test "${enable_dependency_tracking+set}" = set; then :
@@ -5692,6 +5706,11 @@ else
     lt_cv_sys_max_cmd_len=8192;
     ;;
 
+  mint*)
+    # On MiNT this can take a long time and run out of memory.
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
   amigaos*)
     # On AmigaOS with pdksh, this test takes hours, literally.
     # So we just punt and use a minimum line length of 8192.
@@ -7460,10 +7479,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
 	  x86_64-*linux*)
 	    LD="${LD-ld} -m elf_x86_64"
 	    ;;
-	  powerpcle-*linux*)
+	  powerpcle-*linux*|powerpc64le-*linux*)
 	    LD="${LD-ld} -m elf64lppc"
 	    ;;
-	  powerpc-*linux*)
+	  powerpc-*linux*|powerpc64-*linux*)
 	    LD="${LD-ld} -m elf64ppc"
 	    ;;
 	  s390*-*linux*|s390*-*tpf*)
@@ -11382,11 +11401,11 @@ darwin* | rhapsody*)
   version_type=darwin
   need_lib_prefix=no
   need_version=no
-  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
+  library_names_spec='$libname$release$versuffix$shared_ext $libname$release$major$shared_ext $libname$shared_ext'
   soname_spec='$libname$release$major$shared_ext'
   shlibpath_overrides_runpath=yes
   shlibpath_var=DYLD_LIBRARY_PATH
-  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+  shrext_cmds='`test .$module = .yes && echo .bundle || echo .dylib`'
 
   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
@@ -12686,8 +12705,13 @@ fi
 done
 
 
+DATE="1 Jan 2021"
+
+
 CPPFLAGS="${CPPFLAGS} -D_USE_BSD_SIGNAL "'-D_PATH_DUMPDATES=\"$(DUMPDATESPATH)\" -D_DUMP_VERSION=\"$(VERSION)\"'
 
+CFLAGS="${CFLAGS} -fcommon"
+
 
 $as_echo "#define LINUX_FORK_BUG 1" >>confdefs.h
 
@@ -12919,8 +12943,8 @@ if test "$enable_selinux" != "no"; then
 	found_selinux="yes"
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SELINUX" >&5
-$as_echo_n "checking for SELINUX... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libselinux" >&5
+$as_echo_n "checking for libselinux... " >&6; }
 
 if test -n "$SELINUX_CFLAGS"; then
     pkg_cv_SELINUX_CFLAGS="$SELINUX_CFLAGS"
@@ -12960,7 +12984,7 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@@ -12983,7 +13007,7 @@ fi
 		fi
 
 elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
 		found_selinux="no"
@@ -13031,8 +13055,8 @@ CPPFLAGS="${CPPFLAGS} "'-D_PATH_RMT=\"$(RMTPATH)\"'
 
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXT2FS" >&5
-$as_echo_n "checking for EXT2FS... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ext2fs" >&5
+$as_echo_n "checking for ext2fs... " >&6; }
 
 if test -n "$EXT2FS_CFLAGS"; then
     pkg_cv_EXT2FS_CFLAGS="$EXT2FS_CFLAGS"
@@ -13072,7 +13096,7 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@@ -13099,7 +13123,7 @@ Alternatively, you may set the environment variables EXT2FS_CFLAGS
 and EXT2FS_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details." "$LINENO" 5
 elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
@@ -13122,8 +13146,8 @@ $as_echo "yes" >&6; }
 fi
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for COM_ERR" >&5
-$as_echo_n "checking for COM_ERR... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err" >&5
+$as_echo_n "checking for com_err... " >&6; }
 
 if test -n "$COM_ERR_CFLAGS"; then
     pkg_cv_COM_ERR_CFLAGS="$COM_ERR_CFLAGS"
@@ -13163,7 +13187,7 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@@ -13190,7 +13214,7 @@ Alternatively, you may set the environment variables COM_ERR_CFLAGS
 and COM_ERR_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details." "$LINENO" 5
 elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
@@ -13343,8 +13367,8 @@ fi
 if test "$enable_blkid" != "no"; then
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BLKID" >&5
-$as_echo_n "checking for BLKID... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for blkid" >&5
+$as_echo_n "checking for blkid... " >&6; }
 
 if test -n "$BLKID_CFLAGS"; then
     pkg_cv_BLKID_CFLAGS="$BLKID_CFLAGS"
@@ -13384,7 +13408,7 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@@ -13407,7 +13431,7 @@ fi
 		fi
 
 elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
 		found_blkid="no"
@@ -13437,8 +13461,8 @@ fi
 if test "$enable_uuid" != "no"; then
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UUID" >&5
-$as_echo_n "checking for UUID... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid" >&5
+$as_echo_n "checking for uuid... " >&6; }
 
 if test -n "$UUID_CFLAGS"; then
     pkg_cv_UUID_CFLAGS="$UUID_CFLAGS"
@@ -13478,7 +13502,7 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@@ -13501,7 +13525,7 @@ fi
 		fi
 
 elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
 		found_uuid="no"
@@ -13827,8 +13851,8 @@ fi
 if test "$enable_zlib" != "no"; then
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZLIB" >&5
-$as_echo_n "checking for ZLIB... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlib" >&5
+$as_echo_n "checking for zlib... " >&6; }
 
 if test -n "$ZLIB_CFLAGS"; then
     pkg_cv_ZLIB_CFLAGS="$ZLIB_CFLAGS"
@@ -13868,7 +13892,7 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@@ -13891,7 +13915,7 @@ fi
 		fi
 
 elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
 		found_zlib="no"
@@ -14119,7 +14143,7 @@ $as_echo "#define HAVE_SQLITE3 1" >>confdefs.h
 fi
 
 
-for ac_func in err errx verr verrx vwarn vwarnx warn warnx realpath lchown
+for ac_func in err errx verr verrx vwarn vwarnx warn warnx realpath lchown utimensat
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -14177,8 +14201,8 @@ fi
 if test "$enable_ssl" != "no"; then
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL" >&5
-$as_echo_n "checking for SSL... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl" >&5
+$as_echo_n "checking for openssl... " >&6; }
 
 if test -n "$SSL_CFLAGS"; then
     pkg_cv_SSL_CFLAGS="$SSL_CFLAGS"
@@ -14218,7 +14242,7 @@ fi
 
 
 if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@@ -14241,7 +14265,7 @@ fi
 		fi
 
 elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
 		found_ssl="no"
@@ -14832,7 +14856,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by dump $as_me 0.4b46, which was
+This file was extended by dump $as_me 0.4b47, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -14892,13 +14916,13 @@ $config_headers
 Configuration commands:
 $config_commands
 
-Report bugs to <http://dump.sourceforge.net>."
+Report bugs to <https://dump.sourceforge.io>."
 
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-dump config.status 0.4b46
+dump config.status 0.4b47
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
@@ -15017,7 +15041,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 #
 # INIT-COMMANDS
 #
-AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
 
 
 # The HP-UX ksh and POSIX shell print the target directory to stdout
@@ -15919,29 +15943,35 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
   # Older Autoconf quotes --file arguments for eval, but not when files
   # are listed without --file.  Let's play safe and only enable the eval
   # if we detect the quoting.
-  case $CONFIG_FILES in
-  *\'*) eval set x "$CONFIG_FILES" ;;
-  *)   set x $CONFIG_FILES ;;
-  esac
+  # TODO: see whether this extra hack can be removed once we start
+  # requiring Autoconf 2.70 or later.
+  case $CONFIG_FILES in #(
+  *\'*) :
+    eval set x "$CONFIG_FILES" ;; #(
+  *) :
+    set x $CONFIG_FILES ;; #(
+  *) :
+     ;;
+esac
   shift
-  for mf
+  # Used to flag and report bootstrapping failures.
+  am_rc=0
+  for am_mf
   do
     # Strip MF so we end up with the name of the file.
-    mf=`echo "$mf" | sed -e 's/:.*$//'`
-    # Check whether this is an Automake generated Makefile or not.
-    # We used to match only the files named 'Makefile.in', but
-    # some people rename them; so instead we look at the file content.
-    # Grep'ing the first line is not enough: some people post-process
-    # each Makefile.in and add a new line on top of each file to say so.
-    # Grep'ing the whole file is not good either: AIX grep has a line
+    am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile which includes
+    # dependency-tracking related rules and includes.
+    # Grep'ing the whole file directly is not great: AIX grep has a line
     # limit of 2048, but all sed's we know have understand at least 4000.
-    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
-      dirpart=`$as_dirname -- "$mf" ||
-$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$mf" : 'X\(//\)[^/]' \| \
-	 X"$mf" : 'X\(//\)$' \| \
-	 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$mf" |
+    sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
+      || continue
+    am_dirpart=`$as_dirname -- "$am_mf" ||
+$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$am_mf" : 'X\(//\)[^/]' \| \
+	 X"$am_mf" : 'X\(//\)$' \| \
+	 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$am_mf" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 	    s//\1/
 	    q
@@ -15959,53 +15989,50 @@ $as_echo X"$mf" |
 	    q
 	  }
 	  s/.*/./; q'`
-    else
-      continue
-    fi
-    # Extract the definition of DEPDIR, am__include, and am__quote
-    # from the Makefile without running 'make'.
-    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-    test -z "$DEPDIR" && continue
-    am__include=`sed -n 's/^am__include = //p' < "$mf"`
-    test -z "$am__include" && continue
-    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-    # Find all dependency output files, they are included files with
-    # $(DEPDIR) in their names.  We invoke sed twice because it is the
-    # simplest approach to changing $(DEPDIR) to its actual value in the
-    # expansion.
-    for file in `sed -n "
-      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
-      # Make sure the directory exists.
-      test -f "$dirpart/$file" && continue
-      fdir=`$as_dirname -- "$file" ||
-$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$file" : 'X\(//\)[^/]' \| \
-	 X"$file" : 'X\(//\)$' \| \
-	 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
+    am_filepart=`$as_basename -- "$am_mf" ||
+$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$am_mf" : 'X\(//\)$' \| \
+	 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$am_mf" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
 	    s//\1/
 	    q
 	  }
-	  /^X\(\/\/\)$/{
+	  /^X\/\(\/\/\)$/{
 	    s//\1/
 	    q
 	  }
-	  /^X\(\/\).*/{
+	  /^X\/\(\/\).*/{
 	    s//\1/
 	    q
 	  }
 	  s/.*/./; q'`
-      as_dir=$dirpart/$fdir; as_fn_mkdir_p
-      # echo "creating $dirpart/$file"
-      echo '# dummy' > "$dirpart/$file"
-    done
+    { echo "$as_me:$LINENO: cd "$am_dirpart" \
+      && sed -e '/# am--include-marker/d' "$am_filepart" \
+        | $MAKE -f - am--depfiles" >&5
+   (cd "$am_dirpart" \
+      && sed -e '/# am--include-marker/d' "$am_filepart" \
+        | $MAKE -f - am--depfiles) >&5 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } || am_rc=$?
   done
+  if test $am_rc -ne 0; then
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "Something went wrong bootstrapping makefile fragments
+    for automatic dependency tracking.  If GNU make was not used, consider
+    re-running the configure script with MAKE=\"gmake\" (or whatever is
+    necessary).  You can also try re-running configure with the
+    '--disable-dependency-tracking' option to at least be able to build
+    the package (albeit without support for automatic dependency tracking).
+See \`config.log' for more details" "$LINENO" 5; }
+  fi
+  { am_dirpart=; unset am_dirpart;}
+  { am_filepart=; unset am_filepart;}
+  { am_mf=; unset am_mf;}
+  { am_rc=; unset am_rc;}
+  rm -f conftest-deps.mk
 }
  ;;
     "libtool":C)
diff --git a/configure.ac b/configure.ac
index 529a555..fee14b7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-AC_INIT([dump], [0.4b46], [http://dump.sourceforge.net])
+AC_INIT([dump], [0.4b47], [https://dump.sourceforge.io])
 AC_PREREQ(2.57)
 AM_INIT_AUTOMAKE
 AM_SILENT_RULES([yes])
@@ -23,8 +23,15 @@ LT_INIT
 
 AC_CHECK_HEADERS([sys/types.h])
 
+dnl Used when generating the man pages. Should refresh for each release.
+AC_SUBST([DATE], ["1 Jan 2021"])
+
 CPPFLAGS="${CPPFLAGS} -D_USE_BSD_SIGNAL "'-D_PATH_DUMPDATES=\"$(DUMPDATESPATH)\" -D_DUMP_VERSION=\"$(VERSION)\"'
 
+dnl This codebase is a mess with its storage.  It should get fixed someday.
+dnl https://sourceforge.net/p/dump/bugs/171/
+CFLAGS="${CFLAGS} -fcommon"
+
 AC_DEFINE([LINUX_FORK_BUG], 1, [Workaround bad fork behavior on Linux])
 
 dnl Should these be options?
@@ -421,7 +428,7 @@ AC_SUBST(SQLITE3)
 dnl
 dnl Check for library functions
 dnl
-AC_CHECK_FUNCS(err errx verr verrx vwarn vwarnx warn warnx realpath lchown)
+AC_CHECK_FUNCS(err errx verr verrx vwarn vwarnx warn warnx realpath lchown utimensat)
 AC_CHECK_FUNC(glob)
 
 dnl
diff --git a/debian/NEWS b/debian/NEWS
new file mode 100644
index 0000000..f63e51d
--- /dev/null
+++ b/debian/NEWS
@@ -0,0 +1,40 @@
+dump (0.4b47-4) unstable; urgency=medium
+
+  dump now records the actual filesystem argument that it was given
+  in /var/lib/dumpdates; that argument may not be the same
+  as the underlying disk device but this change makes
+  incremental backups with filesystems selected by LABEL=x
+  or UUID=y possible without format changes to dumpdates.
+
+  there is one small limitation:
+
+  if you want to perform incrementals, then you must give dump the same
+  filesystem selection parameter for all invocations (level 0 and up),
+  or it won't find previous backups in /var/lib/dumpdates.
+  
+  for example, you can't mix selection by device path /dev/sdxyz with
+  selection by UUID=whatever, regardless of whether the two identify the
+  same physical filesystem or not.
+
+ -- Alexander Zangerl <az@debian.org>  Tue, 03 May 2022 15:34:16 +1000
+
+dump (0.4b45-3) unstable; urgency=medium
+
+  QFA is functional again.
+
+ -- Alexander Zangerl <az@debian.org>  Sun, 26 Jun 2016 00:34:49 +1000
+
+dump (0.4b45-2) unstable; urgency=high
+
+  this is an interim version with QFA (quick file access) support DISABLED;
+  with QFA enabled dump crashes repeatably with a segfault which
+  renders the package completely and utterly broken (see #826398).
+
+  i'm resorting to this undesirable temporary featurectomy because
+  i haven't found	the root cause of that segfault yet - but version
+  0.4b45-1 has already made it into testing, and i clearly can't leave things
+  as they are.
+
+  to those of you relying on QFA: please bear with me for a few more days.
+
+ -- Alexander Zangerl <az@debian.org>  Wed, 08 Jun 2016 19:04:11 +1000
diff --git a/debian/NEWS.Debian b/debian/NEWS.Debian
deleted file mode 100644
index 0872c5b..0000000
--- a/debian/NEWS.Debian
+++ /dev/null
@@ -1,20 +0,0 @@
-dump (0.4b45-3) unstable; urgency=medium
-
-  QFA is functional again.
-
- -- Alexander Zangerl <az@debian.org>  Sun, 26 Jun 2016 00:34:49 +1000
-
-dump (0.4b45-2) unstable; urgency=high
-
-  this is an interim version with QFA (quick file access) support DISABLED;
-  with QFA enabled dump crashes repeatably with a segfault which
-  renders the package completely and utterly broken (see #826398).
-
-  i'm resorting to this undesirable temporary featurectomy because
-  i haven't found	the root cause of that segfault yet - but version
-  0.4b45-1 has already made it into testing, and i clearly can't leave things
-  as they are.
-
-  to those of you relying on QFA: please bear with me for a few more days.
-
- -- Alexander Zangerl <az@debian.org>  Wed, 08 Jun 2016 19:04:11 +1000
diff --git a/debian/README.debian b/debian/README.debian
deleted file mode 100644
index 0a32434..0000000
--- a/debian/README.debian
+++ /dev/null
@@ -1,16 +0,0 @@
-Historically, dump was *always* used on unmounted filesystems.  Tools like
-AMANDA break that expectation.  Backing up a live filesystem sometimes causes
-problems for tools like dump, depending on what is changing while the backup
-runs.  If you see errors during a dump of a mounted filesystem, try again with
-the filesystem unmounted, and see if that fixes the problem.
-
-In theory, the page cache changes in the 2.4 Linux kernel can cause problems
-to happen more frequently than in prior versions.  Caveat emptor.
-
---
-
-If you want to dump on remote tapes as a non-root user, you will need to make 
-the dump executable setuid root, so that it can allocate a privileged port 
-for the outgoing network connection.  This is not the default, since it is
-not commonly needed, and setuid executables are targets for security attacks.
-
diff --git a/debian/changelog b/debian/changelog
index 3c26ece..55a7706 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,11 +1,69 @@
-dump (0.4b46-4) UNRELEASED; urgency=medium
+dump (0.4b47-4) unstable; urgency=medium
 
-  * d/copyright: Use https protocol in Format field
-  * d/changelog: Remove trailing whitespaces
-  * d/control: Set Vcs-* to salsa.debian.org
-  * d/watch: Use https protocol
+  * fix dumpdates logic for backing up by LABEL= or UUID=
+    (closes: #737564)
+  * minor manpage improvements
 
- -- Ondřej Nový <onovy@debian.org>  Mon, 01 Oct 2018 09:45:06 +0200
+ -- Alexander Zangerl <az@debian.org>  Tue, 03 May 2022 15:16:47 +1000
+
+dump (0.4b47-3) unstable; urgency=medium
+
+  * applied patch for restore and superlong paths (closes: #995996)
+  * applied patches to correct possible buffer overflows (closes: #1002836)
+
+ -- Alexander Zangerl <az@debian.org>  Sat, 15 Jan 2022 15:25:26 +1000
+
+dump (0.4b47-2) unstable; urgency=medium
+
+  * fix for bad handling of odd blocksizes that can be
+    reported by stat on zfs (closes: 995992)
+  * some minor adjustments to quieten lintian
+
+ -- Alexander Zangerl <az@debian.org>  Tue, 12 Oct 2021 17:18:50 +1000
+
+dump (0.4b47-1) unstable; urgency=medium
+
+  * new upstream release
+
+ -- Alexander Zangerl <az@debian.org>  Tue, 30 Mar 2021 16:08:22 +1000
+
+dump (0.4b46-8) unstable; urgency=high
+
+  * fix extern declaration issue, added -fno-common to flags (closes: #957153)
+
+ -- Alexander Zangerl <az@debian.org>  Thu, 23 Jul 2020 17:06:14 +1000
+
+dump (0.4b46-7) unstable; urgency=high
+
+  * repaired qfa mode for tape drives (closes: #965105)
+    thanks go to Roberto Resoli who reported the problem
+    and figured out the root cause
+  * updated debhelper compat level
+
+ -- Alexander Zangerl <az@debian.org>  Sun, 19 Jul 2020 10:16:52 +1000
+
+dump (0.4b46-6) unstable; urgency=medium
+
+  * fixed extended attribute verification logic (closes: #940473)
+
+ -- Alexander Zangerl <az@debian.org>  Sun, 06 Oct 2019 14:09:14 +1000
+
+dump (0.4b46-5) unstable; urgency=high
+
+  * applied patch by Michael Cree to make dump build on alpha again
+    (alpha has no getpid syscall, which
+    the #623422 patch for sparc uses) (closes: #900885)
+    
+ -- Alexander Zangerl <az@debian.org>  Sat, 09 Jun 2018 11:23:46 +1000
+
+dump (0.4b46-4) unstable; urgency=medium
+
+  * adjusted package description (closes: #866563)
+  * lifted standards version
+  * updated rules, no ssl support (incomplete and doesn't build)
+  * updated vcs links, now on salsa
+
+ -- Alexander Zangerl <az@debian.org>  Tue, 05 Jun 2018 22:04:39 +1000
 
 dump (0.4b46-3) unstable; urgency=medium
 
@@ -32,7 +90,7 @@ dump (0.4b45-5) unstable; urgency=medium
   * amend build depends for lzo2 compression (closes: #836692)
   * ensure that conditional compilation for compression-related
 	  code is primed suitably (closes: #836548, #836674)
-
+	
  -- Alexander Zangerl <az@debian.org>  Mon, 05 Sep 2016 18:06:43 +1000
 
 dump (0.4b45-4) unstable; urgency=medium
@@ -52,7 +110,7 @@ dump (0.4b45-2) unstable; urgency=high
 
   * interim build with QFA disabled, as that triggers a
     segfault and renders dump completely broken (closes: #826398)
-
+	
  -- Alexander Zangerl <az@debian.org>  Wed, 08 Jun 2016 19:04:16 +1000
 
 dump (0.4b45-1) unstable; urgency=medium
diff --git a/debian/compat b/debian/compat
index ec63514..f599e28 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-9
+10
diff --git a/debian/control b/debian/control
index f92635d..73f9bd7 100644
--- a/debian/control
+++ b/debian/control
@@ -2,35 +2,22 @@ Source: dump
 Section: utils
 Priority: optional
 Maintainer: Alexander Zangerl <az@debian.org>
-Build-Depends: debhelper (>= 9),
-               autoconf,
-               autotools-dev,
-							 dh-autoreconf,
-               comerr-dev,
-               e2fslibs-dev,
-               libblkid-dev,
-               libbz2-dev,
-							 liblzo2-dev,
-               libdevmapper-dev,
-               libreadline-dev,
-               libselinux1-dev,
-               pkg-config,
-               uuid-dev,
-               zlib1g-dev
-Standards-Version: 3.9.8
+Build-Depends: debhelper (>= 10), autoconf, comerr-dev, e2fslibs-dev, libblkid-dev, libbz2-dev,  liblzo2-dev, libdevmapper-dev, libreadline-dev,  libselinux1-dev, pkg-config, uuid-dev, zlib1g-dev
+Standards-Version: 4.1.3.0
 Homepage: http://dump.sourceforge.net
-Vcs-Git: https://salsa.debian.org/debian/dump.git
 Vcs-Browser: https://salsa.debian.org/debian/dump
+Vcs-Git: https://salsa.debian.org/debian/dump.git
 
 Package: dump
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}, tar (>= 1.13.92-3)
-Description: 4.4bsd dump and restore for ext2 filesystems
+Description: backup and restore for ext2/3/4 filesystems
+ This is a port of the 4.4BSD filesystem backup suite.
  Dump examines files on a filesystem and determines which files need to be
  backed up. These files are copied to the given disk, tape or other storage
  medium for safe keeping.
  .
  The restore command performs the inverse function of dump. A full backup of
  a filesystem may be restored and subsequent incremental backups layered on
- top of it.  Single files and directory subtrees may be restored from full or
+ top of it. Single files and directory subtrees may be restored from full or
  partial backups.
diff --git a/debian/copyright b/debian/copyright
index b659fec..6134885 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,4 +1,4 @@
-Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Upstream-Name: dump
 Source: http://dump.sf.net
 
@@ -11,13 +11,6 @@ Copyright: 1980-1993 The Regents of the University of California
 License: BSD-3-clause
 
 
-Files: compat/include/lzoconf.h
-       compat/lib/minilzo.c
-       compat/include/minilzo.h
-Copyright: 1996-2002 Markus Franz Xaver Johannes Oberhumer
-License: GPL-2+
-
-
 Files: debian/*
 Copyright: 1997-2013 Bdale Garbee <bdale@gag.com>
            2013      Mattia Rizzolo <mattia@mapreri.org>
diff --git a/debian/docs b/debian/docs
index bd88604..15a7f04 100644
--- a/debian/docs
+++ b/debian/docs
@@ -3,4 +3,4 @@ MAINTAINERS
 README
 REPORTING-BUGS
 TODO
-debian/NEWS.Debian
\ No newline at end of file
+debian/NEWS
\ No newline at end of file
diff --git a/debian/patches/bashism_in_examples b/debian/patches/bashism_in_examples
index 0a8efca..cc4b860 100644
--- a/debian/patches/bashism_in_examples
+++ b/debian/patches/bashism_in_examples
@@ -23,24 +23,6 @@ Bug-Debian: http://bugs.debian.org/489570
  
  write_output() {
  	# supplied info from "dump -F":
-@@ -55,14 +50,14 @@ write_output() {
- 	while [ "$ANSWER" != "y" ] ; do
- 		echo -n "Is the disk ready? (y/n) "
- 		read  </dev/tty ANSWER
--		if [ "$ANSWER" == "y" ] ; then
-+		if [ "$ANSWER" = "y" ] ; then
- 			(${RECORD_BIN}${1}) &
- 			return 0
--		elif [ "$ANSWER" == "n" ] ; then
-+		elif [ "$ANSWER" = "n" ] ; then
- 			EXIT=""
- 			echo -n "Do you really want to exit? (y/n) "
- 			read </dev/tty EXIT
--			if [ "$EXIT" == "y" ] ; then
-+			if [ "$EXIT" = "y" ] ; then
- 				return 1
- 			fi
- 		fi
 @@ -83,7 +78,7 @@ if [ "$#" = "2" ] && [ -p "$1" ]; then
  	exit 0
  else
diff --git a/debian/patches/blkid b/debian/patches/blkid
new file mode 100644
index 0000000..380b814
--- /dev/null
+++ b/debian/patches/blkid
@@ -0,0 +1,559 @@
+--- a/dump/dump.h
++++ b/dump/dump.h
+@@ -223,8 +223,8 @@ extern int	nddates;		/* number of record
+ extern int	ddates_in;		/* we have read the increment file */
+ extern struct	dumpdates **ddatev;	/* the arrayfied version */
+ void	initdumptimes (int);
+-void	getdumptime (int);
+-void	putdumptime (void);
++void	getdumptime (int, const char *);
++void	putdumptime (const char *);
+ #define	ITITERATE(i, ddp) \
+ 	for (ddp = ddatev[i = 0]; i < nddates; ddp = ddatev[++i])
+ 
+--- a/dump/itime.c
++++ b/dump/itime.c
+@@ -147,7 +147,7 @@ readdumptimes(FILE *df)
+ }
+ 
+ void
+-getdumptime(int createdumpdates)
++getdumptime(int createdumpdates, const char * disk)
+ {
+ 	struct dumpdates *ddp;
+ 	int i;
+@@ -185,7 +185,7 @@ getdumptime(int createdumpdates)
+ }
+ 
+ void
+-putdumptime(void)
++putdumptime(const char * disk)
+ {
+ 	FILE *df;
+ 	struct dumpdates *dtwalk;
+--- a/dump/main.c
++++ b/dump/main.c
+@@ -664,7 +664,7 @@ main(int argc, char *argv[])
+ 	spcl.c_level = atoi(level);
+ 	spcl.c_type = TS_TAPE;
+ 	if (!Tflag)
+-		getdumptime(uflag);		/* dumpdates snarfed */
++     getdumptime(uflag,diskparam);		/* dumpdates snarfed */
+ 
+ 	if (spcl.c_ddate == 0 && spcl.c_level) {
+ 		msg("WARNING: There is no inferior level dump on this filesystem\n");
+@@ -1029,7 +1029,7 @@ main(int argc, char *argv[])
+ 		    tend_writing - tstart_writing,
+ 		    spcl.c_tapea / (tend_writing - tstart_writing));
+ 
+-	putdumptime();
++	putdumptime(diskparam);
+ 	msg("Date of this level %s dump: %s", level,
+ 		spcl.c_date == 0 ? "the epoch\n" : ctime4(&spcl.c_date));
+ 	msg("Date this dump completed:  %s", ctime(&tnow));
+--- a/dump/dump.8.in
++++ b/dump/dump.8.in
+@@ -1,5 +1,5 @@
+ .\" Copyright (c) 1980, 1991, 1993
+-.\"	 Regents of the University of California.
++.\"  Regents of the University of California.
+ .\" All rights reserved.
+ .\"
+ .\" Redistribution and use in source and binary forms, with or without
+@@ -30,7 +30,7 @@
+ .SH NAME
+ dump \- ext2/3/4 filesystem backup
+ .SH SYNOPSIS
+-.B dump 
++.B dump
+ [\fB\-\fIlevel#\fR]
+ [\fB\-ackMnqSuv]
+ [\fB\-A \fIfile\fR]
+@@ -53,32 +53,44 @@ dump \- ext2/3/4 filesystem backup
+ [\fB\-z\fIcompression level\fR]
+ .I files-to-dump
+ .PP
+-.B dump 
++.B dump
+ [\fB\-W \fR| \fB\-w\fR]
+ .SH DESCRIPTION
+ .B Dump
+ examines files on an ext2/3/4 filesystem and determines which files need to be
+ backed up. These files are copied to the given disk, tape or other storage
+ medium for safe keeping (see the
+-.B \-f 
+-option below for doing remote backups). A dump that is larger than the output 
++.B \-f
++option below for doing remote backups). A dump that is larger than the output
+ medium is broken into multiple volumes. On most media the size is determined by
+ writing until an end-of-media indication is returned.
+ .PP
+ On media that cannot reliably return an end-of-media indication (such as some
+-cartridge tape drives), each volume is of a fixed size; the actual size is 
++cartridge tape drives), each volume is of a fixed size; the actual size is
+ determined by specifying cartridge media, or via the tape size, density and/or
+ block count options below. By default, the same output file name is used for
+ each volume after prompting the operator to change media.
+ .PP
+ .I files-to-dump
+-is either a mountpoint of a filesystem or a list of files and directories to be
+-backed up as a subset of a filesystem. In the former case, either the path to a
+-mounted filesystem or the device of an unmounted filesystem can be used. In the
+-latter case, certain restrictions are placed on the backup:
++can be a filesystem identifier or a list of files and directories to be backed up.
++.PP
++A filesystem can be identified by its device path (e.g.
++.IR "/dev/sde2" ),
++by its mountpoint if the filesystem is currently mounted (e.g.
++.IR /var ),
++or by its label or uuid property if the block device is known to
++.BR blkid (8)
++(e.g.
++.I LABEL=foobar
++or
++.IR UUID=a0f155-... ).
++.PP
++If
++.I files-to-dump
++is a list of files and directories, then certain restrictions apply:
+ .B \-u
+ is not allowed, the only dump level that is supported is
+-.B 0 
++.B 0
+ and all the files and directories must reside on the same filesystem.
+ .SH OPTIONS
+ The following options are supported by
+@@ -92,21 +104,21 @@ guarantees the entire file system is cop
+ option below). A level number above 0, incremental backup, tells
+ .B dump
+ to
+-copy all files new or modified since the last dump of a lower level. The 
++copy all files new or modified since the last dump of a lower level. The
+ default level is 0. Historically only levels 0 to 9 were usable in
+ dump, this version is able to understand any integer as a dump level.
+ .TP
+-.BI \-a 
+-\*(lqauto-size\*(rq. Bypass all tape length calculations, and write until an 
++.BI \-a
++\*(lqauto-size\*(rq. Bypass all tape length calculations, and write until an
+ end-of-media indication is returned.  This works best for most modern tape
+ drives, and is the default. Use of this option is particularly recommended when
+-appending to an existing tape, or using a tape drive with hardware compression 
++appending to an existing tape, or using a tape drive with hardware compression
+ (where you can never be sure about the compression ratio).
+ .TP
+ .BI \-A " archive_file"
+ Archive a dump table-of-contents in the specified
+ .I archive_file
+-to be used by 
++to be used by
+ .BR restore (8)
+ to determine whether a file is in the dump file that is being restored.
+ .TP
+@@ -117,7 +129,7 @@ unless the
+ option has been used to specify a tape density of 6250BPI or more,
+ in which case the default blocksize is 32. Th maximal value is 1024.
+ Note however that, since the IO system slices all requests into chunks
+-of 
++of
+ .B MAXBSIZE
+ (which can be as low as 64kB), you can experience problems with
+ .BR dump (8)
+@@ -130,8 +142,8 @@ The number of 1 kB blocks per volume. No
+ .B dump
+ can detect end-of-media. When the specified size is reached,
+ .B dump
+-waits for you to change the volume.  This option overrides the calculation of 
+-tape size based on length and density. If compression is on this limits the 
++waits for you to change the volume.  This option overrides the calculation of
++tape size based on length and density. If compression is on this limits the
+ size of the compressed output per volume.  Multiple values may be given
+ as a single argument separated by commas.  Each value will be used for one
+ dump volume in the order listed; if
+@@ -154,12 +166,12 @@ The default is 1600BPI. Specifying a tap
+ detection.
+ .TP
+ .BI \-D " file"
+-Set the path name of the file storing the information about the previous 
++Set the path name of the file storing the information about the previous
+ full and incremental dumps. The default location is
+ .IR __DUMPDATES__ .
+ .TP
+ .BI \-e " inodes"
+-Exclude 
++Exclude
+ .I inodes
+ from the dump. The
+ .I inodes
+@@ -170,7 +182,7 @@ to find the inode number for a file or d
+ .BI \-E " file"
+ Read list of inodes to be excluded from the dump from the text file
+ .IR file .
+-The file 
++The file
+ .I file
+ should be an ordinary file containing inode numbers separated by newlines.
+ .TP
+@@ -193,7 +205,7 @@ media changes. If the name of the file i
+ or
+ .I user@host:file
+ .B dump
+-writes to the named file on the remote host (which should already 
++writes to the named file on the remote host (which should already
+ exist, dump doesn't create a new remote file) using
+ .BR rmt (8).
+ The default path name of the remote
+@@ -204,13 +216,13 @@ this can be overridden by the environmen
+ .BR RMT .
+ .TP
+ .BI \-F " script"
+-Run script at the end of each tape (except for the last one). 
++Run script at the end of each tape (except for the last one).
+ The device name and the current volume number are passed on the
+-command line. The script must return 0 if 
++command line. The script must return 0 if
+ .B dump
+-should continue without asking the user to change the tape, 1 if 
++should continue without asking the user to change the tape, 1 if
+ .B dump
+-should continue but ask the user to change the tape. Any other exit code will 
++should continue but ask the user to change the tape. Any other exit code will
+ cause
+ .B dump
+ to abort. For security reasons,
+@@ -231,11 +243,11 @@ full backups retain them.
+ .BI \-I " nr errors"
+ By default,
+ .B dump
+-will ignore the first 32 read errors on the file system before asking for 
+-operator intervention. You can change this using this flag to any value. This 
++will ignore the first 32 read errors on the file system before asking for
++operator intervention. You can change this using this flag to any value. This
+ is useful when running
+ .B dump
+-on an active filesystem where read errors simply indicate an inconsistency 
++on an active filesystem where read errors simply indicate an inconsistency
+ between the mapping and dumping passes.
+ .IP
+ A value of 0 means that all read errors will be ignored.
+@@ -244,12 +256,12 @@ A value of 0 means that all read errors
+ Compress every block to be written on the tape using bzlib library. This option
+ will work only when dumping to a file or pipe or, when dumping to a tape drive,
+ if the tape drive is capable of writing variable length blocks. You will need
+-at least the 0.4b24 version of 
++at least the 0.4b24 version of
+ .B restore
+ in order to extract compressed tapes. Tapes written using compression will not
+-be compatible with the BSD tape format. The (optional) parameter specifies the 
++be compatible with the BSD tape format. The (optional) parameter specifies the
+ compression level bzlib will use. The default compression level is 2. If the
+-optional parameter is specified, there should be no white space between the 
++optional parameter is specified, there should be no white space between the
+ option letter and the parameter.
+ .TP
+ .BI \-k
+@@ -265,20 +277,20 @@ is placed into the dump header, where to
+ .BR restore (8)
+ and
+ .BR file (8)
+-can access it. Note that this label is limited to be at most 
++can access it. Note that this label is limited to be at most
+ .B LBLSIZE
+ (currently 16) characters, which must include the terminating \e0.
+ .TP
+ .BI \-m
+ If this flag is specified,
+ .B dump
+-will optimise the output for inodes having been changed but not modified since 
++will optimise the output for inodes having been changed but not modified since
+ the last dump ('changed' and 'modified' have the meaning defined in
+ .BR stat (2)
+ ). For those inodes,
+ .B dump
+-will save only the metadata, instead of saving the entire inode contents. 
+-Inodes which are either directories or have been modified since the last dump 
++will save only the metadata, instead of saving the entire inode contents.
++Inodes which are either directories or have been modified since the last dump
+ are saved in a regular way. Uses of this flag must be consistent, meaning that
+ either every dump in an incremental dump set have the flag, or no one has it.
+ .IP
+@@ -293,12 +305,12 @@ BSD tape format or older versions of
+ .B restore.
+ .TP
+ .BI \-M
+-Enable the multi-volume feature. The name specified with 
+-.B f 
+-is treated as a prefix and 
++Enable the multi-volume feature. The name specified with
++.B f
++is treated as a prefix and
+ .B dump
+ writes in sequence to
+-.I <prefix>001, <prefix>002 
++.I <prefix>001, <prefix>002
+ etc. This can be useful when dumping to files on an ext2/3/4 partition, in order to
+ bypass the 2GB file size limitation.
+ .TP
+@@ -317,31 +329,31 @@ abort immediately whenever operator atte
+ case of write errors, tape changes etc.
+ .TP
+ .BI \-Q " file"
+-Enable the Quick File Access support. Tape positions for each inode are stored 
++Enable the Quick File Access support. Tape positions for each inode are stored
+ into the file
+ .I file
+-which is used by 
++which is used by
+ .B restore
+-(if called with parameter 
++(if called with parameter
+ .B \-Q
+-and the filename) to directly position the tape at the file 
+-.B restore 
++and the filename) to directly position the tape at the file
++.B restore
+ is currently working on. This saves hours when restoring single files from
+ large backups, saves the tapes and the drive's head.
+ .IP
+-It is recommended to set up the st driver to return logical tape positions 
+-rather than physical before calling 
+-.B dump/restore 
+-with parameter 
++It is recommended to set up the st driver to return logical tape positions
++rather than physical before calling
++.B dump/restore
++with parameter
+ .BR \-Q .
+-Since not all tape devices support physical tape positions those tape devices 
+-return an error during 
++Since not all tape devices support physical tape positions those tape devices
++return an error during
+ .B dump/restore
+-when the st driver is set to the default physical setting.  Please see the 
++when the st driver is set to the default physical setting.  Please see the
+ .BR st (4)
+-man page, option 
++man page, option
+ .B MTSETDRVBUFFER
+-, or the 
++, or the
+ .BR mt (1)
+ man page, on how to set the driver to return logical tape positions.
+ .IP
+@@ -350,21 +362,21 @@ Before calling
+ with parameter
+ .BR \-Q ,
+ always make sure the st driver is set to return the same type of tape position
+-used during the call to 
++used during the call to
+ .BR dump .
+-Otherwise 
++Otherwise
+ .B restore
+ may be confused.
+ .IP
+-This option can be used when dumping to local tapes (see above) or to local 
++This option can be used when dumping to local tapes (see above) or to local
+ files.
+ .TP
+ .BI \-s " feet"
+ Attempt to calculate the amount of tape needed at a particular density. If this
+ amount is exceeded,
+ .B dump
+-prompts for a new tape. It is recommended to be a bit conservative on this 
+-option. The default tape length is 2300 feet. Specifying the tape size 
++prompts for a new tape. It is recommended to be a bit conservative on this
++option. The default tape length is 2300 feet. Specifying the tape size
+ overrides end-of-media detection.
+ .TP
+ .BI \-S
+@@ -374,7 +386,7 @@ take. This is useful with incremental du
+ media will be needed.
+ .TP
+ .BI \-T " date"
+-Use the specified date as the starting time for the dump instead of the time 
++Use the specified date as the starting time for the dump instead of the time
+ determined from looking in
+ .I __DUMPDATES__ .
+ The format of
+@@ -389,7 +401,7 @@ daylight savings time (if applicable to
+ when daylight savings time is in effect will be different than offsets
+ when daylight savings time is not in effect. For backward
+ compatibility, if no timezone is specified, a local time is assumed.
+-This option is useful for automated dump scripts that wish to dump over a 
++This option is useful for automated dump scripts that wish to dump over a
+ specific period of time. The
+ .B \-T
+ option is mutually exclusive from the
+@@ -401,15 +413,21 @@ Update the file
+ .I __DUMPDATES__
+ after a successful dump. The format of
+ .I __DUMPDATES__
+-is readable by people, consisting of one free format record per line:
+-filesystem name, increment level and
++is human-readable, with one record per line. Each line holds, separated by spaces,
++a filesystem identifier, dump increment level and dump date in
+ .BR ctime (3)
+-format dump date followed by a rfc822 timezone specification (see the
+-.B \-u
+-option for details). If no timezone offset is specified, times are interpreted 
+-as local. Whenever the file is written, all dates in the file are converted 
+-to the local time zone, without changing the UTC times. There
+-may be only one entry per filesystem at each level. The file
++format followed by a rfc822 timezone specification (see the
++.B \-T
++option for details). If no timezone offset is specified, times are interpreted
++as local. Whenever the file is written, all dates in the file are converted
++to the local time zone, without changing the UTC times.
++.IP
++The filesystem identifier is exactly as given on the command line, e.g.
++.B UUID=a0f155-...
++or
++.BR /dev/sde2 .
++This is for incremental dumps of filesystems on removable media or other
++situations where the device path changes over time. There may be at most one entry per filesystem for each increment level. The file
+ .I __DUMPDATES__
+ may be edited to change any of the fields, if necessary.
+ .TP
+@@ -437,13 +455,13 @@ and recognized file systems in
+ .I /etc/mtab
+ and
+ .IR /etc/fstab .
+-the most recent dump date and level, and highlights those that should be 
++the most recent dump date and level, and highlights those that should be
+ dumped. If the
+ .B \-W
+ option is set, all other options are ignored, and
+ .B dump
+ exits immediately.
+-.TP 
++.TP
+ .BI \-w
+ Is like
+ .BR \-W ,
+@@ -466,18 +484,18 @@ be compatible with the BSD tape format.
+ .BI \-z "compression level"
+ Compress every block to be written on the tape using zlib library. This option
+ will work only when dumping to a file or pipe or, when dumping to a tape drive,
+-if the tape drive is capable of writing variable length blocks. You will need 
++if the tape drive is capable of writing variable length blocks. You will need
+ at least the 0.4b22 version of
+ .B restore
+ in order to extract compressed tapes. Tapes written using compression will not
+ be compatible with the BSD tape format. The (optional) parameter specifies the
+ compression level zlib will use. The default compression level is 2. If the
+-optional parameter is specified, there should be no white space between the 
++optional parameter is specified, there should be no white space between the
+ option letter and the parameter.
+ .PP
+ .B Dump
+ requires operator intervention on these conditions: end of tape, end of dump,
+-tape write error, tape open error or disk read error (if there is more than a 
++tape write error, tape open error or disk read error (if there is more than a
+ threshold of nr errors). In addition to alerting all operators implied by the
+ .B \-n
+ key,
+@@ -499,7 +517,7 @@ will, with operator permission, restart
+ old tape has been rewound and removed, and a new tape has been mounted.
+ .PP
+ .B Dump
+-tells the operator what is going on at periodic intervals, including usually 
++tells the operator what is going on at periodic intervals, including usually
+ low estimates of the number of blocks to write, the number of tapes it will
+ take, the time to completion, and the time to the tape change. The output is
+ verbose, so that others know that the terminal controlling
+@@ -507,7 +525,7 @@ verbose, so that others know that the te
+ is busy, and will be for some time.
+ .PP
+ In the event of a catastrophic disk event, the time required to restore all the
+-necessary backup tapes or files to disk can be kept to a minimum by staggering 
++necessary backup tapes or files to disk can be kept to a minimum by staggering
+ the incremental dumps. An efficient method of staggering incremental dumps to
+ minimize the number of tapes follows:
+ .IP \(em
+@@ -527,7 +545,7 @@ with this sequence of dump levels:
+ .IP
+ For the daily dumps, it should be possible to use a fixed number of tapes for
+ each day, used on a weekly basis. Each week, a level 1 dump is taken, and the
+-daily Hanoi sequence repeats beginning with 3. For weekly dumps, another fixed 
++daily Hanoi sequence repeats beginning with 3. For weekly dumps, another fixed
+ set of tapes per dumped file system is used, also on a cyclical basis.
+ .PP
+ After several months or so, the daily and weekly tapes should get rotated out
+@@ -542,10 +560,10 @@ information).
+ (The 4.3BSD option syntax is implemented for backward compatibility but is not
+ documented here.)
+ .SH ENVIRONMENT
+-.TP 
++.TP
+ .B TAPE
+-If no 
+-.B \-f 
++If no
++.B \-f
+ option was specified,
+ .B dump
+ will use the device specified via
+@@ -569,7 +587,7 @@ program.
+ .B Dump
+ uses the contents of this variable to determine the name of the remote shell
+ command to use when doing remote backups (rsh, ssh etc.). If this variable is
+-not set, 
++not set,
+ .BR rcmd (3)
+ will be used, but only root will be able to do remote backups.
+ .SH FILES
+@@ -612,7 +630,7 @@ code of 1; abnormal termination is indic
+ It might be considered a bug that this version of dump can only handle ext2/3/4
+ filesystems.  Specifically, it does not work with FAT filesystems.
+ .PP
+-Fewer than 32 read errors (change this with 
++Fewer than 32 read errors (change this with
+ .BR \-I )
+ on the filesystem are ignored. If noticing read errors is important, the output
+ from dump can be parsed to look for lines that contain the text 'read error'.
+@@ -621,7 +639,7 @@ When a read error occurs,
+ .B dump
+ prints out the corresponding physical disk block and sector number and the
+ ext2/3/4 logical block number. It doesn't print out the corresponding file name or
+-even the inode number. The user has to use 
++even the inode number. The user has to use
+ .BR debugfs (8),
+ commands
+ .B ncheck
+@@ -629,7 +647,7 @@ and
+ .B icheck
+ to translate the
+ .B ext2blk
+-number printed out by 
++number printed out by
+ .B dump
+ into an inode number, then into a file name.
+ .PP
+@@ -641,21 +659,21 @@ The estimated number of tapes is not cor
+ It would be nice if
+ .B dump
+ knew about the dump sequence, kept track of the tapes scribbled on, told the
+-operator which tape to mount when, and provided more assistance for the 
++operator which tape to mount when, and provided more assistance for the
+ operator running
+ .BR restore .
+ .PP
+ .B Dump
+ cannot do remote backups without being run as root, due to its security history.
+ Presently, it works if you set it setuid (like it used to be), but this might
+-constitute a security risk. Note that you can set 
++constitute a security risk. Note that you can set
+ .B RSH
+ to use a remote shell program instead.
+ .SH AUTHOR
+-The 
++The
+ .B dump/restore
+-backup suite was ported to Linux's Second Extended File System by Remy Card 
+-<card@Linux.EU.Org>. He maintained the initial versions of 
++backup suite was ported to Linux's Second Extended File System by Remy Card
++<card@Linux.EU.Org>. He maintained the initial versions of
+ .B dump
+ (up and including 0.4b4, released in January 1997).
+ .PP
diff --git a/debian/patches/ftruncate b/debian/patches/ftruncate
deleted file mode 100644
index aabc107..0000000
--- a/debian/patches/ftruncate
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/restore/tape.c
-+++ b/restore/tape.c
-@@ -1421,8 +1421,10 @@ loop:
- 		last_write_was_hole = 1;
- 	}
- 	if (last_write_was_hole) {
--		if (ftruncate(ofile, origsize) < 0)
--			warn("%s: ftruncate", curfile.name);
-+		 /* do not attempt a truncate if running an on-the-fly compare, as there
-+				IS no file to truncate in that case! */
-+		 if (ofile >= 0 && ftruncate(ofile, origsize) < 0)
-+				warn("%s: ftruncate", curfile.name);
- 	}
- 	if (!readingmaps)
- 		findinode(&spcl);
-@@ -1901,6 +1903,7 @@ comparefile(char *name)
- 		}
- 		else {
- 			cmperror = 0;
-+			ofile = -1;	/* instruct getfile to not truncate as there is no open file: xtrcmpfile works off mem buffer */
- 			getfile(xtrcmpfile, xtrcmpskip);
- 			if (!cmperror) {
- 				char c;
diff --git a/debian/patches/gcc10_nocommon b/debian/patches/gcc10_nocommon
new file mode 100644
index 0000000..04c65bd
--- /dev/null
+++ b/debian/patches/gcc10_nocommon
@@ -0,0 +1,87 @@
+--- a/compat/include/protocols/dumprestore.h
++++ b/compat/include/protocols/dumprestore.h
+@@ -78,12 +78,12 @@ typedef u_int32_t	dump_ino_t;
+ typedef unsigned int	dump_ino_t;
+ #endif
+ 
+-union u_data {
++extern union u_data {
+ 	char	s_addrs[TP_NINDIR];	/* 1 => data; 0 => hole in inode */
+ 	int32_t	s_inos[TP_NINOS];	/* table of first inode on each volume */
+ } u_data;
+ 
+-union u_spcl {
++extern union u_spcl {
+ 	char dummy[TP_BSIZE];
+ 	struct	s_spcl {
+ 		int32_t	c_type;		    /* record type (see below) */
+--- a/dump/main.c
++++ b/dump/main.c
+@@ -73,6 +73,8 @@
+ #endif
+ 
+ #include <protocols/dumprestore.h>
++union u_spcl u_spcl;
++union u_data u_data;
+ 
+ #include "dump.h"
+ #include "pathnames.h"
+--- a/restore/main.c
++++ b/restore/main.c
+@@ -65,6 +65,8 @@
+ #endif
+ #endif	/* __linux__ */
+ #include <protocols/dumprestore.h>
++union u_spcl u_spcl;
++union u_data u_data;
+ 
+ #include <compaterr.h>
+ #include <stdio.h>
+@@ -78,6 +80,7 @@
+ 
+ #include "pathnames.h"
+ #include "restore.h"
++struct context curfile;
+ #include "extern.h"
+ 
+ int abortifconnerr = 1;		/* set to 1 if lib dumprmt.o should exit on connection errors
+--- a/dump/itime.c
++++ b/dump/itime.c
+@@ -71,11 +71,6 @@
+ 
+ #include "dump.h"
+ 
+-struct	dumpdates **ddatev;
+-int	nddates;
+-int	ddates_in;
+-struct	dumptime *dthead;
+-
+ static	void dumprecout (FILE *, struct dumpdates *);
+ static	int getrecord (FILE *, struct dumpdates *);
+ static	int makedumpdate (struct dumpdates *, char *);
+--- a/common/legacy_indexer.c
++++ b/common/legacy_indexer.c
+@@ -49,10 +49,8 @@ static int GetTapePos (long long *);
+ static int MkTapeString (struct s_spcl *, long long);
+ #define FILESQFAPOS	20
+ 
+-int tapepos;
+-int ntrec;		/* blocking factor on tape */
+-//extern int tapepos;
+-//extern int ntrec;		/* blocking factor on tape */
++extern int tapepos;
++extern int ntrec;		/* blocking factor on tape */
+ extern int magtapeout;  /* is output a magnetic tape? */
+ 
+ static int gtperr = 0;
+--- a/restore/restore.h
++++ b/restore/restore.h
+@@ -131,7 +131,7 @@ struct entry {
+ /*
+  * The entry describes the next file available on the tape
+  */
+-struct context {
++extern struct context {
+ 	char	*name;		/* name of file */
+ 	dump_ino_t ino;		/* inumber of file */
+ #if defined(__linux__) || defined(sunos)
diff --git a/debian/patches/memory b/debian/patches/memory
new file mode 100644
index 0000000..aed9aef
--- /dev/null
+++ b/debian/patches/memory
@@ -0,0 +1,158 @@
+Description: various memory-related patches
+ clang-reported return value and space gotchas, dynamic treescan buffer alloc
+Author: наб <nabijaczleweli@nabijaczleweli.xyz>
+Bug-Debian: http://bugs.debian.org/995996
+Bug-Debian: http://bugs.debian.org/1002836
+
+--- a/restore/dirs.c
++++ b/restore/dirs.c
+@@ -183,16 +183,15 @@ extractdirs(int genmode)
+ 	int fd;
+ 	char xattr[XATTR_MAXSIZE];
+ 	int xattr_found = 0;
++	_Bool is_tmp = command != 'r' && command != 'R';
+ 	dump_ino_t ino;
+ 
+ 	Vprintf(stdout, "Extract directories from tape\n");
+-	(void) snprintf(dirfile, sizeof(dirfile), "%s/rstdir%ld", tmpdir,
+-		(long)dumpdate);
+-	if (command != 'r' && command != 'R') {
+-		(void) strncat(dirfile, "-XXXXXX",
+-			sizeof(dirfile) - strlen(dirfile));
++	(void) snprintf(dirfile, sizeof(dirfile), "%s/rstdir%ld%s", tmpdir,
++		(long)dumpdate, is_tmp ? "-XXXXXX" : "");
++	if (is_tmp)
+ 		fd = mkstemp(dirfile);
+-	} else
++	else
+ 		fd = open(dirfile, O_RDWR|O_CREAT|O_EXCL, 0666);
+ 	if (fd == -1 || (df = fdopen(fd, "w")) == NULL) {
+ 		if (fd != -1)
+@@ -200,12 +199,10 @@ extractdirs(int genmode)
+ 		err(1, "cannot create directory temporary %s", dirfile);
+ 	}
+ 	if (genmode != 0) {
+-		(void) snprintf(modefile, sizeof(modefile), "%s/rstmode%ld", tmpdir, (long)dumpdate);
+-		if (command != 'r' && command != 'R') {
+-			(void) strncat(modefile, "-XXXXXX",
+-				sizeof(modefile) - strlen(modefile));
++		(void) snprintf(modefile, sizeof(modefile), "%s/rstmode%ld%s", tmpdir, (long)dumpdate, is_tmp ? "-XXXXXX" : "");
++		if (is_tmp)
+ 			fd = mkstemp(modefile);
+-		} else
++		else
+ 			fd = open(modefile, O_RDWR|O_CREAT|O_EXCL, 0666);
+ 		if (fd == -1 || (mf = fdopen(fd, "w")) == NULL) {
+ 			if (fd != -1)
+@@ -287,9 +284,8 @@ treescan(char *pname, dump_ino_t ino, lo
+ {
+ 	struct inotab *itp;
+ 	struct direct *dp;
+-	int namelen;
+ 	off_t bpt;
+-	char locname[MAXPATHLEN + 1];
++	char *locname;
+ 
+ 	itp = inotablookup(ino);
+ 	if (itp == NULL) {
+@@ -308,9 +304,6 @@ treescan(char *pname, dump_ino_t ino, lo
+ 	 * begin search through the directory
+ 	 * skipping over "." and ".."
+ 	 */
+-	namelen = snprintf(locname, sizeof(locname), "%s/", pname);
+-	if (namelen >= (int)sizeof(locname))
+-		namelen = sizeof(locname) - 1;
+ 	rst_seekdir(dirp, itp->t_seekpt, itp->t_seekpt);
+ 	dp = rst_readdir(dirp); /* "." */
+ 	if (dp != NULL && strcmp(dp->d_name, ".") == 0)
+@@ -328,15 +321,13 @@ treescan(char *pname, dump_ino_t ino, lo
+ 	 * a zero inode signals end of directory
+ 	 */
+ 	while (dp != NULL) {
+-		locname[namelen] = '\0';
+-		if (namelen + dp->d_namlen >= (int)sizeof(locname)) {
+-			fprintf(stderr, "%s%s: name exceeds %ld char\n",
+-				locname, dp->d_name, (long)sizeof(locname) - 1);
+-		} else {
+-			(void) strncat(locname, dp->d_name, (int)dp->d_namlen);
+-			treescan(locname, dp->d_ino, todo);
+-			rst_seekdir(dirp, bpt, itp->t_seekpt);
++		if (asprintf(&locname, "%s/%.*s", pname, (int)dp->d_namlen, dp->d_name) == -1) {
++			panic("Error: %s\n", strerror(errno));
++			abort();
+ 		}
++		treescan(locname, dp->d_ino, todo);
++		free(locname);
++		rst_seekdir(dirp, bpt, itp->t_seekpt);
+ 		dp = rst_readdir(dirp);
+ 		bpt = rst_telldir(dirp);
+ 	}
+--- a/common/indexer_test.c
++++ b/common/indexer_test.c
+@@ -105,7 +105,7 @@ mkchecksum(union u_spcl *tmpspcl)
+ /*
+  *
+  */
+-int
++void
+ dump_inode(Indexer *indexer, struct stat *buf)
+ {
+ 	struct dinode dinode;
+@@ -176,12 +176,13 @@ dump_walk(Indexer *indexer, const char *
+ 		}
+ 	}
+ 	closedir(dirp);
++  return 0;
+ }
+ 
+ /*
+  *
+  */
+-int
++void
+ test_indexer(Indexer *indexer, const char *filename, const char *path)
+ {
+ 	struct direct dp;
+--- a/restore/xattr.c
++++ b/restore/xattr.c
+@@ -314,7 +314,7 @@ fail:
+ static int
+ xattr_cb_list(char *name, char *value, int valuelen, int isSELinux, void *private)
+ {
+-	isSELinux;
++	(void) isSELinux;
+ 	value[valuelen] = '\0';
+ 	printf("EA: %s:%s\n", name, value);
+ 
+@@ -330,7 +330,7 @@ xattr_cb_set(char *name, char *value, in
+ 	if (Nflag)
+ 		return GOOD;
+ 
+-	isSELinux;
++	(void) isSELinux;
+ #ifdef TRANSSELINUX			/*GAN6May06 SELinux MLS */
+ 	if (isSELinux)
+ 		err = lsetfilecon(path, value);
+@@ -353,11 +353,11 @@ xattr_cb_compare(char *name, char *value
+ 	char valuef[XATTR_MAXSIZE];
+ 	int valuesz;
+ 
+-	isSELinux;
++	(void) isSELinux;
+ #ifdef TRANSSELINUX			/*GAN6May06 SELinux MLS */
+ 	if (isSELinux)
+ 	{
+-		security_context_t con = NULL;
++		char *con = NULL;
+ 
+ 		if (lgetfilecon(path, &con) < 0) {
+ 			warn("%s: EA compare lgetfilecon failed\n", path);
+@@ -513,7 +513,7 @@ xattr_walk(char *buffer, int (*xattr_cb)
+ 			convertcon = 0;	/*GAN24May06 only for selinux */
+ 
+ 		if (convertcon) {
+-			security_context_t con = NULL;
++			char *con = NULL;
+ 			int err;
+ 
+ 			if (!transselinuxarg)
diff --git a/debian/patches/qfa_mt b/debian/patches/qfa_mt
new file mode 100644
index 0000000..bd92d5e
--- /dev/null
+++ b/debian/patches/qfa_mt
@@ -0,0 +1,28 @@
+Description: fix qfa with actual tapes
+ fix for bug #965105, a critical variable was duplicated in two source files & marked static in one
+Author: Alexander Zangerl <az@debian.org>
+--- a/dump/tape.c
++++ b/dump/tape.c
+@@ -102,7 +102,7 @@ char	*nexttape;
+ extern  pid_t rshpid;
+ int 	eot_code = 1;
+ long long tapea_bytes = 0;	/* bytes_written at start of current volume */
+-static int magtapeout;		/* output is really a tape */
++int magtapeout;		/* output is really a tape */
+ 
+ static	ssize_t dump_atomic_read (int, char *, size_t);
+ static	ssize_t dump_atomic_write (int, const char *, size_t);
+--- a/common/legacy_indexer.c
++++ b/common/legacy_indexer.c
+@@ -51,10 +51,9 @@ static int MkTapeString (struct s_spcl *
+ 
+ int tapepos;
+ int ntrec;		/* blocking factor on tape */
+-int magtapeout;  /* is output a magnetic tape? */
+ //extern int tapepos;
+ //extern int ntrec;		/* blocking factor on tape */
+-//extern int magtapeout;  /* is output a magnetic tape? */
++extern int magtapeout;  /* is output a magnetic tape? */
+ 
+ static int gtperr = 0;
+ static int gTapeposfd = -1;			/* code below assumes fd >= 0 means do print */
diff --git a/debian/patches/series b/debian/patches/series
index cbe6403..9b02830 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,7 +1,12 @@
-symlinktime
-ftruncate
+upstream
 zerosep
 fix-manpage
 bashism_in_examples
 sparc-clone-lockup
 badentry_terminal
+xattr_verify
+qfa_mt
+gcc10_nocommon
+st_bsize
+memory
+blkid
diff --git a/debian/patches/skip-directories-scheduled-for-deletion b/debian/patches/skip-directories-scheduled-for-deletion
deleted file mode 100644
index 5fac5ba..0000000
--- a/debian/patches/skip-directories-scheduled-for-deletion
+++ /dev/null
@@ -1,59 +0,0 @@
-Description: Automatically generated patch (0.4b44-5)
- Last (up to) 3 git changes, FYI:
- .
- commit 8544ff70a0b617566795d1e0c611e5e9d98c66a4
- Author: Matthew Vernon <mcv21@cam.ac.uk>
- Date:   Mon Sep 29 11:37:04 2014 +0100
- .
-     Changelog for 0.4b44-5
- .
- commit 7da8aa42b8905f2f2c8644dfc148e07570a14a56
- Author: Matthew Vernon <mcv21@cam.ac.uk>
- Date:   Mon Sep 29 11:33:54 2014 +0100
- .
-     Patch from Ben Harris to skip directories already scheduled for deletion
- .
-     The patch assumes that if an entry has e_ino == 0, that means it's
-     already been passed to deletino() and added to removelist. I think
-     this is true. It's certainly the case that all additions to removelist
-     have e_ino == 0, so this should stop the hangs and the panics from
-     removino(). At worst, it will leave spurious directories around after
-     a restore.
- .
- commit 870ae1e4acd826d692cf2c547c27ee44f9ca2eab
- Author: Mattia Rizzolo <mattia@mapreri.org>
- Date:   Thu Sep 19 14:51:33 2013 +0100
- .
-     dump (0.4b44-4) unstable; urgency=low
- .
-       * QA upload.
-       * debian/postinst: drop --verbose flag from update-alternatives invocation.
-       * debian/*rm: add set -e to fix lintian warning.
-       * debian/control:
-         + add Homepage field.
-         + Update VCS fields to canonical values.
-         + Bump Standards-Version to 3.9.4. No changes required.
-       * Update to debhelper 9:
-         + debian/rules: update accordingly.
-         + debian/compat: bump compatibility level to 9.
-         + debian/control: bump debhelper versioned build-dep to >= 9.
-         + debian/docs: include docs previously manually installed.
-         + debian/examples: include previously-included examples.
-       * debian/copyright: update to DEP-5.
- .
-     # imported from the archive
-Author: Matthew Vernon <matthew@debian.org>
-
----
-
---- a/restore/restore.c
-+++ b/restore/restore.c
-@@ -595,7 +595,7 @@ findunreflinks(void)
- 					if (np->e_type == LEAF) {
- 						removeleaf(np);
- 						freeentry(np);
--					} else {
-+					} else if (np->e_ino != 0){
- 						np->e_flags |= TMPNAME;
- 						deleteino(np->e_ino);
- 						np->e_next = removelist;
diff --git a/debian/patches/sparc-clone-lockup b/debian/patches/sparc-clone-lockup
index 3dc5ebc..c791e92 100644
--- a/debian/patches/sparc-clone-lockup
+++ b/debian/patches/sparc-clone-lockup
@@ -1,6 +1,6 @@
 --- a/dump/tape.c
 +++ b/dump/tape.c
-@@ -738,7 +738,20 @@ rollforward(void)
+@@ -738,7 +738,24 @@ rollforward(void)
  pid_t
  fork_clone_io(void)
  {
@@ -12,7 +12,11 @@
 +   getppid();
 +   /* as per clone call manpage: caching! */
 +   getpid();
-+   syscall(SYS_getpid);
++#ifdef __alpha__
++   syscall(SYS_getxpid);
++#else
++    syscall(SYS_getpid);
++#endif
 +
 +   /* az: clone manpage doesn't say jack about what the
 +      child receives, but it's NOT ZERO on sparc. however, it seems the
diff --git a/debian/patches/st_bsize b/debian/patches/st_bsize
new file mode 100644
index 0000000..bebac06
--- /dev/null
+++ b/debian/patches/st_bsize
@@ -0,0 +1,16 @@
+Description: handle non-power-of-two filesystem i/o blocksizes better
+ fix for bug#995992
+Author: Alexander Zangerl <az@debian.org>
+--- a/restore/tape.c
++++ b/restore/tape.c
+@@ -394,8 +394,9 @@ setup(void)
+ 		fssize = TP_BSIZE;
+ 	if (stbuf.st_blksize >= TP_BSIZE && stbuf.st_blksize <= MAXBSIZE)
+ 		fssize = stbuf.st_blksize;
++  /* is it a power of two? fssize needs to be divisible by TP_BSIZE */
+ 	if (((fssize - 1) & fssize) != 0)
+-		errx(1, "bad block size %ld", fssize);
++     fssize = MAXBSIZE;
+ 	if (spcl.c_volume != 1)
+ 		errx(1, "Tape is not volume 1 of the dump");
+ 	if (gethead(&spcl) == FAIL) {
diff --git a/debian/patches/symlinktime b/debian/patches/symlinktime
deleted file mode 100644
index 801d4ea..0000000
--- a/debian/patches/symlinktime
+++ /dev/null
@@ -1,40 +0,0 @@
---- a/restore/tape.c
-+++ b/restore/tape.c
-@@ -900,6 +900,15 @@ extractfile(struct entry *ep, int doremo
- 		uid_t luid = curfile.dip->di_uid;
- 		gid_t lgid = curfile.dip->di_gid;
- #endif
-+#ifdef HAVE_UTIMENSAT
-+		struct timespec times[2];
-+
-+		times[0].tv_sec  =  timep[0].tv_sec;
-+		times[0].tv_nsec =  timep[0].tv_usec*1000;
-+		times[1].tv_sec  =  timep[1].tv_sec;
-+		times[1].tv_nsec =  timep[1].tv_usec*1000;
-+#endif
-+
- 		if (! (spcl.c_flags & DR_METAONLY)) {
- 			lnkbuf[0] = '\0';
- 			pathlen = 0;
-@@ -919,6 +928,10 @@ extractfile(struct entry *ep, int doremo
- 		if (lchown(name, luid, lgid) < 0)
- 			warn("%s: lchown", name);
- #endif
-+#ifdef HAVE_UTIMENSAT
-+		if (utimensat(AT_FDCWD, name, times, AT_SYMLINK_NOFOLLOW) < 0)
-+			 warn("%s: file timestamp update failed", name);
-+#endif
- 		extractattr(name);
- 		return (GOOD);
- 	}
---- a/configure.ac
-+++ b/configure.ac
-@@ -421,7 +421,7 @@ AC_SUBST(SQLITE3)
- dnl
- dnl Check for library functions
- dnl
--AC_CHECK_FUNCS(err errx verr verrx vwarn vwarnx warn warnx realpath lchown)
-+AC_CHECK_FUNCS(err errx verr verrx vwarn vwarnx warn warnx realpath lchown utimensat)
- AC_CHECK_FUNC(glob)
- 
- dnl
diff --git a/debian/patches/upstream b/debian/patches/upstream
new file mode 100644
index 0000000..66f7123
--- /dev/null
+++ b/debian/patches/upstream
@@ -0,0 +1,364 @@
+--- /dev/null
++++ b/autogen.sh
+@@ -0,0 +1,4 @@
++#!/bin/sh -x
++mkdir -p m4
++autoreconf -f -i
++git checkout -f INSTALL
+--- /dev/null
++++ b/testing/scripts/quick-regression.sh
+@@ -0,0 +1,354 @@
++#!/bin/bash
++
++#
++# 5-second regression test for dump/verify/restore. It's not intended to be
++# an exhaustive regression test, just a quick way to verify that you haven't
++# introduced any errors when changing code.
++#
++# N.B., this only verifies that THIS build of dump(8) and THIS build of
++# restore(8) will play well together. It does not guarantee that these systems
++# are compatible with released versions of the software! For that we need
++# to keep images of known-good partitions and dump files.
++#
++# Author: Bear Giles (bgiles@coyotesong.com)
++# License granted to dump project under non-advertising BSD license.
++#
++
++#
++# Create 10 MB virtual partition.
++#
++# mkvirtpart(filename, loop device)
++#
++mkvirtpart()
++{
++    FILENAME=$1
++    LOOPDEV=$2
++
++    if [ "$#" -ne "2" ]; then
++      /bin/echo "usage: mkvrtpart FILENAME LOOPDEV"
++      return 1
++    fi
++
++    # create 10M sparse file
++    /usr/bin/truncate -s 10M $FILENAME
++    if [ "$?" -ne "0" ]; then
++      /bin/echo "unable to create partition image."
++      return 1
++    fi
++
++    # mount and format it
++    /sbin/losetup $LOOPDEV $FILENAME
++    if [ "$?" -ne "0" ]; then
++      /bin/echo "setting up loop device failed."
++      return 1
++    fi
++
++    /sbin/mkfs -text4 $LOOPDEV
++    if [ "$?" -ne "0" ]; then
++      /bin/echo "formating test partition failed."
++      /sbin/losetup -d $LOOPDEV
++      return 1
++    fi
++
++    /sbin/losetup -d $LOOPDEV
++    if [ "$?" -ne "0" ]; then
++      /bin/echo "tearing down loop device failed."
++      return 1
++    fi
++}
++
++#
++# Populate test filesystem
++#
++# mktestfs(root)
++mktestfs()
++{
++    ROOT=$1
++
++    if [ "$#" -ne "1" ]; then
++      /bin/echo "usage: mktestfs ROOT"
++      return 1
++    fi
++
++    if [ "$ROOT" == "" -o "$ROOT" == "/" ]; then
++        /bin/echo "cowardly refusing to stomp on root."
++        return 1
++    fi
++
++    /usr/bin/install -d $ROOT
++
++    # create typical file
++    /usr/bin/touch $ROOT/perm644
++    /bin/chmod 0644 $ROOT/perm644
++
++    # create typical executable
++    /usr/bin/touch $ROOT/perm755
++    /bin/chmod 0755 $ROOT/perm755
++
++    # create multiple symlinks
++    /usr/bin/touch $ROOT/symlink
++    /bin/ln $ROOT/symlink $ROOT/symlink1
++    /bin/ln $ROOT/symlink $ROOT/symlink2
++
++    # create hard links
++    /usr/bin/touch $ROOT/hardlink
++    /bin/ln $ROOT/hardlink $ROOT/hardlink1
++    /bin/ln $ROOT/hardlink $ROOT/hardlink2
++
++    # create block device
++    /bin/mknod $ROOT/block b 10 20
++
++    # create character device
++    /bin/mknod $ROOT/char c 11 21
++
++    # create FIFO
++    /bin/mknod $ROOT/pipe p
++
++    # make sparse device
++    #/usr/bin/truncate -s 500k $ROOT/sparse
++
++    # populate some files
++    /bin/mkdir $ROOT/man1
++    /bin/cp -rp /usr/share/man/man1/* $ROOT/man1
++}
++
++#
++# Single test cycle
++#
++dump_verify_restore() {
++
++    if [ "$#" -lt "5" ]; then
++      /bin/echo "usage: dump_verify_restore SRC_LOOPDEV SRC_MOUNTPOINT DEST_LOOPDEV DEST_MOUNTPOINT DUMPFILE ..."
++      return 1
++    fi
++
++    SRC_LOOPDEV=$1
++    SRC_MOUNTPOINT=$2
++    DEST_LOOPDEV=$3
++    DEST_MOUNTPOINT=$4
++    DUMPFILE=$5
++
++    shift; shift; shift; shift; shift
++
++    /sbin/losetup $SRC_LOOPDEV $SRC_FILENAME
++    if [ "$?" -ne "0" ]; then
++      /bin/echo "setting up loop device failed."
++      return 1
++    fi
++
++    # we have to mount partition for verify to work even if we dump the
++    # underlying partition.
++    /bin/mount $SRC_LOOPDEV $SRC_MOUNTPOINT
++    if [ "$?" -ne "0" ]; then
++        /bin/echo "mounting source partition failed."
++        /sbin/losetup -d $SRC_LOOPDEV
++        return 1;
++    fi
++
++    # dump the test partition
++    ../dump/dump -0 $@ -f $DUMPFILE $SRC_LOOPDEV
++    if [ "$?" -ne "0" ]; then
++      echo "dump failed, error code $?"
++      /bin/rm $DUMPFILE
++      /bin/umount $SRC_MOUNTPOINT
++      /sbin/losetup -d $SRC_LOOPDEV
++      return 1
++    fi
++
++    # verify
++    ../restore/restore -C -f $DUMPFILE
++    if [ "$?" -ne "0" ]; then
++      echo "verification failed, error code $?"
++      /bin/rm $DUMPFILE
++      /bin/umount $SRC_MOUNTPOINT
++      /sbin/losetup -d $SRC_LOOPDEV
++      return 1
++    fi
++
++    # restore fs, compare to orginal one
++    # I can't do that yet since restore will only restore to the current directory.
++    # this makes sense for a number of reasons it difficult to test our newly
++    # compiled code.
++    # ../../restore/restore -r ...
++
++    # tear everything down
++    /bin/umount $SRC_MOUNTPOINT
++    if [ "$?" -ne "0" ]; then
++       /bin/echo "unmounting test partition failed."
++       return 1
++    fi
++
++    /sbin/losetup -d $SRC_LOOPDEV
++    if [ "$?" -ne "0" ]; then
++      /bin/echo "tearing down loop device failed."
++      return 1
++    fi
++}
++
++#
++# set up source partition.
++#
++setup_src_partition() {
++    SRC_FILENAME=$1
++    SRC_LOOPDEV=$2
++    SRC_MOUNTPOINT=$3
++
++    if [ "$#" -ne "3" ]; then
++      /bin/echo "usage: setup_src_partition SRC_FILENAME SRC_LOOPDEV SRC_MOUNTPOINT"
++      return 1
++    fi
++
++    mkvirtpart $SRC_FILENAME $SRC_LOOPDEV
++    if [ $? -ne 0 ]; then
++       /bin/echo "creating source test partition failed."
++       return 1
++    fi
++
++    # mount it
++    /sbin/losetup $SRC_LOOPDEV $SRC_FILENAME
++    if [ "$?" -ne "0" ]; then
++       /bin/echo "setting up loop device failed."
++       return 1
++    fi
++
++    /bin/mount $SRC_LOOPDEV $SRC_MOUNTPOINT
++    if [ "$?" -ne "0" ]; then
++       /bin/echo "mounting test partition failed."
++       return 1
++    fi
++
++    mktestfs $SRC_MOUNTPOINT
++    if [ "$?" -ne "0" ]; then
++       return 1
++    fi
++
++    /bin/umount $SRC_LOOPDEV
++    if [ "$?" -ne "0" ]; then
++       /bin/echo "unmounting test partition failed."
++       return 1
++    fi
++
++    /sbin/losetup -d $SRC_LOOPDEV
++    if [ "$?" -ne "0" ]; then
++      /bin/echo "tearing down loop device failed."
++      return 1
++    fi
++
++    return 0
++}
++
++
++#
++# clean up temporary files. We want to be extremely careful here that
++# we don't accidently do a 'rm -rf' on /
++#
++cleanup() {
++
++    if [ "$#" -ne "6" ]; then
++      /bin/echo "usage: cleanup SRC_FILENAME SRC_MOUNTPOINT DEST_FILENAME DEST_MOUNTPOINT BASEDIR DUMPFILE"
++      return 1
++    fi
++
++    SRC_FILENAME=$1
++    SRC_MOUNTPOINT=$2
++    DEST_FILENAME=$3
++    DEST_MOUNTPOINT=$4
++    BASEDIR=$5
++    DUMPFILE=$6
++
++    if [ "$BASEDIR" == "" -o "$BASEDIR" == "/" ]; then
++        /bin/echo "cowardly refusing to delete root."
++        return 1
++    fi
++
++    # we don't do rm -r since we don't want to delete
++    # anything we didn't create.
++    /bin/rm -f $SRC_FILENAME
++    /bin/rmdir $SRC_MOUNTPOINT
++    /bin/rm -f $DEST_FILENAME
++    /bin/rmdir $DEST_MOUNTPOINT
++    /bin/rm -f $DUMPFILE
++    /bin/rmdir $BASEDIR
++
++    return 0
++}
++
++###############################################
++#
++# the actual script
++#
++BASEDIR=`/bin/mktemp -d`
++
++SRC_FILENAME=$BASEDIR/dump-test-src.img
++SRC_LOOPDEV=/dev/loop6
++SRC_MOUNTPOINT=$BASEDIR/src
++DEST_FILENAME=$BASEDIR/dump-test-dst.img
++DEST_LOOPDEV=/dev/loop7
++DEST_MOUNTPOINT=$BASEDIR/dest
++DUMPFILE=$BASEDIR/dump-test.dump
++
++/bin/echo BASEDIR = $BASEDIR
++
++/usr/bin/install -d $BASEDIR
++/usr/bin/install -d $SRC_MOUNTPOINT
++/usr/bin/install -d $DEST_MOUNTPOINT
++
++# Setup source partition
++setup_src_partition $SRC_FILENAME $SRC_LOOPDEV $SRC_MOUNTPOINT
++if [ $? -ne 0 ]; then
++   /bin/echo "creating source test partition failed."
++   cleanup $SRC_FILENAME $SRC_MOUNTPOINT $DEST_FILENAME $DEST_MOUNTPOINT $BASEDIR $DUMPFILE
++   exit 1
++fi
++
++# create dest partition (for restores)
++mkvirtpart $DEST_FILENAME $DEST_LOOPDEV
++if [ $? -ne 0 ]; then
++   /bin/echo "creating destination test partition failed."
++   cleanup $SRC_FILENAME $SRC_MOUNTPOINT $DEST_FILENAME $DEST_MOUNTPOINT $BASEDIR $DUMPFILE
++   exit 1
++fi
++
++echo
++echo "testing basic dump/restore"
++dump_verify_restore $SRC_LOOPDEV $SRC_MOUNTPOINT $DEST_LOOPDEV $DEST_MOUNTPOINT $DUMPFILE
++if [ $? -ne 0 ]; then
++   /bin/echo "dump cycle failed."
++   cleanup $SRC_FILENAME $SRC_MOUNTPOINT $DEST_FILENAME $DEST_MOUNTPOINT $BASEDIR $DUMPFILE
++   exit 1
++fi
++
++echo
++echo "testing compressed dump/restore (lzo)..."
++dump_verify_restore $SRC_LOOPDEV $SRC_MOUNTPOINT $DEST_LOOPDEV $DEST_MOUNTPOINT $DUMPFILE -y
++if [ $? -ne 0 ]; then
++   /bin/echo "dump cycle failed."
++   cleanup $SRC_FILENAME $SRC_MOUNTPOINT $DEST_FILENAME $DEST_MOUNTPOINT $BASEDIR $DUMPFILE
++   exit 1
++fi
++
++echo
++echo "testing compressed dump/restore (zlib)..."
++dump_verify_restore $SRC_LOOPDEV $SRC_MOUNTPOINT $DEST_LOOPDEV $DEST_MOUNTPOINT $DUMPFILE -z2
++if [ $? -ne 0 ]; then
++   /bin/echo "dump cycle failed."
++   cleanup $SRC_FILENAME $SRC_MOUNTPOINT $DEST_FILENAME $DEST_MOUNTPOINT $BASEDIR $DUMPFILE
++   exit 1
++fi
++
++echo
++echo "testing compressed dump/restore (bzlib)..."
++dump_verify_restore $SRC_LOOPDEV $SRC_MOUNTPOINT $DEST_LOOPDEV $DEST_MOUNTPOINT $DUMPFILE -j2
++if [ $? -ne 0 ]; then
++   /bin/echo "dump cycle failed."
++   cleanup $SRC_FILENAME $SRC_MOUNTPOINT $DEST_FILENAME $DEST_MOUNTPOINT $BASEDIR $DUMPFILE
++   exit 1
++fi
++
++cleanup $SRC_FILENAME $SRC_MOUNTPOINT $DEST_FILENAME $DEST_MOUNTPOINT $BASEDIR $DUMPFILE
++
++/bin/echo "#"
++/bin/echo "# success!"
++/bin/echo "#"
++
++exit 0
diff --git a/debian/patches/xattr_verify b/debian/patches/xattr_verify
new file mode 100644
index 0000000..17ded09
--- /dev/null
+++ b/debian/patches/xattr_verify
@@ -0,0 +1,261 @@
+--- a/restore/extern.h
++++ b/restore/extern.h
+@@ -154,3 +154,5 @@ void	skipxattr (void);
+ int	readxattr (char *);
+ int	xattr_compare (char *, char *);
+ int	xattr_extract (char *, char *);
++int xattr_count_file (char *);
++int xattr_count (char *, int *);
+--- a/restore/tape.c
++++ b/restore/tape.c
+@@ -1710,40 +1710,68 @@ cmpfiles(char *tapefile, char *diskfile,
+ }
+ #endif /* !COMPARE_ONTHEFLY */
+ 
++/* collect both extended attribute tape blocks, then
++	 compare the attributes */
+ static void
+ compareattr(char *name)
+ {
+-	int xattr_done = 0;
++	 int xattr_done = 0;
++	 int xattr_count_all = 0;
+ 
+-	while (spcl.c_flags & DR_EXTATTRIBUTES) {
+-		switch (spcl.c_extattributes) {
+-		case EXT_MACOSFNDRINFO:
+-			msg("MacOSX not supported for comparision in this version, skipping\n");
+-			skipfile();
+-			break;
+-		case EXT_MACOSRESFORK:
+-			msg("MacOSX not supported for comparision in this version, skipping\n");
+-			skipfile();
+-			break;
+-		case EXT_XATTR: {
+-			char xattr[XATTR_MAXSIZE];
++	 while (spcl.c_flags & DR_EXTATTRIBUTES) {
++			switch (spcl.c_extattributes) {
++				 case EXT_MACOSFNDRINFO:
++						msg("MacOSX not supported for comparision in this version, skipping\n");
++						skipfile();
++						break;
++				 case EXT_MACOSRESFORK:
++						msg("MacOSX not supported for comparision in this version, skipping\n");
++						skipfile();
++						break;
++				 case EXT_XATTR: {
++						char xattr[XATTR_MAXSIZE];
++						int xattr_count_thisblock = 0;
+ 
+-			if (readxattr(xattr) == GOOD) {
+-				if (xattr_compare(name, xattr) == FAIL)
+-					do_compare_error;
+-				xattr_done = 1;
+-			}
+-			else
+-				do_compare_error;
+-			break;
+-		}
++						/* in-inode xattr record comes first, if present at all; then block xattr */
++						if (readxattr(xattr) == GOOD) {
++							 /* this returns fail if the buffer contains different attributes
++									than the file on disk; note that it mustn't return fail if the file on disk has more attributes! */
++							 if (xattr_compare(name, xattr) == FAIL)
++									do_compare_error;
++
++							 xattr_count(xattr, &xattr_count_thisblock);
++							 xattr_count_all += xattr_count_thisblock;
++							 xattr_done = 1;
++						}
++						else
++							 do_compare_error;
++						break;
++				 }
+ 		default:
+ 			msg("unexpected inode extension %ld, skipping\n", spcl.c_extattributes);
+ 			skipfile();
+ 			break;
+ 		}
+ 	}
+-	if (!xattr_done && xattr_compare(name, NULL) == FAIL)
++
++	 /* cover the case of two xattr sources, the contents of which matched the file on disk:
++			the only uncovered case left is if there re more attributes on disk than observed on tape */
++	 if (xattr_done)
++	 {
++			int count_file = xattr_count_file(name);
++			if (count_file < 0)
++			{
++				 do_compare_error;
++			}
++			else if (count_file != xattr_count_all)
++			{
++				 fprintf(stderr, "%s: file does not have the same number of attributes (%d) as the tape (%d).\n",
++								 name, count_file, xattr_count_all );
++				 do_compare_error;
++			}
++	 }
++	 /* no attrs whatsoever? file must have none then as well */
++	 if (!xattr_done && xattr_compare(name, NULL) == FAIL)
+ 		do_compare_error;
+ }
+ 
+--- a/restore/xattr.c
++++ b/restore/xattr.c
+@@ -123,7 +123,7 @@ static int xattr_cb_list (char *, char *
+ static int xattr_cb_set (char *, char *, int, int, void *);
+ static int xattr_cb_compare (char *, char *, int, int, void *);
+ static int xattr_verify (char *);
+-static int xattr_count (char *, int *);
++int xattr_count (char *, int *);
+ static int xattr_walk (char *, int (*)(char *, char *, int, int, void *), void *);
+ 
+ #define POSIX_ACL_XATTR_VERSION 0x0002
+@@ -373,7 +373,7 @@ xattr_cb_compare(char *name, char *value
+ #endif
+ 		valuesz = lgetxattr(path, name, valuef, XATTR_MAXSIZE);
+ 		if (valuesz < 0) {
+-			warn("%s: EA compare lgetxattr failed\n", path);
++			 warn("%s: EA compare lgetxattr for %s failed\n", path, name);
+ 			return FAIL;
+ 		}
+ #ifdef TRANSSELINUX			/*GAN6May06 SELinux MLS */
+@@ -381,8 +381,9 @@ xattr_cb_compare(char *name, char *value
+ #endif
+ 
+ 	if (valuesz != valuelen || memcmp(value, valuef, valuelen)) {
++		 valuef[valuesz] = '\0';
+ 		/* GAN24May06: show name and new value for user to compare */
+-		fprintf(stderr, "%s: EA %s:%s value changed to %s\n", path, name, value, valuef);
++		fprintf(stderr, "%s: EA %s value changed from %s on tape to %s on disk\n", path, name, value, valuef);
+ 		return FAIL;
+ 	}
+ 
+@@ -429,7 +430,7 @@ xattr_verify(char *buffer)
+ 	return GOOD;
+ }
+ 
+-static int
++int
+ xattr_count(char *buffer, int *count)
+ {
+ 	struct ext2_xattr_entry *entry;
+@@ -493,6 +494,7 @@ xattr_walk(char *buffer, int (*xattr_cb)
+ 		size = entry->e_value_size;
+ 
+ 		memcpy(value, buffer + VALUE_OFFSET(buffer, entry), size);
++		value[size]='\0';
+ 
+ 		if (convertacl) {
+ 			struct posix_acl *acl;
+@@ -540,42 +542,57 @@ xattr_walk(char *buffer, int (*xattr_cb)
+ 	return GOOD;
+ }
+ 
+-int
+-xattr_compare(char *path, char *buffer)
++/* return count of the xattrs on the given file or FAIL if failed */
++int xattr_count_file(char *path)
+ {
+-	int countf, countt;
+-	char *names = NULL, *end_names, *name;
++	 int size, count = 0;
++	 char *names = NULL, *end_names, *name;
+ 
+-	countf = llistxattr(path, NULL, 0);
+-	if (countf < 0) {
+-		warn("%s: llistxattr failed", path);
+-		return FAIL;
+-	}
++	 /* return number of bytes a/v */
++	 size = llistxattr(path, NULL, 0);
++	 if (size < 0) {
++			warn("%s: llistxattr failed", path);
++			return FAIL;
++	 }
+ 
+-	names = malloc(countf + 1);
+-	if (!names) {
+-		warn("%s: llistxattr failed", path);
+-		return FAIL;
+-	}
++	 names = malloc(size + 1);
++	 if (!names)
++	 {
++			warn("%s: malloc failed", path);
++			return FAIL;
++	 }
+ 
+-	countf = llistxattr(path, names, countf);
+-	if (countf < 0) {
+-		warn("%s: llistxattr failed", path);
+-		free(names);
+-		return FAIL;
+-	}
++	 /* return nr of bytes and park data in names array */
++	 size = llistxattr(path, names, size);
++	 if (size < 0)
++	 {
++			warn("%s: llistxattr failed", path);
++			free(names);
++			return FAIL;
++	 }
+ 
+-	names[countf] = '\0';
+-	end_names = names + countf;
++	 names[size] = '\0';
++	 end_names = names + size;
+ 
+-	countf = 0;
+-	for (name = names; name != end_names; name = strchr(name, '\0') + 1) {
+-		if (!*name)
+-			continue;
+-		countf++;
+-	}
++	 for (name = names; name != end_names; name = strchr(name, '\0') + 1)
++	 {
++			if (!*name)
++				 continue;
++			count++;
++	 }
++	 free(names);
++
++	 return count;
++}
++
++int
++xattr_compare(char *path, char *buffer)
++{
++	 int countf, countt;
+ 
+-	free(names);
++	 countf = xattr_count_file(path); /* already warns on failure */
++	 if (countf < 0)
++			return FAIL;
+ 
+ 	if (buffer) {
+ 		if (xattr_verify(buffer) == FAIL)
+@@ -587,10 +604,20 @@ xattr_compare(char *path, char *buffer)
+ 	else
+ 		countt = 0;
+ 
+-	if (countf != countt) {
+-		fprintf(stderr, "%s: EA count changed from %d to %d\n", path, countt, countf);
+-		return FAIL;
++	/* with ext4 there may be two tape blocks for attrs: one from the actual inode, plus
++		 one extra filesystem block. in this case countf must be at least >= countt;
++		 verification of that aspect is delayed and left to compareattr
++		 which loops over the different blocks */
++
++	/* nothing on tape but something on disk? sure fail. ditto for more one tape than on disk. */
++	if (countf > 0 && !countt)
++	{
++		 fprintf(stderr, "%s: file does not have the same number of attributes (%d) as the tape (%d).\n",
++						 path, countf, countt);
++		 return FAIL;
+ 	}
++	if (countf < countt)
++		 return FAIL;								/* warning left to compareattr */
+ 
+ 	if (!buffer)
+ 		return GOOD;
diff --git a/debian/rules b/debian/rules
index fe3e381..8467969 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,7 +1,7 @@
 #!/usr/bin/make -f
 #export DH_VERBOSE = 1
 
-export DEB_CFLAGS_MAINT_APPEND = -fPIE
+export DEB_CFLAGS_MAINT_APPEND = -fPIE -fno-common
 export DEB_LDFLAGS_MAINT_APPEND = -fPIE -Wl,-z,now -Wl,--as-needed
 
 override_dh_auto_configure:
@@ -11,7 +11,8 @@ override_dh_auto_configure:
 		--sbindir=/sbin \
 		--with-ccopts="-O2 -g -Wall" \
 		--with-dumpdatespath=/var/lib/dumpdates \
-		--enable-lzo --enable-bzip2 --enable-zlib
+		--enable-lzo --enable-bzip2 --enable-zlib \
+		--disable-ssl
 
 override_dh_auto_install:
 	dh_auto_install -- \
diff --git a/debian/watch b/debian/watch
index 8ad735e..30d5319 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,2 +1,2 @@
 version=3
-https://sf.net/dump/dump-(\d\S+)\.tar\.(?:bz2|gz|xz)
+http://sf.net/dump/dump-(\d\S+)\.tar\.(?:bz2|gz|xz)
diff --git a/depcomp b/depcomp
index 4ebd5b3..6b39162 100755
--- a/depcomp
+++ b/depcomp
@@ -1,9 +1,9 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2013-05-30.07; # UTC
+scriptversion=2018-03-07.03; # UTC
 
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2020 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@ scriptversion=2013-05-30.07; # UTC
 # GNU General Public License for more details.
 
 # You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -783,9 +783,9 @@ exit 0
 # Local Variables:
 # mode: shell-script
 # sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
 # time-stamp-end: "; # UTC"
 # End:
diff --git a/dump.lsm b/dump.lsm
index 9bf9335..add21e5 100644
--- a/dump.lsm
+++ b/dump.lsm
@@ -1,13 +1,13 @@
 Begin3
 Title:          dump and restore for Ext2fs
-Version:        0.4b46
+Version:        0.4b47
 Entered-date:   09MAY16
 Description:    Port of the 4.4BSD dump and restore backup suite
 Keywords:       backup, filesystem, Ext2fs
 Author:         University of California, Berkeley
 Maintained-by:  stelian@popies.net (Stelian Pop)
-Primary-site:   http://dump.sourceforge.net/
-                0kB dump-0.4b46.tar.gz
+Primary-site:   https://dump.sourceforge.io/
+                0kB dump-0.4b47.tar.gz
                 0 dump.lsm
 Original-site:  ftp.freebsd.org /pub/bsd-sources/4.4BSD-Lite2/sbin
                 dump/*
diff --git a/dump.lsm.in b/dump.lsm.in
index 1c85499..53bef85 100644
--- a/dump.lsm.in
+++ b/dump.lsm.in
@@ -6,7 +6,7 @@ Description:    Port of the 4.4BSD dump and restore backup suite
 Keywords:       backup, filesystem, Ext2fs
 Author:         University of California, Berkeley
 Maintained-by:  stelian@popies.net (Stelian Pop)
-Primary-site:   http://dump.sourceforge.net/
+Primary-site:   https://dump.sourceforge.io/
                 0kB dump-@VERSION@.tar.gz
                 0 dump.lsm
 Original-site:  ftp.freebsd.org /pub/bsd-sources/4.4BSD-Lite2/sbin
diff --git a/dump/.gitignore b/dump/.gitignore
deleted file mode 100644
index 5927cc9..0000000
--- a/dump/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/dump
-/dump.8
diff --git a/dump/Makefile.in b/dump/Makefile.in
index 2bf92e1..1f0a750 100644
--- a/dump/Makefile.in
+++ b/dump/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.2 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2020 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -80,8 +90,6 @@ build_triplet = @build@
 host_triplet = @host@
 sbin_PROGRAMS = dump$(EXEEXT)
 subdir = dump
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(dist_man_MANS)
 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 \
@@ -89,6 +97,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -119,7 +128,10 @@ am__v_at_0 = @
 am__v_at_1 = 
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ./$(DEPDIR)/itime.Po ./$(DEPDIR)/main.Po \
+	./$(DEPDIR)/optr.Po ./$(DEPDIR)/tape.Po \
+	./$(DEPDIR)/traverse.Po ./$(DEPDIR)/unctime.Po
 am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -195,6 +207,8 @@ am__define_uniq_tagged_files = \
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.in \
+	$(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -215,6 +229,7 @@ COM_ERR_LIBS = @COM_ERR_LIBS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
+DATE = @DATE@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DLLTOOL = @DLLTOOL@
@@ -326,6 +341,7 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -357,14 +373,13 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu dump/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu dump/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
 	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
 	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
 	esac;
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -435,12 +450,18 @@ mostlyclean-compile:
 distclean-compile:
 	-rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/itime.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/optr.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tape.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/traverse.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unctime.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/itime.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/optr.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tape.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/traverse.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unctime.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+	@$(MKDIR_P) $(@D)
+	@echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
 
 .c.o:
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -564,7 +585,10 @@ cscopelist-am: $(am__tagged_files)
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
-distdir: $(DISTFILES)
+distdir: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	list='$(DISTFILES)'; \
@@ -638,7 +662,12 @@ clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \
 	mostlyclean-am
 
 distclean: distclean-am
-	-rm -rf ./$(DEPDIR)
+		-rm -f ./$(DEPDIR)/itime.Po
+	-rm -f ./$(DEPDIR)/main.Po
+	-rm -f ./$(DEPDIR)/optr.Po
+	-rm -f ./$(DEPDIR)/tape.Po
+	-rm -f ./$(DEPDIR)/traverse.Po
+	-rm -f ./$(DEPDIR)/unctime.Po
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
 	distclean-tags
@@ -685,7 +714,12 @@ install-ps-am:
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
-	-rm -rf ./$(DEPDIR)
+		-rm -f ./$(DEPDIR)/itime.Po
+	-rm -f ./$(DEPDIR)/main.Po
+	-rm -f ./$(DEPDIR)/optr.Po
+	-rm -f ./$(DEPDIR)/tape.Po
+	-rm -f ./$(DEPDIR)/traverse.Po
+	-rm -f ./$(DEPDIR)/unctime.Po
 	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
@@ -709,9 +743,9 @@ uninstall-man: uninstall-man8
 
 .MAKE: install-am install-exec-am install-strip uninstall-am
 
-.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
-	clean-libtool clean-sbinPROGRAMS cscopelist-am ctags ctags-am \
-	distclean distclean-compile distclean-generic \
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
+	clean-generic clean-libtool clean-sbinPROGRAMS cscopelist-am \
+	ctags ctags-am distclean distclean-compile distclean-generic \
 	distclean-libtool distclean-tags distdir dvi dvi-am html \
 	html-am info info-am install install-am install-data \
 	install-data-am install-dvi install-dvi-am install-exec \
@@ -725,6 +759,8 @@ uninstall-man: uninstall-man8
 	tags tags-am uninstall uninstall-am uninstall-hook \
 	uninstall-man uninstall-man8 uninstall-sbinPROGRAMS
 
+.PRECIOUS: Makefile
+
 
 dump.8: dump.8.in
 	$(AM_V_GEN)\
diff --git a/dump/dump.8.in b/dump/dump.8.in
index 44e820a..9598707 100644
--- a/dump/dump.8.in
+++ b/dump/dump.8.in
@@ -536,7 +536,7 @@ of the dump cycle and fresh tapes brought in.
 Another backup strategy is the Tower of Hanoi sequence, which reuses
 older tapes in a way that for newer dates the available restore points
 are more frequent, then for older dates (see
-http://en.wikipedia.org/wiki/Backup_rotation_scheme for additional
+https://en.wikipedia.org/wiki/Backup_rotation_scheme for additional
 information).
 .PP
 (The 4.3BSD option syntax is implemented for backward compatibility but is not
@@ -663,7 +663,7 @@ Starting with 0.4b5, the new maintainer is Stelian Pop <stelian@popies.net>.
 .SH AVAILABILITY
 The
 .B dump/restore
-backup suite is available from <http://dump.sourceforge.net>
+backup suite is available from <https://dump.sourceforge.io>
 .SH HISTORY
 A
 .B dump
diff --git a/dump/dump.h b/dump/dump.h
index e92e2ad..0b7c164 100644
--- a/dump/dump.h
+++ b/dump/dump.h
@@ -3,7 +3,7 @@
  *	dump and restore backup suit
  *	Remy Card <card@Linux.EU.Org>, 1994-1997
  *	Stelian Pop <stelian@popies.net>, 1999-2000
- *	Stelian Pop <stelian@popies.net> - Alc�ve <www.alcove.com>, 2000-2002
+ *	Stelian Pop <stelian@popies.net> - Alcôve <www.alcove.com>, 2000-2002
  */
 
 /*-
diff --git a/dump/itime.c b/dump/itime.c
index 678f96e..b90c84c 100644
--- a/dump/itime.c
+++ b/dump/itime.c
@@ -3,7 +3,7 @@
  *	dump and restore backup suit
  *	Remy Card <card@Linux.EU.Org>, 1994-1997
  *	Stelian Pop <stelian@popies.net>, 1999-2000
- *	Stelian Pop <stelian@popies.net> - Alc�ve <www.alcove.com>, 2000-2002
+ *	Stelian Pop <stelian@popies.net> - Alcôve <www.alcove.com>, 2000-2002
  */
 
 /*-
diff --git a/dump/main.c b/dump/main.c
index 142aa2b..98c2333 100644
--- a/dump/main.c
+++ b/dump/main.c
@@ -3,7 +3,7 @@
  *	dump and restore backup suit
  *	Remy Card <card@Linux.EU.Org>, 1994-1997
  *	Stelian Pop <stelian@popies.net>, 1999-2000
- *	Stelian Pop <stelian@popies.net> - Alc�ve <www.alcove.com>, 2000-2002
+ *	Stelian Pop <stelian@popies.net> - Alcôve <www.alcove.com>, 2000-2002
  */
 
 /*-
diff --git a/dump/optr.c b/dump/optr.c
index 41cc254..1058cc6 100644
--- a/dump/optr.c
+++ b/dump/optr.c
@@ -3,7 +3,7 @@
  *	dump and restore backup suit
  *	Remy Card <card@Linux.EU.Org>, 1994-1997
  *	Stelian Pop <stelian@popies.net>, 1999-2000
- *	Stelian Pop <stelian@popies.net> - Alc�ve <www.alcove.com>, 2000-2002
+ *	Stelian Pop <stelian@popies.net> - Alcôve <www.alcove.com>, 2000-2002
  */
 
 /*-
diff --git a/dump/tape.c b/dump/tape.c
index 2b28b1e..54e9e82 100644
--- a/dump/tape.c
+++ b/dump/tape.c
@@ -3,7 +3,7 @@
  *	dump and restore backup suit
  *	Remy Card <card@Linux.EU.Org>, 1994-1997
  *	Stelian Pop <stelian@popies.net>, 1999-2000
- *	Stelian Pop <stelian@popies.net> - Alc�ve <www.alcove.com>, 2000-2002
+ *	Stelian Pop <stelian@popies.net> - Alcôve <www.alcove.com>, 2000-2002
  */
 
 /*-
diff --git a/dump/traverse.c b/dump/traverse.c
index b56d0b7..44a23fc 100644
--- a/dump/traverse.c
+++ b/dump/traverse.c
@@ -3,7 +3,7 @@
  *	dump and restore backup suit
  *	Remy Card <card@Linux.EU.Org>, 1994-1997
  *	Stelian Pop <stelian@popies.net>, 1999-2000
- *	Stelian Pop <stelian@popies.net> - Alc�ve <www.alcove.com>, 2000-2002
+ *	Stelian Pop <stelian@popies.net> - Alcôve <www.alcove.com>, 2000-2002
  */
 
 /*-
diff --git a/dump/unctime.c b/dump/unctime.c
index bdb11a9..8a8360b 100644
--- a/dump/unctime.c
+++ b/dump/unctime.c
@@ -3,7 +3,7 @@
  *	dump and restore backup suit
  *	Remy Card <card@Linux.EU.Org>, 1994-1997
  *	Stelian Pop <stelian@popies.net>, 1999-2000
- *	Stelian Pop <stelian@popies.net> - Alc�ve <www.alcove.com>, 2000-2002
+ *	Stelian Pop <stelian@popies.net> - Alcôve <www.alcove.com>, 2000-2002
  */
 
 /*-
diff --git a/examples/dump_on_cd_3/dump_disk b/examples/dump_on_cd_3/dump_disk
index b3bae1a..87d580c 100755
--- a/examples/dump_on_cd_3/dump_disk
+++ b/examples/dump_on_cd_3/dump_disk
@@ -55,14 +55,14 @@ write_output() {
 	while [ "$ANSWER" != "y" ] ; do
 		echo -n "Is the disk ready? (y/n) "
 		read  </dev/tty ANSWER
-		if [ "$ANSWER" == "y" ] ; then
+		if [ "$ANSWER" = "y" ] ; then
 			(${RECORD_BIN}${1}) &
 			return 0
-		elif [ "$ANSWER" == "n" ] ; then
+		elif [ "$ANSWER" = "n" ] ; then
 			EXIT=""
 			echo -n "Do you really want to exit? (y/n) "
 			read </dev/tty EXIT
-			if [ "$EXIT" == "y" ] ; then
+			if [ "$EXIT" = "y" ] ; then
 				return 1
 			fi
 		fi
diff --git a/examples/remote_backup_ssh/backitup b/examples/remote_backup_ssh/backitup
index d9d8454..5a8a770 100644
--- a/examples/remote_backup_ssh/backitup
+++ b/examples/remote_backup_ssh/backitup
@@ -41,7 +41,7 @@ FILESYSTEMS='hda1 hda7 hda6 hda5 hda10'
 # backup FILESYSTEMS to the TAPEDEV on TAPEHOST with DUMP as OPERATOR using RSH
 
 export RMT RSH
-mkdir -p $LOGDIR &> /dev/null
+mkdir -p $LOGDIR > /dev/null 2>&1
 ssh-add ~/.ssh/id_dsa
 
 echo "Rewinding tape..."
diff --git a/install-sh b/install-sh
index 377bb86..20d8b2e 100755
--- a/install-sh
+++ b/install-sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2011-11-20.07; # UTC
+scriptversion=2018-03-11.20; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -41,19 +41,15 @@ scriptversion=2011-11-20.07; # UTC
 # This script is compatible with the BSD install script, but was written
 # from scratch.
 
+tab='	'
 nl='
 '
-IFS=" ""	$nl"
+IFS=" $tab$nl"
 
-# set DOITPROG to echo to test this script
+# Set DOITPROG to "echo" to test this script.
 
-# Don't use :- since 4.3BSD and earlier shells don't like it.
 doit=${DOITPROG-}
-if test -z "$doit"; then
-  doit_exec=exec
-else
-  doit_exec=$doit
-fi
+doit_exec=${doit:-exec}
 
 # Put in absolute file names if you don't have them in your path;
 # or use environment vars.
@@ -68,17 +64,6 @@ mvprog=${MVPROG-mv}
 rmprog=${RMPROG-rm}
 stripprog=${STRIPPROG-strip}
 
-posix_glob='?'
-initialize_posix_glob='
-  test "$posix_glob" != "?" || {
-    if (set -f) 2>/dev/null; then
-      posix_glob=
-    else
-      posix_glob=:
-    fi
-  }
-'
-
 posix_mkdir=
 
 # Desired mode of installed file.
@@ -97,7 +82,7 @@ dir_arg=
 dst_arg=
 
 copy_on_change=false
-no_target_directory=
+is_target_a_directory=possibly
 
 usage="\
 Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
@@ -137,46 +122,57 @@ while test $# -ne 0; do
     -d) dir_arg=true;;
 
     -g) chgrpcmd="$chgrpprog $2"
-	shift;;
+        shift;;
 
     --help) echo "$usage"; exit $?;;
 
     -m) mode=$2
-	case $mode in
-	  *' '* | *'	'* | *'
-'*	  | *'*'* | *'?'* | *'['*)
-	    echo "$0: invalid mode: $mode" >&2
-	    exit 1;;
-	esac
-	shift;;
+        case $mode in
+          *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
+            echo "$0: invalid mode: $mode" >&2
+            exit 1;;
+        esac
+        shift;;
 
     -o) chowncmd="$chownprog $2"
-	shift;;
+        shift;;
 
     -s) stripcmd=$stripprog;;
 
-    -t) dst_arg=$2
-	# Protect names problematic for 'test' and other utilities.
-	case $dst_arg in
-	  -* | [=\(\)!]) dst_arg=./$dst_arg;;
-	esac
-	shift;;
+    -t)
+        is_target_a_directory=always
+        dst_arg=$2
+        # Protect names problematic for 'test' and other utilities.
+        case $dst_arg in
+          -* | [=\(\)!]) dst_arg=./$dst_arg;;
+        esac
+        shift;;
 
-    -T) no_target_directory=true;;
+    -T) is_target_a_directory=never;;
 
     --version) echo "$0 $scriptversion"; exit $?;;
 
-    --)	shift
-	break;;
+    --) shift
+        break;;
 
-    -*)	echo "$0: invalid option: $1" >&2
-	exit 1;;
+    -*) echo "$0: invalid option: $1" >&2
+        exit 1;;
 
     *)  break;;
   esac
   shift
 done
 
+# We allow the use of options -d and -T together, by making -d
+# take the precedence; this is for compatibility with GNU install.
+
+if test -n "$dir_arg"; then
+  if test -n "$dst_arg"; then
+    echo "$0: target directory not allowed when installing a directory." >&2
+    exit 1
+  fi
+fi
+
 if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
   # When -d is used, all remaining arguments are directories to create.
   # When -t is used, the destination is already specified.
@@ -207,6 +203,15 @@ if test $# -eq 0; then
   exit 0
 fi
 
+if test -z "$dir_arg"; then
+  if test $# -gt 1 || test "$is_target_a_directory" = always; then
+    if test ! -d "$dst_arg"; then
+      echo "$0: $dst_arg: Is not a directory." >&2
+      exit 1
+    fi
+  fi
+fi
+
 if test -z "$dir_arg"; then
   do_exit='(exit $ret); exit $ret'
   trap "ret=129; $do_exit" 1
@@ -223,16 +228,16 @@ if test -z "$dir_arg"; then
 
     *[0-7])
       if test -z "$stripcmd"; then
-	u_plus_rw=
+        u_plus_rw=
       else
-	u_plus_rw='% 200'
+        u_plus_rw='% 200'
       fi
       cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
     *)
       if test -z "$stripcmd"; then
-	u_plus_rw=
+        u_plus_rw=
       else
-	u_plus_rw=,u+rw
+        u_plus_rw=,u+rw
       fi
       cp_umask=$mode$u_plus_rw;;
   esac
@@ -266,122 +271,113 @@ do
     fi
     dst=$dst_arg
 
-    # If destination is a directory, append the input filename; won't work
-    # if double slashes aren't ignored.
+    # If destination is a directory, append the input filename.
     if test -d "$dst"; then
-      if test -n "$no_target_directory"; then
-	echo "$0: $dst_arg: Is a directory" >&2
-	exit 1
+      if test "$is_target_a_directory" = never; then
+        echo "$0: $dst_arg: Is a directory" >&2
+        exit 1
       fi
       dstdir=$dst
-      dst=$dstdir/`basename "$src"`
+      dstbase=`basename "$src"`
+      case $dst in
+	*/) dst=$dst$dstbase;;
+	*)  dst=$dst/$dstbase;;
+      esac
       dstdir_status=0
     else
-      # Prefer dirname, but fall back on a substitute if dirname fails.
-      dstdir=`
-	(dirname "$dst") 2>/dev/null ||
-	expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	     X"$dst" : 'X\(//\)[^/]' \| \
-	     X"$dst" : 'X\(//\)$' \| \
-	     X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
-	echo X"$dst" |
-	    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-		   s//\1/
-		   q
-		 }
-		 /^X\(\/\/\)[^/].*/{
-		   s//\1/
-		   q
-		 }
-		 /^X\(\/\/\)$/{
-		   s//\1/
-		   q
-		 }
-		 /^X\(\/\).*/{
-		   s//\1/
-		   q
-		 }
-		 s/.*/./; q'
-      `
-
+      dstdir=`dirname "$dst"`
       test -d "$dstdir"
       dstdir_status=$?
     fi
   fi
 
+  case $dstdir in
+    */) dstdirslash=$dstdir;;
+    *)  dstdirslash=$dstdir/;;
+  esac
+
   obsolete_mkdir_used=false
 
   if test $dstdir_status != 0; then
     case $posix_mkdir in
       '')
-	# Create intermediate dirs using mode 755 as modified by the umask.
-	# This is like FreeBSD 'install' as of 1997-10-28.
-	umask=`umask`
-	case $stripcmd.$umask in
-	  # Optimize common cases.
-	  *[2367][2367]) mkdir_umask=$umask;;
-	  .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
-
-	  *[0-7])
-	    mkdir_umask=`expr $umask + 22 \
-	      - $umask % 100 % 40 + $umask % 20 \
-	      - $umask % 10 % 4 + $umask % 2
-	    `;;
-	  *) mkdir_umask=$umask,go-w;;
-	esac
-
-	# With -d, create the new directory with the user-specified mode.
-	# Otherwise, rely on $mkdir_umask.
-	if test -n "$dir_arg"; then
-	  mkdir_mode=-m$mode
-	else
-	  mkdir_mode=
-	fi
-
-	posix_mkdir=false
-	case $umask in
-	  *[123567][0-7][0-7])
-	    # POSIX mkdir -p sets u+wx bits regardless of umask, which
-	    # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
-	    ;;
-	  *)
-	    tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
-	    trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
-
-	    if (umask $mkdir_umask &&
-		exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
-	    then
-	      if test -z "$dir_arg" || {
-		   # Check for POSIX incompatibilities with -m.
-		   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
-		   # other-writable bit of parent directory when it shouldn't.
-		   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
-		   ls_ld_tmpdir=`ls -ld "$tmpdir"`
-		   case $ls_ld_tmpdir in
-		     d????-?r-*) different_mode=700;;
-		     d????-?--*) different_mode=755;;
-		     *) false;;
-		   esac &&
-		   $mkdirprog -m$different_mode -p -- "$tmpdir" && {
-		     ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
-		     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
-		   }
-		 }
-	      then posix_mkdir=:
-	      fi
-	      rmdir "$tmpdir/d" "$tmpdir"
-	    else
-	      # Remove any dirs left behind by ancient mkdir implementations.
-	      rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
-	    fi
-	    trap '' 0;;
-	esac;;
+        # Create intermediate dirs using mode 755 as modified by the umask.
+        # This is like FreeBSD 'install' as of 1997-10-28.
+        umask=`umask`
+        case $stripcmd.$umask in
+          # Optimize common cases.
+          *[2367][2367]) mkdir_umask=$umask;;
+          .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+          *[0-7])
+            mkdir_umask=`expr $umask + 22 \
+              - $umask % 100 % 40 + $umask % 20 \
+              - $umask % 10 % 4 + $umask % 2
+            `;;
+          *) mkdir_umask=$umask,go-w;;
+        esac
+
+        # With -d, create the new directory with the user-specified mode.
+        # Otherwise, rely on $mkdir_umask.
+        if test -n "$dir_arg"; then
+          mkdir_mode=-m$mode
+        else
+          mkdir_mode=
+        fi
+
+        posix_mkdir=false
+        case $umask in
+          *[123567][0-7][0-7])
+            # POSIX mkdir -p sets u+wx bits regardless of umask, which
+            # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+            ;;
+          *)
+            # Note that $RANDOM variable is not portable (e.g. dash);  Use it
+            # here however when possible just to lower collision chance.
+            tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+
+            trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+            # Because "mkdir -p" follows existing symlinks and we likely work
+            # directly in world-writeable /tmp, make sure that the '$tmpdir'
+            # directory is successfully created first before we actually test
+            # 'mkdir -p' feature.
+            if (umask $mkdir_umask &&
+                $mkdirprog $mkdir_mode "$tmpdir" &&
+                exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
+            then
+              if test -z "$dir_arg" || {
+                   # Check for POSIX incompatibilities with -m.
+                   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+                   # other-writable bit of parent directory when it shouldn't.
+                   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+                   test_tmpdir="$tmpdir/a"
+                   ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
+                   case $ls_ld_tmpdir in
+                     d????-?r-*) different_mode=700;;
+                     d????-?--*) different_mode=755;;
+                     *) false;;
+                   esac &&
+                   $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
+                     ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
+                     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+                   }
+                 }
+              then posix_mkdir=:
+              fi
+              rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
+            else
+              # Remove any dirs left behind by ancient mkdir implementations.
+              rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
+            fi
+            trap '' 0;;
+        esac;;
     esac
 
     if
       $posix_mkdir && (
-	umask $mkdir_umask &&
-	$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+        umask $mkdir_umask &&
+        $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
       )
     then :
     else
@@ -391,53 +387,51 @@ do
       # directory the slow way, step by step, checking for races as we go.
 
       case $dstdir in
-	/*) prefix='/';;
-	[-=\(\)!]*) prefix='./';;
-	*)  prefix='';;
+        /*) prefix='/';;
+        [-=\(\)!]*) prefix='./';;
+        *)  prefix='';;
       esac
 
-      eval "$initialize_posix_glob"
-
       oIFS=$IFS
       IFS=/
-      $posix_glob set -f
+      set -f
       set fnord $dstdir
       shift
-      $posix_glob set +f
+      set +f
       IFS=$oIFS
 
       prefixes=
 
       for d
       do
-	test X"$d" = X && continue
-
-	prefix=$prefix$d
-	if test -d "$prefix"; then
-	  prefixes=
-	else
-	  if $posix_mkdir; then
-	    (umask=$mkdir_umask &&
-	     $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
-	    # Don't fail if two instances are running concurrently.
-	    test -d "$prefix" || exit 1
-	  else
-	    case $prefix in
-	      *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
-	      *) qprefix=$prefix;;
-	    esac
-	    prefixes="$prefixes '$qprefix'"
-	  fi
-	fi
-	prefix=$prefix/
+        test X"$d" = X && continue
+
+        prefix=$prefix$d
+        if test -d "$prefix"; then
+          prefixes=
+        else
+          if $posix_mkdir; then
+            (umask=$mkdir_umask &&
+             $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+            # Don't fail if two instances are running concurrently.
+            test -d "$prefix" || exit 1
+          else
+            case $prefix in
+              *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+              *) qprefix=$prefix;;
+            esac
+            prefixes="$prefixes '$qprefix'"
+          fi
+        fi
+        prefix=$prefix/
       done
 
       if test -n "$prefixes"; then
-	# Don't fail if two instances are running concurrently.
-	(umask $mkdir_umask &&
-	 eval "\$doit_exec \$mkdirprog $prefixes") ||
-	  test -d "$dstdir" || exit 1
-	obsolete_mkdir_used=true
+        # Don't fail if two instances are running concurrently.
+        (umask $mkdir_umask &&
+         eval "\$doit_exec \$mkdirprog $prefixes") ||
+          test -d "$dstdir" || exit 1
+        obsolete_mkdir_used=true
       fi
     fi
   fi
@@ -450,14 +444,25 @@ do
   else
 
     # Make a couple of temp file names in the proper directory.
-    dsttmp=$dstdir/_inst.$$_
-    rmtmp=$dstdir/_rm.$$_
+    dsttmp=${dstdirslash}_inst.$$_
+    rmtmp=${dstdirslash}_rm.$$_
 
     # Trap to clean up those temp files at exit.
     trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
 
     # Copy the file name to the temp name.
-    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+    (umask $cp_umask &&
+     { test -z "$stripcmd" || {
+	 # Create $dsttmp read-write so that cp doesn't create it read-only,
+	 # which would cause strip to fail.
+	 if test -z "$doit"; then
+	   : >"$dsttmp" # No need to fork-exec 'touch'.
+	 else
+	   $doit touch "$dsttmp"
+	 fi
+       }
+     } &&
+     $doit_exec $cpprog "$src" "$dsttmp") &&
 
     # and set any options; do chmod last to preserve setuid bits.
     #
@@ -472,15 +477,12 @@ do
 
     # If -C, don't bother to copy if it wouldn't change the file.
     if $copy_on_change &&
-       old=`LC_ALL=C ls -dlL "$dst"	2>/dev/null` &&
-       new=`LC_ALL=C ls -dlL "$dsttmp"	2>/dev/null` &&
-
-       eval "$initialize_posix_glob" &&
-       $posix_glob set -f &&
+       old=`LC_ALL=C ls -dlL "$dst"     2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp"  2>/dev/null` &&
+       set -f &&
        set X $old && old=:$2:$4:$5:$6 &&
        set X $new && new=:$2:$4:$5:$6 &&
-       $posix_glob set +f &&
-
+       set +f &&
        test "$old" = "$new" &&
        $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
     then
@@ -493,24 +495,24 @@ do
       # to itself, or perhaps because mv is so ancient that it does not
       # support -f.
       {
-	# Now remove or move aside any old file at destination location.
-	# We try this two ways since rm can't unlink itself on some
-	# systems and the destination file might be busy for other
-	# reasons.  In this case, the final cleanup might fail but the new
-	# file should still install successfully.
-	{
-	  test ! -f "$dst" ||
-	  $doit $rmcmd -f "$dst" 2>/dev/null ||
-	  { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
-	    { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
-	  } ||
-	  { echo "$0: cannot unlink or rename $dst" >&2
-	    (exit 1); exit 1
-	  }
-	} &&
-
-	# Now rename the file to the real destination.
-	$doit $mvcmd "$dsttmp" "$dst"
+        # Now remove or move aside any old file at destination location.
+        # We try this two ways since rm can't unlink itself on some
+        # systems and the destination file might be busy for other
+        # reasons.  In this case, the final cleanup might fail but the new
+        # file should still install successfully.
+        {
+          test ! -f "$dst" ||
+          $doit $rmcmd -f "$dst" 2>/dev/null ||
+          { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+            { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+          } ||
+          { echo "$0: cannot unlink or rename $dst" >&2
+            (exit 1); exit 1
+          }
+        } &&
+
+        # Now rename the file to the real destination.
+        $doit $mvcmd "$dsttmp" "$dst"
       }
     fi || exit 1
 
@@ -519,9 +521,9 @@ do
 done
 
 # Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
 # time-stamp-end: "; # UTC"
 # End:
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index da4a4f6..ae7c906 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -1417,10 +1417,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
 	  x86_64-*linux*)
 	    LD="${LD-ld} -m elf_x86_64"
 	    ;;
-	  powerpcle-*linux*)
+	  powerpcle-*linux*|powerpc64le-*linux*)
 	    LD="${LD-ld} -m elf64lppc"
 	    ;;
-	  powerpc-*linux*)
+	  powerpc-*linux*|powerpc64-*linux*)
 	    LD="${LD-ld} -m elf64ppc"
 	    ;;
 	  s390*-*linux*|s390*-*tpf*)
@@ -1708,6 +1708,11 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
     lt_cv_sys_max_cmd_len=8192;
     ;;
 
+  mint*)
+    # On MiNT this can take a long time and run out of memory.
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
   amigaos*)
     # On AmigaOS with pdksh, this test takes hours, literally.
     # So we just punt and use a minimum line length of 8192.
@@ -2636,11 +2641,11 @@ darwin* | rhapsody*)
   version_type=darwin
   need_lib_prefix=no
   need_version=no
-  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
+  library_names_spec='$libname$release$versuffix$shared_ext $libname$release$major$shared_ext $libname$shared_ext'
   soname_spec='$libname$release$major$shared_ext'
   shlibpath_overrides_runpath=yes
   shlibpath_var=DYLD_LIBRARY_PATH
-  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+  shrext_cmds='`test .$module = .yes && echo .bundle || echo .dylib`'
 m4_if([$1], [],[
   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
diff --git a/missing b/missing
index db98974..8d0eaad 100755
--- a/missing
+++ b/missing
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Common wrapper for a few potentially missing GNU programs.
 
-scriptversion=2013-10-28.13; # UTC
+scriptversion=2018-03-07.03; # UTC
 
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2020 Free Software Foundation, Inc.
 # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
@@ -17,7 +17,7 @@ scriptversion=2013-10-28.13; # UTC
 # GNU General Public License for more details.
 
 # You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -101,9 +101,9 @@ else
   exit $st
 fi
 
-perl_URL=http://www.perl.org/
-flex_URL=http://flex.sourceforge.net/
-gnu_software_URL=http://www.gnu.org/software
+perl_URL=https://www.perl.org/
+flex_URL=https://github.com/westes/flex
+gnu_software_URL=https://www.gnu.org/software
 
 program_details ()
 {
@@ -207,9 +207,9 @@ give_advice "$1" | sed -e '1s/^/WARNING: /' \
 exit $st
 
 # Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
 # time-stamp-end: "; # UTC"
 # End:
diff --git a/restore/.gitignore b/restore/.gitignore
deleted file mode 100644
index 86a2ec5..0000000
--- a/restore/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/restore
-/restore.8
diff --git a/restore/Makefile.in b/restore/Makefile.in
index 9903ddb..149f563 100644
--- a/restore/Makefile.in
+++ b/restore/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.2 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2020 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -80,8 +90,6 @@ build_triplet = @build@
 host_triplet = @host@
 sbin_PROGRAMS = restore$(EXEEXT)
 subdir = restore
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(dist_man_MANS)
 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 \
@@ -89,6 +97,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -121,7 +130,11 @@ am__v_at_0 = @
 am__v_at_1 = 
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ./$(DEPDIR)/dirs.Po ./$(DEPDIR)/interactive.Po \
+	./$(DEPDIR)/main.Po ./$(DEPDIR)/restore.Po \
+	./$(DEPDIR)/symtab.Po ./$(DEPDIR)/tape.Po \
+	./$(DEPDIR)/utilities.Po ./$(DEPDIR)/xattr.Po
 am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -197,6 +210,8 @@ am__define_uniq_tagged_files = \
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.in \
+	$(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -217,6 +232,7 @@ COM_ERR_LIBS = @COM_ERR_LIBS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
+DATE = @DATE@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DLLTOOL = @DLLTOOL@
@@ -328,6 +344,7 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -364,14 +381,13 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu restore/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu restore/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
 	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
 	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
 	esac;
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -442,14 +458,20 @@ mostlyclean-compile:
 distclean-compile:
 	-rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirs.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interactive.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/restore.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symtab.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tape.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utilities.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xattr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirs.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interactive.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/restore.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symtab.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tape.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utilities.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xattr.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+	@$(MKDIR_P) $(@D)
+	@echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
 
 .c.o:
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -573,7 +595,10 @@ cscopelist-am: $(am__tagged_files)
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
-distdir: $(DISTFILES)
+distdir: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	list='$(DISTFILES)'; \
@@ -647,7 +672,14 @@ clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \
 	mostlyclean-am
 
 distclean: distclean-am
-	-rm -rf ./$(DEPDIR)
+		-rm -f ./$(DEPDIR)/dirs.Po
+	-rm -f ./$(DEPDIR)/interactive.Po
+	-rm -f ./$(DEPDIR)/main.Po
+	-rm -f ./$(DEPDIR)/restore.Po
+	-rm -f ./$(DEPDIR)/symtab.Po
+	-rm -f ./$(DEPDIR)/tape.Po
+	-rm -f ./$(DEPDIR)/utilities.Po
+	-rm -f ./$(DEPDIR)/xattr.Po
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
 	distclean-tags
@@ -694,7 +726,14 @@ install-ps-am:
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
-	-rm -rf ./$(DEPDIR)
+		-rm -f ./$(DEPDIR)/dirs.Po
+	-rm -f ./$(DEPDIR)/interactive.Po
+	-rm -f ./$(DEPDIR)/main.Po
+	-rm -f ./$(DEPDIR)/restore.Po
+	-rm -f ./$(DEPDIR)/symtab.Po
+	-rm -f ./$(DEPDIR)/tape.Po
+	-rm -f ./$(DEPDIR)/utilities.Po
+	-rm -f ./$(DEPDIR)/xattr.Po
 	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
@@ -718,9 +757,9 @@ uninstall-man: uninstall-man8
 
 .MAKE: install-am install-exec-am install-strip uninstall-am
 
-.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
-	clean-libtool clean-sbinPROGRAMS cscopelist-am ctags ctags-am \
-	distclean distclean-compile distclean-generic \
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
+	clean-generic clean-libtool clean-sbinPROGRAMS cscopelist-am \
+	ctags ctags-am distclean distclean-compile distclean-generic \
 	distclean-libtool distclean-tags distdir dvi dvi-am html \
 	html-am info info-am install install-am install-data \
 	install-data-am install-dvi install-dvi-am install-exec \
@@ -734,6 +773,8 @@ uninstall-man: uninstall-man8
 	tags tags-am uninstall uninstall-am uninstall-hook \
 	uninstall-man uninstall-man8 uninstall-sbinPROGRAMS
 
+.PRECIOUS: Makefile
+
 
 restore.8: restore.8.in
 	$(AM_V_GEN)\
diff --git a/restore/dirs.c b/restore/dirs.c
index 9aa1157..c6154fe 100644
--- a/restore/dirs.c
+++ b/restore/dirs.c
@@ -3,7 +3,7 @@
  *	dump and restore backup suit
  *	Remy Card <card@Linux.EU.Org>, 1994-1997
  *	Stelian Pop <stelian@popies.net>, 1999-2000
- *	Stelian Pop <stelian@popies.net> - Alc�ve <www.alcove.com>, 2000-2002
+ *	Stelian Pop <stelian@popies.net> - Alcôve <www.alcove.com>, 2000-2002
  */
 
 /*
diff --git a/restore/extern.h b/restore/extern.h
index 6468927..8307f59 100644
--- a/restore/extern.h
+++ b/restore/extern.h
@@ -3,7 +3,7 @@
  *	dump and restore backup suit
  *	Remy Card <card@Linux.EU.Org>, 1994-1997
  *	Stelian Pop <stelian@popies.net>, 1999-2000
- *	Stelian Pop <stelian@popies.net> - Alc�ve <www.alcove.com>, 2000-2002
+ *	Stelian Pop <stelian@popies.net> - Alcôve <www.alcove.com>, 2000-2002
  */
 
 /*-
diff --git a/restore/interactive.c b/restore/interactive.c
index 2b1064c..99252d1 100644
--- a/restore/interactive.c
+++ b/restore/interactive.c
@@ -3,7 +3,7 @@
  *	dump and restore backup suit
  *	Remy Card <card@Linux.EU.Org>, 1994-1997
  *	Stelian Pop <stelian@popies.net>, 1999-2000
- *	Stelian Pop <stelian@popies.net> - Alc�ve <www.alcove.com>, 2000-2002
+ *	Stelian Pop <stelian@popies.net> - Alcôve <www.alcove.com>, 2000-2002
  */
 
 /*
diff --git a/restore/main.c b/restore/main.c
index 4ce7293..6d0b421 100644
--- a/restore/main.c
+++ b/restore/main.c
@@ -3,7 +3,7 @@
  *	dump and restore backup suit
  *	Remy Card <card@Linux.EU.Org>, 1994-1997
  *	Stelian Pop <stelian@popies.net>, 1999-2000
- *	Stelian Pop <stelian@popies.net> - Alc�ve <www.alcove.com>, 2000-2002
+ *	Stelian Pop <stelian@popies.net> - Alcôve <www.alcove.com>, 2000-2002
  */
 
 /*
diff --git a/restore/restore.8.in b/restore/restore.8.in
index 661486e..b414300 100644
--- a/restore/restore.8.in
+++ b/restore/restore.8.in
@@ -755,7 +755,7 @@ Starting with 0.4b5, the new maintainer is Stelian Pop <stelian@popies.net>.
 .SH AVAILABILITY
 The
 .B dump/restore
-backup suite is available from <http://dump.sourceforge.net>
+backup suite is available from <https://dump.sourceforge.io>
 .SH HISTORY
 The
 .B restore
diff --git a/restore/restore.c b/restore/restore.c
index a775e37..f1eeceb 100644
--- a/restore/restore.c
+++ b/restore/restore.c
@@ -3,7 +3,7 @@
  *	dump and restore backup suit
  *	Remy Card <card@Linux.EU.Org>, 1994-1997
  *	Stelian Pop <stelian@popies.net>, 1999-2000
- *	Stelian Pop <stelian@popies.net> - Alc�ve <www.alcove.com>, 2000-2002
+ *	Stelian Pop <stelian@popies.net> - Alcôve <www.alcove.com>, 2000-2002
  */
 
 /*
diff --git a/restore/restore.h b/restore/restore.h
index 68ec54e..db4630e 100644
--- a/restore/restore.h
+++ b/restore/restore.h
@@ -3,7 +3,7 @@
  *	dump and restore backup suit
  *	Remy Card <card@Linux.EU.Org>, 1994-1997
  *	Stelian Pop <stelian@popies.net>, 1999-2000
- *	Stelian Pop <stelian@popies.net> - Alc�ve <www.alcove.com>, 2000-2002
+ *	Stelian Pop <stelian@popies.net> - Alcôve <www.alcove.com>, 2000-2002
  */
 
 /*
diff --git a/restore/symtab.c b/restore/symtab.c
index edca152..318ba45 100644
--- a/restore/symtab.c
+++ b/restore/symtab.c
@@ -3,7 +3,7 @@
  *	dump and restore backup suit
  *	Remy Card <card@Linux.EU.Org>, 1994-1997
  *	Stelian Pop <stelian@popies.net>, 1999-2000
- *	Stelian Pop <stelian@popies.net> - Alc�ve <www.alcove.com>, 2000-2002
+ *	Stelian Pop <stelian@popies.net> - Alcôve <www.alcove.com>, 2000-2002
  */
 
 /*
diff --git a/restore/tape.c b/restore/tape.c
index 8ddd546..9e41d51 100644
--- a/restore/tape.c
+++ b/restore/tape.c
@@ -3,7 +3,7 @@
  *	dump and restore backup suit
  *	Remy Card <card@Linux.EU.Org>, 1994-1997
  *	Stelian Pop <stelian@popies.net>, 1999-2000
- *	Stelian Pop <stelian@popies.net> - Alc�ve <www.alcove.com>, 2000-2002
+ *	Stelian Pop <stelian@popies.net> - Alcôve <www.alcove.com>, 2000-2002
  */
 
 /*
@@ -900,6 +900,15 @@ extractfile(struct entry *ep, int doremove)
 		uid_t luid = curfile.dip->di_uid;
 		gid_t lgid = curfile.dip->di_gid;
 #endif
+#ifdef HAVE_UTIMENSAT
+		struct timespec times[2];
+
+		times[0].tv_sec  =  timep[0].tv_sec;
+		times[0].tv_nsec =  timep[0].tv_usec * 1000;
+		times[1].tv_sec  =  timep[1].tv_sec;
+		times[1].tv_nsec =  timep[1].tv_usec * 1000;
+#endif
+
 		if (! (spcl.c_flags & DR_METAONLY)) {
 			lnkbuf[0] = '\0';
 			pathlen = 0;
@@ -918,6 +927,10 @@ extractfile(struct entry *ep, int doremove)
 #ifdef HAVE_LCHOWN
 		if (lchown(name, luid, lgid) < 0)
 			warn("%s: lchown", name);
+#endif
+#ifdef HAVE_UTIMENSAT
+		if (utimensat(AT_FDCWD, name, times, AT_SYMLINK_NOFOLLOW) < 0)
+			 warn("%s: file timestamp update failed", name);
 #endif
 		extractattr(name);
 		return (GOOD);
@@ -1409,7 +1422,11 @@ loop:
 		last_write_was_hole = 1;
 	}
 	if (last_write_was_hole) {
-		if (ftruncate(ofile, origsize) < 0)
+		/*
+		 * Do not attempt a truncate if running an on-the-fly compare, as there
+		 * IS no file to truncate in that case!
+		 */
+		if (ofile >= 0 && ftruncate(ofile, origsize) < 0)
 			warn("%s: ftruncate", curfile.name);
 	}
 	if (!readingmaps)
@@ -1889,6 +1906,11 @@ comparefile(char *name)
 		}
 		else {
 			cmperror = 0;
+			/*
+			 * tell getfile to not truncate as there is no open file:
+			 * xtrcmpfile works off mem buffer.
+			 */
+			ofile = -1;
 			getfile(xtrcmpfile, xtrcmpskip);
 			if (!cmperror) {
 				char c;
diff --git a/restore/utilities.c b/restore/utilities.c
index 4067523..a7d74f6 100644
--- a/restore/utilities.c
+++ b/restore/utilities.c
@@ -3,7 +3,7 @@
  *	dump and restore backup suit
  *	Remy Card <card@Linux.EU.Org>, 1994-1997
  *	Stelian Pop <stelian@popies.net>, 1999-2000
- *	Stelian Pop <stelian@popies.net> - Alc�ve <www.alcove.com>, 2000-2002
+ *	Stelian Pop <stelian@popies.net> - Alcôve <www.alcove.com>, 2000-2002
  */
 
 /*
diff --git a/restore/xattr.c b/restore/xattr.c
index 0c1b547..9f80da6 100644
--- a/restore/xattr.c
+++ b/restore/xattr.c
@@ -30,6 +30,7 @@
 #include <config.h>
 #include <compaterr.h>
 #include <sys/types.h>
+#include <sys/xattr.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -118,82 +119,6 @@ struct ext2_xattr_entry {
 		(entry)->e_value_offs + sizeof(struct ext3_xattr_ibody_header) : \
 		(entry)->e_value_offs))
 
-/*
- * xattr syscalls do not exist yet in libc, get our own copy here,
- * taken from libattr.
- */
-#if defined (__i386__)
-# define HAVE_XATTR_SYSCALLS 1
-# define __NR_lsetxattr		227
-# define __NR_lgetxattr		230
-# define __NR_llistxattr	233
-#elif defined (__sparc__)
-# define HAVE_XATTR_SYSCALLS 1
-# define __NR_lsetxattr		170
-# define __NR_lgetxattr		173
-# define __NR_llistxattr	179
-#elif defined (__ia64__)
-# define HAVE_XATTR_SYSCALLS 1
-# define __NR_lsetxattr		1218
-# define __NR_lgetxattr		1221
-# define __NR_llistxattr	1224
-#elif defined (__powerpc__)
-# define HAVE_XATTR_SYSCALLS 1
-# define __NR_lsetxattr		210
-# define __NR_lgetxattr		213
-# define __NR_llistxattr	216
-#elif defined (__x86_64__)
-# define HAVE_XATTR_SYSCALLS 1
-# define __NR_lsetxattr		189
-# define __NR_lgetxattr		192
-# define __NR_llistxattr	195
-#elif defined (__s390__)
-# define HAVE_XATTR_SYSCALLS 1
-# define __NR_lsetxattr		225
-# define __NR_lgetxattr		228
-# define __NR_llistxattr	231
-#elif defined (__arm__)
-# define HAVE_XATTR_SYSCALLS 1
-# define __NR_SYSCALL_BASE 0x900000
-# define __NR_lsetxattr		(__NR_SYSCALL_BASE+227)
-# define __NR_lgetxattr		(__NR_SYSCALL_BASE+230)
-# define __NR_llistxattr	(__NR_SYSCALL_BASE+233)
-#elif defined (__mips64__)
-# define HAVE_XATTR_SYSCALLS 1
-# define __NR_Linux 5000
-# define __NR_lsetxattr		(__NR_Linux + 218)
-# define __NR_lgetxattr		(__NR_Linux + 221)
-# define __NR_llistxattr	(__NR_Linux + 224)
-#elif defined (__mips__)
-# define HAVE_XATTR_SYSCALLS 1
-# define __NR_Linux 4000
-# define __NR_lsetxattr		(__NR_Linux + 225)
-# define __NR_lgetxattr		(__NR_Linux + 228)
-# define __NR_llistxattr	(__NR_Linux + 231)
-#elif defined (__alpha__)
-# define HAVE_XATTR_SYSCALLS 1
-# define __NR_lsetxattr		383
-# define __NR_lgetxattr		386
-# define __NR_llistxattr	389
-#elif defined (__mc68000__)
-# define HAVE_XATTR_SYSCALLS 1
-# define __NR_lsetxattr		224
-# define __NR_lgetxattr		227
-# define __NR_llistxattr	230
-#else
-# warning "Extended attribute syscalls undefined for this architecture"
-# define HAVE_XATTR_SYSCALLS 0
-#endif
-
-#if HAVE_XATTR_SYSCALLS
-# define SYSCALL(args...)	syscall(args)
-#else
-# define SYSCALL(args...)	( errno = ENOSYS, -1 )
-#endif
-
-static int lsetxattr (const char *, const char *, void *, size_t, int);
-static ssize_t lgetxattr (const char *, const char *, void *, size_t);
-static ssize_t llistxattr (const char *, char *, size_t);
 static int xattr_cb_list (char *, char *, int, int, void *);
 static int xattr_cb_set (char *, char *, int, int, void *);
 static int xattr_cb_compare (char *, char *, int, int, void *);
@@ -201,24 +126,6 @@ static int xattr_verify (char *);
 static int xattr_count (char *, int *);
 static int xattr_walk (char *, int (*)(char *, char *, int, int, void *), void *);
 
-static int
-lsetxattr(const char *path, const char *name, void *value, size_t size, int flags)
-{
-	return SYSCALL(__NR_lsetxattr, path, name, value, size, flags);
-}
-
-static ssize_t
-lgetxattr(const char *path, const char *name, void *value, size_t size)
-{
-	return SYSCALL(__NR_lgetxattr, path, name, value, size);
-}
-
-static ssize_t
-llistxattr(const char *path, char *list, size_t size)
-{
-	return SYSCALL(__NR_llistxattr, path, list, size);
-}
-
 #define POSIX_ACL_XATTR_VERSION 0x0002
 
 #define ACL_UNDEFINED_ID        (-1)
diff --git a/rmt/.gitignore b/rmt/.gitignore
deleted file mode 100644
index c40bf31..0000000
--- a/rmt/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-/ermt
-/rmt
-/rmt.8
diff --git a/rmt/Makefile.in b/rmt/Makefile.in
index 70b9d63..0fdcc5d 100644
--- a/rmt/Makefile.in
+++ b/rmt/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.2 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2020 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,8 +91,6 @@ host_triplet = @host@
 sbin_PROGRAMS = rmt$(EXEEXT) $(am__EXEEXT_1)
 @BUILD_ERMT_TRUE@am__append_1 = ermt
 subdir = rmt
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp
 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 \
@@ -90,6 +98,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
 	$(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -123,7 +132,9 @@ am__v_at_0 = @
 am__v_at_1 = 
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ./$(DEPDIR)/cipher.Po ./$(DEPDIR)/ermt.Po \
+	./$(DEPDIR)/rmt.Po
 am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -199,6 +210,7 @@ am__define_uniq_tagged_files = \
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -219,6 +231,7 @@ COM_ERR_LIBS = @COM_ERR_LIBS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
+DATE = @DATE@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DLLTOOL = @DLLTOOL@
@@ -330,6 +343,7 @@ pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -362,14 +376,13 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu rmt/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu rmt/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
 	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
 	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
 	esac;
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -444,9 +457,15 @@ mostlyclean-compile:
 distclean-compile:
 	-rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cipher.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ermt.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rmt.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cipher.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ermt.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rmt.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+	@$(MKDIR_P) $(@D)
+	@echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
 
 .c.o:
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -570,7 +589,10 @@ cscopelist-am: $(am__tagged_files)
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
-distdir: $(DISTFILES)
+distdir: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	list='$(DISTFILES)'; \
@@ -644,7 +666,9 @@ clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \
 	mostlyclean-am
 
 distclean: distclean-am
-	-rm -rf ./$(DEPDIR)
+		-rm -f ./$(DEPDIR)/cipher.Po
+	-rm -f ./$(DEPDIR)/ermt.Po
+	-rm -f ./$(DEPDIR)/rmt.Po
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
 	distclean-tags
@@ -690,7 +714,9 @@ install-ps-am:
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
-	-rm -rf ./$(DEPDIR)
+		-rm -f ./$(DEPDIR)/cipher.Po
+	-rm -f ./$(DEPDIR)/ermt.Po
+	-rm -f ./$(DEPDIR)/rmt.Po
 	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
@@ -713,9 +739,9 @@ uninstall-man: uninstall-man8
 
 .MAKE: install-am install-strip
 
-.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
-	clean-libtool clean-sbinPROGRAMS cscopelist-am ctags ctags-am \
-	distclean distclean-compile distclean-generic \
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
+	clean-generic clean-libtool clean-sbinPROGRAMS cscopelist-am \
+	ctags ctags-am distclean distclean-compile distclean-generic \
 	distclean-libtool distclean-tags distdir dvi dvi-am html \
 	html-am info info-am install install-am install-data \
 	install-data-am install-dvi install-dvi-am install-exec \
@@ -728,6 +754,8 @@ uninstall-man: uninstall-man8
 	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-man uninstall-man8 uninstall-sbinPROGRAMS
 
+.PRECIOUS: Makefile
+
 
 rmt.8: rmt.8.in
 	$(AM_V_GEN)\
diff --git a/rmt/cipher.c b/rmt/cipher.c
index 8ad219c..ca92cad 100644
--- a/rmt/cipher.c
+++ b/rmt/cipher.c
@@ -23,7 +23,7 @@
 char *
 cipher(char *buf, int buflen, int do_encrypt)
 {
-	static EVP_CIPHER_CTX ctx;
+	EVP_CIPHER_CTX *ctx = EVP_CIPHER_CTX_new();
 	static char *out = NULL;	/* return value, grown as necessary */
 	static int outlen = 0;
 	static int init = 0, which, blocksize;
@@ -71,13 +71,13 @@ cipher(char *buf, int buflen, int do_encrypt)
 		}
 		EVP_BytesToKey(cipher, EVP_md5(), NULL,
 			buf, strlen(buf), 1, key, iv);
-		EVP_CIPHER_CTX_init(&ctx);
-		EVP_CipherInit_ex(&ctx, cipher, NULL, key, iv, do_encrypt);
-		EVP_CIPHER_CTX_set_padding(&ctx, 0);	// -nopad
+		EVP_CIPHER_CTX_init(ctx);
+		EVP_CipherInit_ex(ctx, cipher, NULL, key, iv, do_encrypt);
+		EVP_CIPHER_CTX_set_padding(ctx, 0);	// -nopad
 		OPENSSL_cleanse(buf, sizeof buf);
 		OPENSSL_cleanse(key, sizeof key);
 		OPENSSL_cleanse(iv, sizeof iv);
-		blocksize = EVP_CIPHER_CTX_block_size(&ctx);
+		blocksize = EVP_CIPHER_CTX_block_size(ctx);
 		which = do_encrypt;
 		init = 1;
 	}
@@ -95,7 +95,7 @@ cipher(char *buf, int buflen, int do_encrypt)
 		outlen = (buflen+blocksize) * 2;
 		out = realloc(out, outlen);
 	}
-	if (!EVP_CipherUpdate(&ctx, out, &n, buf, buflen)) {
+	if (!EVP_CipherUpdate(ctx, out, &n, buf, buflen)) {
 		syslog(LOG_ERR, "EVP_CipherUpdate failed");
 		errno = EINVAL;
 		return NULL;
@@ -106,6 +106,7 @@ cipher(char *buf, int buflen, int do_encrypt)
 		return NULL;
 	}
 	// assert(ctx->buf_len == 0);
+	EVP_CIPHER_CTX_free(ctx);
 	return out;
 }
 
diff --git a/rmt/rmt.8.in b/rmt/rmt.8.in
index 3beba14..f2689f7 100644
--- a/rmt/rmt.8.in
+++ b/rmt/rmt.8.in
@@ -356,7 +356,7 @@ Starting with 0.4b5, the new maintainer is Stelian Pop <stelian@popies.net>.
 .SH AVAILABILITY
 The
 .B dump/restore
-backup suit is available from <http://dump.sourceforge.net>
+backup suit is available from <https://dump.sourceforge.io>
 .SH HISTORY
 The
 .B rmt
diff --git a/rmt/rmt.c b/rmt/rmt.c
index 24e0f7b..8a11924 100644
--- a/rmt/rmt.c
+++ b/rmt/rmt.c
@@ -3,7 +3,7 @@
  *	dump and restore backup suit
  *	Remy Card <card@Linux.EU.Org>, 1994-1997
  *	Stelian Pop <stelian@popies.net>, 1999-2000
- *	Stelian Pop <stelian@popies.net> - Alc�ve <www.alcove.com>, 2000-2002
+ *	Stelian Pop <stelian@popies.net> - Alcôve <www.alcove.com>, 2000-2002
  */
 
 /*
@@ -71,7 +71,7 @@ static FILE	*debug;
 
 /*
  * Support for Sun's extended RMT protocol
- * 	code originally written by J�rg Schilling <schilling@fokus.gmd.de>
+ * 	code originally written by Jörg Schilling <schilling@fokus.gmd.de>
  * 	and relicensed by his permission from GPL to BSD for use in dump.
  *
  * 	rmt_version is 0 for regular clients (Linux included)
diff --git a/testing/scripts/quick-regression.sh b/testing/scripts/quick-regression.sh
deleted file mode 100644
index 1c5fcaf..0000000
--- a/testing/scripts/quick-regression.sh
+++ /dev/null
@@ -1,354 +0,0 @@
-#!/bin/bash
-
-#
-# 5-second regression test for dump/verify/restore. It's not intended to be
-# an exhaustive regression test, just a quick way to verify that you haven't
-# introduced any errors when changing code.
-#
-# N.B., this only verifies that THIS build of dump(8) and THIS build of
-# restore(8) will play well together. It does not guarantee that these systems
-# are compatible with released versions of the software! For that we need
-# to keep images of known-good partitions and dump files.
-#
-# Author: Bear Giles (bgiles@coyotesong.com)
-# License granted to dump project under non-advertising BSD license.
-#
-
-#
-# Create 10 MB virtual partition.
-#
-# mkvirtpart(filename, loop device)
-#
-mkvirtpart()
-{
-    FILENAME=$1
-    LOOPDEV=$2
-
-    if [ "$#" -ne "2" ]; then
-      /bin/echo "usage: mkvrtpart FILENAME LOOPDEV"
-      return 1
-    fi
-
-    # create 10M sparse file
-    /usr/bin/truncate -s 10M $FILENAME
-    if [ "$?" -ne "0" ]; then
-      /bin/echo "unable to create partition image."
-      return 1
-    fi
-
-    # mount and format it
-    /sbin/losetup $LOOPDEV $FILENAME
-    if [ "$?" -ne "0" ]; then
-      /bin/echo "setting up loop device failed."
-      return 1
-    fi
-
-    /sbin/mkfs -text4 $LOOPDEV
-    if [ "$?" -ne "0" ]; then
-      /bin/echo "formating test partition failed."
-      /sbin/losetup -d $LOOPDEV
-      return 1
-    fi
-
-    /sbin/losetup -d $LOOPDEV
-    if [ "$?" -ne "0" ]; then
-      /bin/echo "tearing down loop device failed."
-      return 1
-    fi
-}
-
-#
-# Populate test filesystem
-#
-# mktestfs(root)
-mktestfs()
-{
-    ROOT=$1
-
-    if [ "$#" -ne "1" ]; then
-      /bin/echo "usage: mktestfs ROOT"
-      return 1
-    fi
-
-    if [ "$ROOT" == "" -o "$ROOT" == "/" ]; then
-        /bin/echo "cowardly refusing to stomp on root."
-        return 1
-    fi
-
-    /usr/bin/install -d $ROOT
-
-    # create typical file
-    /usr/bin/touch $ROOT/perm644
-    /bin/chmod 0644 $ROOT/perm644
-
-    # create typical executable
-    /usr/bin/touch $ROOT/perm755
-    /bin/chmod 0755 $ROOT/perm755
-
-    # create multiple symlinks
-    /usr/bin/touch $ROOT/symlink
-    /bin/ln $ROOT/symlink $ROOT/symlink1
-    /bin/ln $ROOT/symlink $ROOT/symlink2
-
-    # create hard links
-    /usr/bin/touch $ROOT/hardlink
-    /bin/ln $ROOT/hardlink $ROOT/hardlink1
-    /bin/ln $ROOT/hardlink $ROOT/hardlink2
-
-    # create block device
-    /bin/mknod $ROOT/block b 10 20
-
-    # create character device
-    /bin/mknod $ROOT/char c 11 21
-
-    # create FIFO
-    /bin/mknod $ROOT/pipe p
-
-    # make sparse device
-    #/usr/bin/truncate -s 500k $ROOT/sparse
-
-    # populate some files
-    /bin/mkdir $ROOT/man1
-    /bin/cp -rp /usr/share/man/man1/* $ROOT/man1
-}
-
-#
-# Single test cycle
-#
-dump_verify_restore() {
-
-    if [ "$#" -lt "5" ]; then
-      /bin/echo "usage: dump_verify_restore SRC_LOOPDEV SRC_MOUNTPOINT DEST_LOOPDEV DEST_MOUNTPOINT DUMPFILE ..."
-      return 1
-    fi
-
-    SRC_LOOPDEV=$1
-    SRC_MOUNTPOINT=$2
-    DEST_LOOPDEV=$3
-    DEST_MOUNTPOINT=$4
-    DUMPFILE=$5
-
-    shift; shift; shift; shift; shift
-
-    /sbin/losetup $SRC_LOOPDEV $SRC_FILENAME
-    if [ "$?" -ne "0" ]; then
-      /bin/echo "setting up loop device failed."
-      return 1
-    fi
-
-    # we have to mount partition for verify to work even if we dump the
-    # underlying partition.
-    /bin/mount $SRC_LOOPDEV $SRC_MOUNTPOINT
-    if [ "$?" -ne "0" ]; then
-        /bin/echo "mounting source partition failed."
-        /sbin/losetup -d $SRC_LOOPDEV
-        return 1;
-    fi
-
-    # dump the test partition
-    ../dump/dump -0 $@ -f $DUMPFILE $SRC_LOOPDEV
-    if [ "$?" -ne "0" ]; then
-      echo "dump failed, error code $?"
-      /bin/rm $DUMPFILE
-      /bin/umount $SRC_MOUNTPOINT
-      /sbin/losetup -d $SRC_LOOPDEV
-      return 1
-    fi
-
-    # verify
-    ../restore/restore -C -f $DUMPFILE
-    if [ "$?" -ne "0" ]; then
-      echo "verification failed, error code $?"
-      /bin/rm $DUMPFILE
-      /bin/umount $SRC_MOUNTPOINT
-      /sbin/losetup -d $SRC_LOOPDEV
-      return 1
-    fi
-
-    # restore fs, compare to orginal one
-    # I can't do that yet since restore will only restore to the current directory.
-    # this makes sense for a number of reasons it difficult to test our newly
-    # compiled code.
-    # ../../restore/restore -r ...
-
-    # tear everything down
-    /bin/umount $SRC_MOUNTPOINT
-    if [ "$?" -ne "0" ]; then
-       /bin/echo "unmounting test partition failed."
-       return 1
-    fi
-
-    /sbin/losetup -d $SRC_LOOPDEV
-    if [ "$?" -ne "0" ]; then
-      /bin/echo "tearing down loop device failed."
-      return 1
-    fi
-}
-
-#
-# set up source partition.
-#
-setup_src_partition() {
-    SRC_FILENAME=$1
-    SRC_LOOPDEV=$2
-    SRC_MOUNTPOINT=$3
-
-    if [ "$#" -ne "3" ]; then
-      /bin/echo "usage: setup_src_partition SRC_FILENAME SRC_LOOPDEV SRC_MOUNTPOINT"
-      return 1
-    fi
-
-    mkvirtpart $SRC_FILENAME $SRC_LOOPDEV
-    if [ $? -ne 0 ]; then
-       /bin/echo "creating source test partition failed."
-       return 1
-    fi
-
-    # mount it
-    /sbin/losetup $SRC_LOOPDEV $SRC_FILENAME
-    if [ "$?" -ne "0" ]; then
-       /bin/echo "setting up loop device failed."
-       return 1
-    fi
-
-    /bin/mount $SRC_LOOPDEV $SRC_MOUNTPOINT
-    if [ "$?" -ne "0" ]; then
-       /bin/echo "mounting test partition failed."
-       return 1
-    fi
-
-    mktestfs $SRC_MOUNTPOINT
-    if [ "$?" -ne "0" ]; then
-       return 1
-    fi
-
-    /bin/umount $SRC_LOOPDEV
-    if [ "$?" -ne "0" ]; then
-       /bin/echo "unmounting test partition failed."
-       return 1
-    fi
-
-    /sbin/losetup -d $SRC_LOOPDEV
-    if [ "$?" -ne "0" ]; then
-      /bin/echo "tearing down loop device failed."
-      return 1
-    fi
-
-    return 0
-}
-
-
-#
-# clean up temporary files. We want to be extremely careful here that
-# we don't accidently do a 'rm -rf' on /
-#
-cleanup() {
-
-    if [ "$#" -ne "6" ]; then
-      /bin/echo "usage: cleanup SRC_FILENAME SRC_MOUNTPOINT DEST_FILENAME DEST_MOUNTPOINT BASEDIR DUMPFILE"
-      return 1
-    fi
-
-    SRC_FILENAME=$1
-    SRC_MOUNTPOINT=$2
-    DEST_FILENAME=$3
-    DEST_MOUNTPOINT=$4
-    BASEDIR=$5
-    DUMPFILE=$6
-
-    if [ "$BASEDIR" == "" -o "$BASEDIR" == "/" ]; then
-        /bin/echo "cowardly refusing to delete root."
-        return 1
-    fi
-
-    # we don't do rm -r since we don't want to delete
-    # anything we didn't create.
-    /bin/rm -f $SRC_FILENAME
-    /bin/rmdir $SRC_MOUNTPOINT
-    /bin/rm -f $DEST_FILENAME
-    /bin/rmdir $DEST_MOUNTPOINT
-    /bin/rm -f $DUMPFILE
-    /bin/rmdir $BASEDIR
-
-    return 0
-}
-
-###############################################
-#
-# the actual script
-#
-BASEDIR=`/bin/mktemp -d`
-
-SRC_FILENAME=$BASEDIR/dump-test-src.img
-SRC_LOOPDEV=/dev/loop6
-SRC_MOUNTPOINT=$BASEDIR/src
-DEST_FILENAME=$BASEDIR/dump-test-dst.img
-DEST_LOOPDEV=/dev/loop7
-DEST_MOUNTPOINT=$BASEDIR/dest
-DUMPFILE=$BASEDIR/dump-test.dump
-
-/bin/echo BASEDIR = $BASEDIR
-
-/usr/bin/install -d $BASEDIR
-/usr/bin/install -d $SRC_MOUNTPOINT
-/usr/bin/install -d $DEST_MOUNTPOINT
-
-# Setup source partition
-setup_src_partition $SRC_FILENAME $SRC_LOOPDEV $SRC_MOUNTPOINT
-if [ $? -ne 0 ]; then
-   /bin/echo "creating source test partition failed."
-   cleanup $SRC_FILENAME $SRC_MOUNTPOINT $DEST_FILENAME $DEST_MOUNTPOINT $BASEDIR $DUMPFILE
-   exit 1
-fi
-
-# create dest partition (for restores)
-mkvirtpart $DEST_FILENAME $DEST_LOOPDEV
-if [ $? -ne 0 ]; then
-   /bin/echo "creating destination test partition failed."
-   cleanup $SRC_FILENAME $SRC_MOUNTPOINT $DEST_FILENAME $DEST_MOUNTPOINT $BASEDIR $DUMPFILE
-   exit 1
-fi
-
-echo
-echo "testing basic dump/restore"
-dump_verify_restore $SRC_LOOPDEV $SRC_MOUNTPOINT $DEST_LOOPDEV $DEST_MOUNTPOINT $DUMPFILE
-if [ $? -ne 0 ]; then
-   /bin/echo "dump cycle failed."
-   cleanup $SRC_FILENAME $SRC_MOUNTPOINT $DEST_FILENAME $DEST_MOUNTPOINT $BASEDIR $DUMPFILE
-   exit 1
-fi
-
-echo
-echo "testing compressed dump/restore (lzo)..."
-dump_verify_restore $SRC_LOOPDEV $SRC_MOUNTPOINT $DEST_LOOPDEV $DEST_MOUNTPOINT $DUMPFILE -y
-if [ $? -ne 0 ]; then
-   /bin/echo "dump cycle failed."
-   cleanup $SRC_FILENAME $SRC_MOUNTPOINT $DEST_FILENAME $DEST_MOUNTPOINT $BASEDIR $DUMPFILE
-   exit 1
-fi
-
-echo
-echo "testing compressed dump/restore (zlib)..."
-dump_verify_restore $SRC_LOOPDEV $SRC_MOUNTPOINT $DEST_LOOPDEV $DEST_MOUNTPOINT $DUMPFILE -z2
-if [ $? -ne 0 ]; then
-   /bin/echo "dump cycle failed."
-   cleanup $SRC_FILENAME $SRC_MOUNTPOINT $DEST_FILENAME $DEST_MOUNTPOINT $BASEDIR $DUMPFILE
-   exit 1
-fi
-
-echo
-echo "testing compressed dump/restore (bzlib)..."
-dump_verify_restore $SRC_LOOPDEV $SRC_MOUNTPOINT $DEST_LOOPDEV $DEST_MOUNTPOINT $DUMPFILE -j2
-if [ $? -ne 0 ]; then
-   /bin/echo "dump cycle failed."
-   cleanup $SRC_FILENAME $SRC_MOUNTPOINT $DEST_FILENAME $DEST_MOUNTPOINT $BASEDIR $DUMPFILE
-   exit 1
-fi
-
-cleanup $SRC_FILENAME $SRC_MOUNTPOINT $DEST_FILENAME $DEST_MOUNTPOINT $BASEDIR $DUMPFILE
-
-/bin/echo "#"
-/bin/echo "# success!"
-/bin/echo "#"
-
-exit 0

Run locally

More details

Full run details