From 411f70ee8ee9ef33808a019678b9dfb3a1c6f999 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Thu, 16 Mar 2023 08:44:50 +0100 Subject: [PATCH] inetutils: Update to 2.4 This syncs everything with cygwin, except the selection of tools to build stays the same. And for some reason I needed the "EXEEXT" workaround, which I haven't looked into further. --- inetutils/01-buildsystem-updates.patch | 1237 - inetutils/07-other-buildsys-updates.patch | 67 - inetutils/08-libinetutils.patch | 192 - inetutils/09-inetd.patch | 272 - inetutils/11-telnet.patch | 31 - inetutils/13-ftp.patch | 122 - inetutils/14-ftpd.patch | 311 - inetutils/15-syslogd.patch | 49 - inetutils/16-talk.patch | 131 - inetutils/17-talkd.patch | 94 - inetutils/PKGBUILD | 87 +- inetutils/icmp6.h | 345 + inetutils/inetutils-1.9.4-1.src.patch | 45 - inetutils/inetutils-1.9.4-update-gnulib.patch | 47100 ---------------- inetutils/inetutils-2.4-1.src.patch | 7023 +++ inetutils/inetutils.install | 13 - inetutils/talkd.h | 6 +- inetutils/tftp.h | 88 - 18 files changed, 7401 insertions(+), 49812 deletions(-) delete mode 100644 inetutils/01-buildsystem-updates.patch delete mode 100644 inetutils/07-other-buildsys-updates.patch delete mode 100644 inetutils/08-libinetutils.patch delete mode 100644 inetutils/09-inetd.patch delete mode 100644 inetutils/11-telnet.patch delete mode 100644 inetutils/13-ftp.patch delete mode 100644 inetutils/14-ftpd.patch delete mode 100644 inetutils/15-syslogd.patch delete mode 100644 inetutils/16-talk.patch delete mode 100644 inetutils/17-talkd.patch create mode 100644 inetutils/icmp6.h delete mode 100644 inetutils/inetutils-1.9.4-1.src.patch delete mode 100644 inetutils/inetutils-1.9.4-update-gnulib.patch create mode 100644 inetutils/inetutils-2.4-1.src.patch delete mode 100644 inetutils/inetutils.install delete mode 100644 inetutils/tftp.h diff --git a/inetutils/01-buildsystem-updates.patch b/inetutils/01-buildsystem-updates.patch deleted file mode 100644 index 3072d860..00000000 --- a/inetutils/01-buildsystem-updates.patch +++ /dev/null @@ -1,1237 +0,0 @@ -diff -Naur inetutils-1.9.2-orig/am/enable.m4 inetutils-1.9.2/am/enable.m4 ---- inetutils-1.9.2-orig/am/enable.m4 2013-09-26 12:36:38.000000000 +0300 -+++ inetutils-1.9.2/am/enable.m4 2014-12-12 11:55:10.232400000 +0300 -@@ -24,7 +24,7 @@ - [AC_ARG_ENABLE($1, AS_HELP_STRING([--disable-$1], [don't compile $1]), , - [enable_]$1[=$enable_]$2) - [if test "$enable_$1" = yes; then -- $1_BUILD=$1 -+ $1_BUILD=$1\$\(EXEEXT\) - $1_INSTALL_HOOK="install-$1-hook" - else - $1_BUILD='' -diff -Naur inetutils-1.9.2-orig/am/libcurses.m4 inetutils-1.9.2/am/libcurses.m4 ---- inetutils-1.9.2-orig/am/libcurses.m4 2013-10-09 15:00:47.000000000 +0300 -+++ inetutils-1.9.2/am/libcurses.m4 2014-12-12 11:55:10.248000000 +0300 -@@ -33,7 +33,7 @@ - [don't prefer -lncurses over -lcurses]), - , [enable_ncurses=yes]) - if test "$enable_ncurses" = yes; then -- AC_CHECK_LIB(ncurses, initscr, LIBNCURSES="-lncurses") -+ AC_CHECK_LIB(ncurses, initscr, LIBNCURSES="-lncursesw") - if test "$LIBNCURSES"; then - # Use ncurses header files instead of the ordinary ones, if possible; - # is there a better way of doing this, that avoids looking in specific -@@ -57,8 +57,8 @@ - AC_CACHE_CHECK(for ncurses include dir, - inetutils_cv_includedir_ncurses, - for D in $includedir $prefix/include /local/include /usr/local/include /include /usr/include; do -- if test -d $D/ncurses; then -- inetutils_cv_includedir_ncurses="$D/ncurses" -+ if test -d $D/ncursesw; then -+ inetutils_cv_includedir_ncurses="$D/ncursesw" - break - fi - test "$inetutils_cv_includedir_ncurses" \ -diff -Naur inetutils-1.9.2-orig/bootstrap inetutils-1.9.2/bootstrap ---- inetutils-1.9.2-orig/bootstrap 1970-01-01 03:00:00.000000000 +0300 -+++ inetutils-1.9.2/bootstrap 2014-12-12 11:55:10.248000000 +0300 -@@ -0,0 +1,988 @@ -+#! /bin/sh -+# Print a version string. -+scriptversion=2013-08-15.22; # UTC -+ -+# Bootstrap this package from checked-out sources. -+ -+# Copyright (C) 2003-2013 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 -+# the Free Software Foundation, either version 3 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, see . -+ -+# Originally written by Paul Eggert. The canonical version of this -+# script is maintained as build-aux/bootstrap in gnulib, however, to -+# be useful to your project, you should place a copy of it under -+# version control in the top-level directory of your project. The -+# intent is that all customization can be done with a bootstrap.conf -+# file also maintained in your version control; gnulib comes with a -+# template build-aux/bootstrap.conf to get you started. -+ -+# Please report bugs or propose patches to bug-gnulib@gnu.org. -+ -+nl=' -+' -+ -+# Ensure file names are sorted consistently across platforms. -+LC_ALL=C -+export LC_ALL -+ -+# Ensure that CDPATH is not set. Otherwise, the output from cd -+# would cause trouble in at least one use below. -+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH -+ -+local_gl_dir=gl -+ -+me=$0 -+ -+usage() { -+ cat <&2 -+} -+ -+# warn_ WORD1... -+warn_ () -+{ -+ # If IFS does not start with ' ', set it and emit the warning in a subshell. -+ case $IFS in -+ ' '*) warnf_ '%s\n' "$*";; -+ *) (IFS=' '; warn_ "$@");; -+ esac -+} -+ -+# die WORD1... -+die() { warn_ "$@"; exit 1; } -+ -+# Configuration. -+ -+# Name of the Makefile.am -+gnulib_mk=gnulib.mk -+ -+# List of gnulib modules needed. -+gnulib_modules= -+ -+# Any gnulib files needed that are not in modules. -+gnulib_files= -+ -+: ${AUTOPOINT=autopoint} -+: ${AUTORECONF=autoreconf} -+ -+# A function to be called right after gnulib-tool is run. -+# Override it via your own definition in bootstrap.conf. -+bootstrap_post_import_hook() { :; } -+ -+# A function to be called after everything else in this script. -+# Override it via your own definition in bootstrap.conf. -+bootstrap_epilogue() { :; } -+ -+# The command to download all .po files for a specified domain into -+# a specified directory. Fill in the first %s is the domain name, and -+# the second with the destination directory. Use rsync's -L and -r -+# options because the latest/%s directory and the .po files within are -+# all symlinks. -+po_download_command_format=\ -+"rsync --delete --exclude '*.s1' -Lrtvz \ -+ 'translationproject.org::tp/latest/%s/' '%s'" -+ -+# Fallback for downloading .po files (if rsync fails). -+po_download_command_format2=\ -+"wget --mirror -nd -q -np -A.po -P '%s' \ -+ http://translationproject.org/latest/%s/" -+ -+# Prefer a non-empty tarname (4th argument of AC_INIT if given), else -+# fall back to the package name (1st argument with munging) -+extract_package_name=' -+ /^AC_INIT(\[*/{ -+ s/// -+ /^[^,]*,[^,]*,[^,]*,[ []*\([^][ ,)]\)/{ -+ s//\1/ -+ s/[],)].*// -+ p -+ q -+ } -+ s/[],)].*// -+ s/^GNU // -+ y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ -+ s/[^abcdefghijklmnopqrstuvwxyz0123456789_]/-/g -+ p -+ } -+' -+package=$(sed -n "$extract_package_name" configure.ac) \ -+ || die 'cannot find package name in configure.ac' -+gnulib_name=lib$package -+ -+build_aux=build-aux -+source_base=lib -+m4_base=m4 -+doc_base=doc -+tests_base=tests -+gnulib_extra_files='' -+ -+# Additional gnulib-tool options to use. Use "\newline" to break lines. -+gnulib_tool_option_extras= -+ -+# Other locale categories that need message catalogs. -+EXTRA_LOCALE_CATEGORIES= -+ -+# Additional xgettext options to use. Use "\\\newline" to break lines. -+XGETTEXT_OPTIONS='\\\ -+ --flag=_:1:pass-c-format\\\ -+ --flag=N_:1:pass-c-format\\\ -+ --flag=error:3:c-format --flag=error_at_line:5:c-format\\\ -+' -+ -+# Package bug report address and copyright holder for gettext files -+COPYRIGHT_HOLDER='Free Software Foundation, Inc.' -+MSGID_BUGS_ADDRESS=bug-$package@gnu.org -+ -+# Files we don't want to import. -+excluded_files= -+ -+# File that should exist in the top directory of a checked out hierarchy, -+# but not in a distribution tarball. -+checkout_only_file=README-hacking -+ -+# Whether to use copies instead of symlinks. -+copy=false -+ -+# Set this to '.cvsignore .gitignore' in bootstrap.conf if you want -+# those files to be generated in directories like lib/, m4/, and po/. -+# Or set it to 'auto' to make this script select which to use based -+# on which version control system (if any) is used in the source directory. -+vc_ignore=auto -+ -+# Set this to true in bootstrap.conf to enable --bootstrap-sync by -+# default. -+bootstrap_sync=false -+ -+# Use git to update gnulib sources -+use_git=true -+ -+# find_tool ENVVAR NAMES... -+# ------------------------- -+# Search for a required program. Use the value of ENVVAR, if set, -+# otherwise find the first of the NAMES that can be run (i.e., -+# supports --version). If found, set ENVVAR to the program name, -+# die otherwise. -+# -+# FIXME: code duplication, see also gnu-web-doc-update. -+find_tool () -+{ -+ find_tool_envvar=$1 -+ shift -+ find_tool_names=$@ -+ eval "find_tool_res=\$$find_tool_envvar" -+ if test x"$find_tool_res" = x; then -+ for i; do -+ if ($i --version /dev/null 2>&1; then -+ find_tool_res=$i -+ break -+ fi -+ done -+ fi -+ if test x"$find_tool_res" = x; then -+ warn_ "one of these is required: $find_tool_names;" -+ die "alternatively set $find_tool_envvar to a compatible tool" -+ fi -+ eval "$find_tool_envvar=\$find_tool_res" -+ eval "export $find_tool_envvar" -+} -+ -+# Override the default configuration, if necessary. -+# Make sure that bootstrap.conf is sourced from the current directory -+# if we were invoked as "sh bootstrap". -+case "$0" in -+ */*) test -r "$0.conf" && . "$0.conf" ;; -+ *) test -r "$0.conf" && . ./"$0.conf" ;; -+esac -+ -+# Extra files from gnulib, which override files from other sources. -+test -z "${gnulib_extra_files}" && \ -+ gnulib_extra_files=" -+ build-aux/install-sh -+ build-aux/mdate-sh -+ build-aux/texinfo.tex -+ build-aux/depcomp -+ build-aux/config.guess -+ build-aux/config.sub -+ doc/INSTALL -+" -+ -+if test "$vc_ignore" = auto; then -+ vc_ignore= -+ test -d .git && vc_ignore=.gitignore -+ test -d CVS && vc_ignore="$vc_ignore .cvsignore" -+fi -+ -+# Translate configuration into internal form. -+ -+# Parse options. -+ -+for option -+do -+ case $option in -+ --help) -+ usage -+ exit;; -+ --gnulib-srcdir=*) -+ GNULIB_SRCDIR=${option#--gnulib-srcdir=};; -+ --skip-po) -+ SKIP_PO=t;; -+ --force) -+ checkout_only_file=;; -+ --copy) -+ copy=true;; -+ --bootstrap-sync) -+ bootstrap_sync=true;; -+ --no-bootstrap-sync) -+ bootstrap_sync=false;; -+ --no-git) -+ use_git=false;; -+ *) -+ die "$option: unknown option";; -+ esac -+done -+ -+$use_git || test -d "$GNULIB_SRCDIR" \ -+ || die "Error: --no-git requires --gnulib-srcdir" -+ -+if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then -+ die "Bootstrapping from a non-checked-out distribution is risky." -+fi -+ -+# Strip blank and comment lines to leave significant entries. -+gitignore_entries() { -+ sed '/^#/d; /^$/d' "$@" -+} -+ -+# If $STR is not already on a line by itself in $FILE, insert it at the start. -+# Entries are inserted at the start of the ignore list to ensure existing -+# entries starting with ! are not overridden. Such entries support -+# whitelisting exceptions after a more generic blacklist pattern. -+insert_if_absent() { -+ file=$1 -+ str=$2 -+ test -f $file || touch $file -+ test -r $file || die "Error: failed to read ignore file: $file" -+ duplicate_entries=$(gitignore_entries $file | sort | uniq -d) -+ if [ "$duplicate_entries" ] ; then -+ die "Error: Duplicate entries in $file: " $duplicate_entries -+ fi -+ linesold=$(gitignore_entries $file | wc -l) -+ linesnew=$( { echo "$str"; cat $file; } | gitignore_entries | sort -u | wc -l) -+ if [ $linesold != $linesnew ] ; then -+ { echo "$str" | cat - $file > $file.bak && mv $file.bak $file; } \ -+ || die "insert_if_absent $file $str: failed" -+ fi -+} -+ -+# Adjust $PATTERN for $VC_IGNORE_FILE and insert it with -+# insert_if_absent. -+insert_vc_ignore() { -+ vc_ignore_file="$1" -+ pattern="$2" -+ case $vc_ignore_file in -+ *.gitignore) -+ # A .gitignore entry that does not start with '/' applies -+ # recursively to subdirectories, so prepend '/' to every -+ # .gitignore entry. -+ pattern=$(echo "$pattern" | sed s,^,/,);; -+ esac -+ insert_if_absent "$vc_ignore_file" "$pattern" -+} -+ -+# Die if there is no AC_CONFIG_AUX_DIR($build_aux) line in configure.ac. -+found_aux_dir=no -+grep '^[ ]*AC_CONFIG_AUX_DIR(\['"$build_aux"'\])' configure.ac \ -+ >/dev/null && found_aux_dir=yes -+grep '^[ ]*AC_CONFIG_AUX_DIR('"$build_aux"')' configure.ac \ -+ >/dev/null && found_aux_dir=yes -+test $found_aux_dir = yes \ -+ || die "configure.ac lacks 'AC_CONFIG_AUX_DIR([$build_aux])'; add it" -+ -+# If $build_aux doesn't exist, create it now, otherwise some bits -+# below will malfunction. If creating it, also mark it as ignored. -+if test ! -d $build_aux; then -+ mkdir $build_aux -+ for dot_ig in x $vc_ignore; do -+ test $dot_ig = x && continue -+ insert_vc_ignore $dot_ig $build_aux -+ done -+fi -+ -+# Note this deviates from the version comparison in automake -+# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a -+# but this should suffice as we won't be specifying old -+# version formats or redundant trailing .0 in bootstrap.conf. -+# If we did want full compatibility then we should probably -+# use m4_version_compare from autoconf. -+sort_ver() { # sort -V is not generally available -+ ver1="$1" -+ ver2="$2" -+ -+ # split on '.' and compare each component -+ i=1 -+ while : ; do -+ p1=$(echo "$ver1" | cut -d. -f$i) -+ p2=$(echo "$ver2" | cut -d. -f$i) -+ if [ ! "$p1" ]; then -+ echo "$1 $2" -+ break -+ elif [ ! "$p2" ]; then -+ echo "$2 $1" -+ break -+ elif [ ! "$p1" = "$p2" ]; then -+ if [ "$p1" -gt "$p2" ] 2>/dev/null; then # numeric comparison -+ echo "$2 $1" -+ elif [ "$p2" -gt "$p1" ] 2>/dev/null; then # numeric comparison -+ echo "$1 $2" -+ else # numeric, then lexicographic comparison -+ lp=$(printf "$p1\n$p2\n" | LANG=C sort -n | tail -n1) -+ if [ "$lp" = "$p2" ]; then -+ echo "$1 $2" -+ else -+ echo "$2 $1" -+ fi -+ fi -+ break -+ fi -+ i=$(($i+1)) -+ done -+} -+ -+get_version() { -+ app=$1 -+ -+ $app --version >/dev/null 2>&1 || return 1 -+ -+ $app --version 2>&1 | -+ sed -n '# Move version to start of line. -+ s/.*[v ]\([0-9]\)/\1/ -+ -+ # Skip lines that do not start with version. -+ /^[0-9]/!d -+ -+ # Remove characters after the version. -+ s/[^.a-z0-9-].*// -+ -+ # The first component must be digits only. -+ s/^\([0-9]*\)[a-z-].*/\1/ -+ -+ #the following essentially does s/5.005/5.5/ -+ s/\.0*\([1-9]\)/.\1/g -+ p -+ q' -+} -+ -+check_versions() { -+ ret=0 -+ -+ while read app req_ver; do -+ # We only need libtoolize from the libtool package. -+ if test "$app" = libtool; then -+ app=libtoolize -+ fi -+ # Exempt git if --no-git is in effect. -+ if test "$app" = git; then -+ $use_git || continue -+ fi -+ # Honor $APP variables ($TAR, $AUTOCONF, etc.) -+ appvar=$(echo $app | LC_ALL=C tr '[a-z]-' '[A-Z]_') -+ test "$appvar" = TAR && appvar=AMTAR -+ case $appvar in -+ GZIP) ;; # Do not use $GZIP: it contains gzip options. -+ *) eval "app=\${$appvar-$app}" ;; -+ esac -+ -+ # Handle the still-experimental Automake-NG programs specially. -+ # They remain named as the mainstream Automake programs ("automake", -+ # and "aclocal") to avoid gratuitous incompatibilities with -+ # pre-existing usages (by, say, autoreconf, or custom autogen.sh -+ # scripts), but correctly identify themselves (as being part of -+ # "GNU automake-ng") when asked their version. -+ case $app in -+ automake-ng|aclocal-ng) -+ app=${app%-ng} -+ ($app --version | grep '(GNU automake-ng)') >/dev/null 2>&1 || { -+ warn_ "Error: '$app' not found or not from Automake-NG" -+ ret=1 -+ continue -+ } ;; -+ esac -+ if [ "$req_ver" = "-" ]; then -+ # Merely require app to exist; not all prereq apps are well-behaved -+ # so we have to rely on $? rather than get_version. -+ $app --version >/dev/null 2>&1 = $req_ver is required" -+ ret=1 -+ fi -+ fi -+ fi -+ done -+ -+ return $ret -+} -+ -+print_versions() { -+ echo "Program Min_version" -+ echo "----------------------" -+ printf %s "$buildreq" -+ echo "----------------------" -+ # can't depend on column -t -+} -+ -+# Find sha1sum, named gsha1sum on MacPorts, shasum on Mac OS X 10.6. -+# Also find the compatible sha1 utility on the BSDs -+if test x"$SKIP_PO" = x; then -+ find_tool SHA1SUM sha1sum gsha1sum shasum sha1 -+fi -+ -+use_libtool=0 -+# We'd like to use grep -E, to see if any of LT_INIT, -+# AC_PROG_LIBTOOL, AM_PROG_LIBTOOL is used in configure.ac, -+# but that's not portable enough (e.g., for Solaris). -+grep '^[ ]*A[CM]_PROG_LIBTOOL' configure.ac >/dev/null \ -+ && use_libtool=1 -+grep '^[ ]*LT_INIT' configure.ac >/dev/null \ -+ && use_libtool=1 -+if test $use_libtool = 1; then -+ find_tool LIBTOOLIZE glibtoolize libtoolize -+fi -+ -+# gnulib-tool requires at least automake and autoconf. -+# If either is not listed, add it (with minimum version) as a prerequisite. -+case $buildreq in -+ *automake*) ;; -+ *) buildreq="automake 1.9 -+$buildreq" ;; -+esac -+case $buildreq in -+ *autoconf*) ;; -+ *) buildreq="autoconf 2.59 -+$buildreq" ;; -+esac -+ -+# When we can deduce that gnulib-tool will require patch, -+# and when patch is not already listed as a prerequisite, add it, too. -+if test -d "$local_gl_dir" \ -+ && ! find "$local_gl_dir" -name '*.diff' -exec false {} +; then -+ case $buildreq in -+ *patch*) ;; -+ *) buildreq="patch - -+$buildreq" ;; -+ esac -+fi -+ -+if ! printf "$buildreq" | check_versions; then -+ echo >&2 -+ if test -f README-prereq; then -+ die "See README-prereq for how to get the prerequisite programs" -+ else -+ die "Please install the prerequisite programs" -+ fi -+fi -+ -+echo "$0: Bootstrapping from checked-out $package sources..." -+ -+# See if we can use gnulib's git-merge-changelog merge driver. -+if $use_git && test -d .git && (git --version) >/dev/null 2>/dev/null ; then -+ if git config merge.merge-changelog.driver >/dev/null ; then -+ : -+ elif (git-merge-changelog --version) >/dev/null 2>/dev/null ; then -+ echo "$0: initializing git-merge-changelog driver" -+ git config merge.merge-changelog.name 'GNU-style ChangeLog merge driver' -+ git config merge.merge-changelog.driver 'git-merge-changelog %O %A %B' -+ else -+ echo "$0: consider installing git-merge-changelog from gnulib" -+ fi -+fi -+ -+ -+cleanup_gnulib() { -+ status=$? -+ rm -fr "$gnulib_path" -+ exit $status -+} -+ -+git_modules_config () { -+ test -f .gitmodules && git config --file .gitmodules "$@" -+} -+ -+if $use_git; then -+ gnulib_path=$(git_modules_config submodule.gnulib.path) -+ test -z "$gnulib_path" && gnulib_path=gnulib -+fi -+ -+# Get gnulib files. Populate $GNULIB_SRCDIR, possibly updating a -+# submodule, for use in the rest of the script. -+ -+case ${GNULIB_SRCDIR--} in -+-) -+ # Note that $use_git is necessarily true in this case. -+ if git_modules_config submodule.gnulib.url >/dev/null; then -+ echo "$0: getting gnulib files..." -+ git submodule init || exit $? -+ git submodule update || exit $? -+ -+ elif [ ! -d "$gnulib_path" ]; then -+ echo "$0: getting gnulib files..." -+ -+ trap cleanup_gnulib 1 2 13 15 -+ -+ shallow= -+ git clone -h 2>&1 | grep -- --depth > /dev/null && shallow='--depth 2' -+ git clone $shallow git://git.sv.gnu.org/gnulib "$gnulib_path" || -+ cleanup_gnulib -+ -+ trap - 1 2 13 15 -+ fi -+ GNULIB_SRCDIR=$gnulib_path -+ ;; -+*) -+ # Use GNULIB_SRCDIR directly or as a reference. -+ if $use_git && test -d "$GNULIB_SRCDIR"/.git && \ -+ git_modules_config submodule.gnulib.url >/dev/null; then -+ echo "$0: getting gnulib files..." -+ if git submodule -h|grep -- --reference > /dev/null; then -+ # Prefer the one-liner available in git 1.6.4 or newer. -+ git submodule update --init --reference "$GNULIB_SRCDIR" \ -+ "$gnulib_path" || exit $? -+ else -+ # This fallback allows at least git 1.5.5. -+ if test -f "$gnulib_path"/gnulib-tool; then -+ # Since file already exists, assume submodule init already complete. -+ git submodule update || exit $? -+ else -+ # Older git can't clone into an empty directory. -+ rmdir "$gnulib_path" 2>/dev/null -+ git clone --reference "$GNULIB_SRCDIR" \ -+ "$(git_modules_config submodule.gnulib.url)" "$gnulib_path" \ -+ && git submodule init && git submodule update \ -+ || exit $? -+ fi -+ fi -+ GNULIB_SRCDIR=$gnulib_path -+ fi -+ ;; -+esac -+ -+# $GNULIB_SRCDIR now points to the version of gnulib to use, and -+# we no longer need to use git or $gnulib_path below here. -+ -+if $bootstrap_sync; then -+ cmp -s "$0" "$GNULIB_SRCDIR/build-aux/bootstrap" || { -+ echo "$0: updating bootstrap and restarting..." -+ case $(sh -c 'echo "$1"' -- a) in -+ a) ignored=--;; -+ *) ignored=ignored;; -+ esac -+ exec sh -c \ -+ 'cp "$1" "$2" && shift && exec "${CONFIG_SHELL-/bin/sh}" "$@"' \ -+ $ignored "$GNULIB_SRCDIR/build-aux/bootstrap" \ -+ "$0" "$@" --no-bootstrap-sync -+ } -+fi -+ -+gnulib_tool=$GNULIB_SRCDIR/gnulib-tool -+<$gnulib_tool || exit $? -+ -+# Get translations. -+ -+download_po_files() { -+ subdir=$1 -+ domain=$2 -+ echo "$me: getting translations into $subdir for $domain..." -+ cmd=$(printf "$po_download_command_format" "$domain" "$subdir") -+ eval "$cmd" && return -+ # Fallback to HTTP. -+ cmd=$(printf "$po_download_command_format2" "$subdir" "$domain") -+ eval "$cmd" -+} -+ -+# Mirror .po files to $po_dir/.reference and copy only the new -+# or modified ones into $po_dir. Also update $po_dir/LINGUAS. -+# Note po files that exist locally only are left in $po_dir but will -+# not be included in LINGUAS and hence will not be distributed. -+update_po_files() { -+ # Directory containing primary .po files. -+ # Overwrite them only when we're sure a .po file is new. -+ po_dir=$1 -+ domain=$2 -+ -+ # Mirror *.po files into this dir. -+ # Usually contains *.s1 checksum files. -+ ref_po_dir="$po_dir/.reference" -+ -+ test -d $ref_po_dir || mkdir $ref_po_dir || return -+ download_po_files $ref_po_dir $domain \ -+ && ls "$ref_po_dir"/*.po 2>/dev/null | -+ sed 's|.*/||; s|\.po$||' > "$po_dir/LINGUAS" || return -+ -+ langs=$(cd $ref_po_dir && echo *.po | sed 's/\.po//g') -+ test "$langs" = '*' && langs=x -+ for po in $langs; do -+ case $po in x) continue;; esac -+ new_po="$ref_po_dir/$po.po" -+ cksum_file="$ref_po_dir/$po.s1" -+ if ! test -f "$cksum_file" || -+ ! test -f "$po_dir/$po.po" || -+ ! $SHA1SUM -c "$cksum_file" < "$new_po" > /dev/null 2>&1; then -+ echo "$me: updated $po_dir/$po.po..." -+ cp "$new_po" "$po_dir/$po.po" \ -+ && $SHA1SUM < "$new_po" > "$cksum_file" || return -+ fi -+ done -+} -+ -+case $SKIP_PO in -+'') -+ if test -d po; then -+ update_po_files po $package || exit -+ fi -+ -+ if test -d runtime-po; then -+ update_po_files runtime-po $package-runtime || exit -+ fi;; -+esac -+ -+symlink_to_dir() -+{ -+ src=$1/$2 -+ dst=${3-$2} -+ -+ test -f "$src" && { -+ -+ # If the destination directory doesn't exist, create it. -+ # This is required at least for "lib/uniwidth/cjk.h". -+ dst_dir=$(dirname "$dst") -+ if ! test -d "$dst_dir"; then -+ mkdir -p "$dst_dir" -+ -+ # If we've just created a directory like lib/uniwidth, -+ # tell version control system(s) it's ignorable. -+ # FIXME: for now, this does only one level -+ parent=$(dirname "$dst_dir") -+ for dot_ig in x $vc_ignore; do -+ test $dot_ig = x && continue -+ ig=$parent/$dot_ig -+ insert_vc_ignore $ig "${dst_dir##*/}" -+ done -+ fi -+ -+ if $copy; then -+ { -+ test ! -h "$dst" || { -+ echo "$me: rm -f $dst" && -+ rm -f "$dst" -+ } -+ } && -+ test -f "$dst" && -+ cmp -s "$src" "$dst" || { -+ echo "$me: cp -fp $src $dst" && -+ cp -fp "$src" "$dst" -+ } -+ else -+ # Leave any existing symlink alone, if it already points to the source, -+ # so that broken build tools that care about symlink times -+ # aren't confused into doing unnecessary builds. Conversely, if the -+ # existing symlink's time stamp is older than the source, make it afresh, -+ # so that broken tools aren't confused into skipping needed builds. See -+ # . -+ test -h "$dst" && -+ src_ls=$(ls -diL "$src" 2>/dev/null) && set $src_ls && src_i=$1 && -+ dst_ls=$(ls -diL "$dst" 2>/dev/null) && set $dst_ls && dst_i=$1 && -+ test "$src_i" = "$dst_i" && -+ both_ls=$(ls -dt "$src" "$dst") && -+ test "X$both_ls" = "X$dst$nl$src" || { -+ dot_dots= -+ case $src in -+ /*) ;; -+ *) -+ case /$dst/ in -+ *//* | */../* | */./* | /*/*/*/*/*/) -+ die "invalid symlink calculation: $src -> $dst";; -+ /*/*/*/*/) dot_dots=../../../;; -+ /*/*/*/) dot_dots=../../;; -+ /*/*/) dot_dots=../;; -+ esac;; -+ esac -+ -+ echo "$me: ln -fs $dot_dots$src $dst" && -+ ln -fs "$dot_dots$src" "$dst" -+ } -+ fi -+ } -+} -+ -+version_controlled_file() { -+ parent=$1 -+ file=$2 -+ if test -d .git; then -+ git rm -n "$file" > /dev/null 2>&1 -+ elif test -d .svn; then -+ svn log -r HEAD "$file" > /dev/null 2>&1 -+ elif test -d CVS; then -+ grep -F "/${file##*/}/" "$parent/CVS/Entries" 2>/dev/null | -+ grep '^/[^/]*/[0-9]' > /dev/null -+ else -+ warn_ "no version control for $file?" -+ false -+ fi -+} -+ -+# NOTE: we have to be careful to run both autopoint and libtoolize -+# before gnulib-tool, since gnulib-tool is likely to provide newer -+# versions of files "installed" by these two programs. -+# Then, *after* gnulib-tool (see below), we have to be careful to -+# run autoreconf in such a way that it does not run either of these -+# two just-pre-run programs. -+ -+# Import from gettext. -+with_gettext=yes -+grep '^[ ]*AM_GNU_GETTEXT_VERSION(' configure.ac >/dev/null || \ -+ with_gettext=no -+ -+if test $with_gettext = yes || test $use_libtool = 1; then -+ -+ tempbase=.bootstrap$$ -+ trap "rm -f $tempbase.0 $tempbase.1" 1 2 13 15 -+ -+ > $tempbase.0 > $tempbase.1 && -+ find . ! -type d -print | sort > $tempbase.0 || exit -+ -+ if test $with_gettext = yes; then -+ # Released autopoint has the tendency to install macros that have been -+ # obsoleted in current gnulib, so run this before gnulib-tool. -+ echo "$0: $AUTOPOINT --force" -+ $AUTOPOINT --force || exit -+ fi -+ -+ # Autoreconf runs aclocal before libtoolize, which causes spurious -+ # warnings if the initial aclocal is confused by the libtoolized -+ # (or worse out-of-date) macro directory. -+ # libtoolize 1.9b added the --install option; but we support back -+ # to libtoolize 1.5.22, where the install action was default. -+ if test $use_libtool = 1; then -+ install= -+ case $($LIBTOOLIZE --help) in -+ *--install*) install=--install ;; -+ esac -+ echo "running: $LIBTOOLIZE $install --copy" -+ $LIBTOOLIZE $install --copy -+ fi -+ -+ find . ! -type d -print | sort >$tempbase.1 -+ old_IFS=$IFS -+ IFS=$nl -+ for file in $(comm -13 $tempbase.0 $tempbase.1); do -+ IFS=$old_IFS -+ parent=${file%/*} -+ version_controlled_file "$parent" "$file" || { -+ for dot_ig in x $vc_ignore; do -+ test $dot_ig = x && continue -+ ig=$parent/$dot_ig -+ insert_vc_ignore "$ig" "${file##*/}" -+ done -+ } -+ done -+ IFS=$old_IFS -+ -+ rm -f $tempbase.0 $tempbase.1 -+ trap - 1 2 13 15 -+fi -+ -+# Import from gnulib. -+ -+gnulib_tool_options="\ -+ --import\ -+ --no-changelog\ -+ --aux-dir $build_aux\ -+ --doc-base $doc_base\ -+ --lib $gnulib_name\ -+ --m4-base $m4_base/\ -+ --source-base $source_base/\ -+ --tests-base $tests_base\ -+ --local-dir $local_gl_dir\ -+ $gnulib_tool_option_extras\ -+" -+if test $use_libtool = 1; then -+ case "$gnulib_tool_options " in -+ *' --libtool '*) ;; -+ *) gnulib_tool_options="$gnulib_tool_options --libtool" ;; -+ esac -+fi -+echo "$0: $gnulib_tool $gnulib_tool_options --import ..." -+$gnulib_tool $gnulib_tool_options --import $gnulib_modules && -+ -+for file in $gnulib_files; do -+ symlink_to_dir "$GNULIB_SRCDIR" $file \ -+ || die "failed to symlink $file" -+done -+ -+bootstrap_post_import_hook \ -+ || die "bootstrap_post_import_hook failed" -+ -+# Remove any dangling symlink matching "*.m4" or "*.[ch]" in some -+# gnulib-populated directories. Such .m4 files would cause aclocal to fail. -+# The following requires GNU find 4.2.3 or newer. Considering the usual -+# portability constraints of this script, that may seem a very demanding -+# requirement, but it should be ok. Ignore any failure, which is fine, -+# since this is only a convenience to help developers avoid the relatively -+# unusual case in which a symlinked-to .m4 file is git-removed from gnulib -+# between successive runs of this script. -+find "$m4_base" "$source_base" \ -+ -depth \( -name '*.m4' -o -name '*.[ch]' \) \ -+ -type l -xtype l -delete > /dev/null 2>&1 -+ -+# Invoke autoreconf with --force --install to ensure upgrades of tools -+# such as ylwrap. -+AUTORECONFFLAGS="--verbose --install --force -I $m4_base $ACLOCAL_FLAGS" -+ -+# Some systems (RHEL 5) are using ancient autotools, for which the -+# --no-recursive option had not been invented. Detect that lack and -+# omit the option when it's not supported. FIXME in 2017: remove this -+# hack when RHEL 5 autotools are updated, or when they become irrelevant. -+case $($AUTORECONF --help) in -+ *--no-recursive*) AUTORECONFFLAGS="$AUTORECONFFLAGS --no-recursive";; -+esac -+ -+# Tell autoreconf not to invoke autopoint or libtoolize; they were run above. -+echo "running: AUTOPOINT=true LIBTOOLIZE=true $AUTORECONF $AUTORECONFFLAGS" -+AUTOPOINT=true LIBTOOLIZE=true $AUTORECONF $AUTORECONFFLAGS \ -+ || die "autoreconf failed" -+ -+# Get some extra files from gnulib, overriding existing files. -+for file in $gnulib_extra_files; do -+ case $file in -+ */INSTALL) dst=INSTALL;; -+ build-aux/*) dst=$build_aux/${file#build-aux/};; -+ *) dst=$file;; -+ esac -+ symlink_to_dir "$GNULIB_SRCDIR" $file $dst \ -+ || die "failed to symlink $file" -+done -+ -+if test $with_gettext = yes; then -+ # Create gettext configuration. -+ echo "$0: Creating po/Makevars from po/Makevars.template ..." -+ rm -f po/Makevars -+ sed ' -+ /^EXTRA_LOCALE_CATEGORIES *=/s/=.*/= '"$EXTRA_LOCALE_CATEGORIES"'/ -+ /^COPYRIGHT_HOLDER *=/s/=.*/= '"$COPYRIGHT_HOLDER"'/ -+ /^MSGID_BUGS_ADDRESS *=/s|=.*|= '"$MSGID_BUGS_ADDRESS"'| -+ /^XGETTEXT_OPTIONS *=/{ -+ s/$/ \\/ -+ a\ -+ '"$XGETTEXT_OPTIONS"' $${end_of_xgettext_options+} -+ } -+ ' po/Makevars.template >po/Makevars \ -+ || die 'cannot generate po/Makevars' -+ -+ # If the 'gettext' module is in use, grab the latest Makefile.in.in. -+ # If only the 'gettext-h' module is in use, assume autopoint already -+ # put the correct version of this file into place. -+ case $gnulib_modules in -+ *gettext-h*) ;; -+ *gettext*) -+ cp $GNULIB_SRCDIR/build-aux/po/Makefile.in.in po/Makefile.in.in \ -+ || die "cannot create po/Makefile.in.in" -+ ;; -+ esac -+ -+ if test -d runtime-po; then -+ # Similarly for runtime-po/Makevars, but not quite the same. -+ rm -f runtime-po/Makevars -+ sed ' -+ /^DOMAIN *=.*/s/=.*/= '"$package"'-runtime/ -+ /^subdir *=.*/s/=.*/= runtime-po/ -+ /^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'"$package"'@gnu.org/ -+ /^XGETTEXT_OPTIONS *=/{ -+ s/$/ \\/ -+ a\ -+ '"$XGETTEXT_OPTIONS_RUNTIME"' $${end_of_xgettext_options+} -+ } -+ ' po/Makevars.template >runtime-po/Makevars \ -+ || die 'cannot generate runtime-po/Makevars' -+ -+ # Copy identical files from po to runtime-po. -+ (cd po && cp -p Makefile.in.in *-quot *.header *.sed *.sin ../runtime-po) -+ fi -+fi -+ -+bootstrap_epilogue -+ -+echo "$0: done. Now you can run './configure'." -+ -+# Local variables: -+# eval: (add-hook 'write-file-hooks 'time-stamp) -+# time-stamp-start: "scriptversion=" -+# time-stamp-format: "%:y-%02m-%02d.%02H" -+# time-stamp-time-zone: "UTC" -+# time-stamp-end: "; # UTC" -+# End: -diff -Naur inetutils-1.9.2-orig/bootstrap.conf inetutils-1.9.2/bootstrap.conf ---- inetutils-1.9.2-orig/bootstrap.conf 1970-01-01 03:00:00.000000000 +0300 -+++ inetutils-1.9.2/bootstrap.conf 2014-12-12 11:55:10.248000000 +0300 -@@ -0,0 +1,112 @@ -+# bootstrap.conf - Bootstrap configuration. -+# Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software -+# Foundation, Inc. -+# -+# This file is part of GNU Inetutils. -+# -+# GNU Inetutils 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 3 of the License, or (at -+# your option) any later version. -+# -+# GNU Inetutils 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, see `http://www.gnu.org/licenses/'. -+ -+# Build prerequisites. -+buildreq="\ -+autoconf 2.59 -+automake 1.11.1 -+bison 2.3 -+m4 - -+makeinfo - -+help2man - -+" -+ -+# Sync. bootstrap from checked out gnulib sources. -+bootstrap_sync=true -+ -+ACLOCAL_FLAGS="-I am" -+ -+# gnulib library name -+gnulib_name=libgnu -+ -+# gnulib modules used by this package. -+gnulib_modules=" -+alloca -+alloca-opt -+argp -+argp-version-etc -+autobuild -+dirfd -+dirname-lgpl -+error -+exitfail -+extensions -+fdl-1.3 -+filemode -+forkpty -+gendocs -+getaddrinfo -+getcwd -+getline -+getopt-gnu -+getpass -+gettext -+gettext-h -+getusershell -+git-version-gen -+glob -+gnupload -+inttostr -+ioctl -+maintainer-makefile -+malloc-gnu -+mempcpy -+mgetgroups -+minmax -+mkstemp -+obstack -+poll -+progname -+read-file -+readutmp -+realloc-gnu -+regex -+setenv -+sethostname -+signal -+size_max -+snippet/unused-parameter -+snprintf -+stdbool -+stdint -+strchrnul -+strerror -+strndup -+strnlen -+sysexits -+termios -+unistd-safer -+update-copyright -+vasnprintf -+version-etc-fsf -+vsnprintf -+xalloc -+xalloc-die -+xgetcwd -+xgetdomainname -+xgethostname -+xsize -+xvasprintf -+" -+ -+# Read local configuration file -+if [ -r .bootstrap ]; then -+ echo "$0: Reading configuration file .bootstrap" -+ eval set -- "`sed 's/#.*$//;/^$/d' .bootstrap | tr '\n' ' '` $*" -+fi -diff -Naur inetutils-1.9.2-orig/configure.ac inetutils-1.9.2/configure.ac ---- inetutils-1.9.2-orig/configure.ac 2013-11-11 13:14:49.000000000 +0300 -+++ inetutils-1.9.2/configure.ac 2014-12-12 11:55:10.248000000 +0300 -@@ -18,7 +18,7 @@ - # You should have received a copy of the GNU General Public License - # along with this program. If not, see `http://www.gnu.org/licenses/'. - --AC_PREREQ(2.59) -+AC_PREREQ(2.69) - - AC_INIT([GNU inetutils], - m4_esyscmd([build-aux/git-version-gen .tarball-version 's/inetutils-/v/;s/_/./g']), -@@ -29,7 +29,7 @@ - AC_CONFIG_HEADERS([config.h:config.hin]) - AC_CANONICAL_HOST - --AM_INIT_AUTOMAKE([1.11.1 dist-xz -Wall -Werror]) -+AM_INIT_AUTOMAKE([1.14 dist-xz -Wall -Werror]) - - # For now, we always use libexecdir; later we may want to vary where - # the daemons go. -@@ -585,7 +585,7 @@ - AC_HEADER_TIME - AC_HEADER_DIRENT - --AC_CHECK_HEADERS([arpa/nameser.h errno.h fcntl.h features.h \ -+AC_CHECK_HEADERS([stdio.h arpa/nameser.h errno.h fcntl.h features.h \ - glob.h memory.h netinet/ether.h netinet/in_systm.h \ - netinet/ip.h netinet/ip_icmp.h netinet/ip_var.h \ - security/pam_appl.h shadow.h \ -@@ -596,8 +596,11 @@ - sys/proc.h sys/select.h sys/time.h sys/wait.h \ - sys/resource.h \ - stropts.h tcpd.h utmp.h utmpx.h unistd.h \ -- vis.h], [], [], [ -+ vis.h osockaddr.h], [], [], [ - #include -+#ifdef HAVE_STDIO_H -+# include -+#endif - #ifdef HAVE_NETINET_IN_SYSTM_H - # include - #endif -@@ -644,6 +647,15 @@ - #include ])]) - - ### Checks for structures. -+AC_CHECK_TYPE(struct osockaddr, -+ [AC_DEFINE([HAVE_STRUCT_OSOCKADDR], 1, -+ [Define to one if you have struct osockaddr.])], [], -+ [IU_FLUSHLEFT([#include -+ #include -+ #ifdef HAVE_OSOCKADDR_H -+ # include -+ #endif ])]) -+ - IU_CHECK_MEMBERS([struct sockaddr_in.sin_len], , , - [ #include - #include ]) -@@ -986,6 +998,12 @@ - AC_DEFINE([HAVE_STREAMSPTY], 1, - [Define to 1 for a system using streams for ptys]) - ;; -+*cygwin*) -+ CFLAGS="${CFLAGS} -DNCURSES_STATIC" -+ LDFLAGS="${LDFLAGS} -Wl,-static" -+ LIBS="/usr/lib/textmode.o ${LIBS}" -+ AC_DEFINE(UTMPX, 1, [FIXME]) -+ ;; - *irix* | *hpux* ) - # Known and needed work-arounds? - ;; -diff -Naur inetutils-1.9.2-orig/talk/Makefile.am inetutils-1.9.2/talk/Makefile.am ---- inetutils-1.9.2-orig/talk/Makefile.am 2013-09-26 12:36:38.000000000 +0300 -+++ inetutils-1.9.2/talk/Makefile.am 2014-12-12 11:55:10.248000000 +0300 -@@ -19,6 +19,7 @@ - # along with this program. If not, see `http://www.gnu.org/licenses/'. - - AM_CPPFLAGS = \ -+ -I$(top_srcdir)/headers \ - $(iu_INCLUDES) \ - $(NCURSES_INCLUDE) $(INCIDN) - -diff -Naur inetutils-1.9.2-orig/talkd/Makefile.am inetutils-1.9.2/talkd/Makefile.am ---- inetutils-1.9.2-orig/talkd/Makefile.am 2013-09-26 12:36:38.000000000 +0300 -+++ inetutils-1.9.2/talkd/Makefile.am 2014-12-12 11:55:10.263600000 +0300 -@@ -21,6 +21,7 @@ - @PATHDEFS_MAKE@ - - AM_CPPFLAGS = \ -+ -I$(top_srcdir)/headers \ - $(iu_INCLUDES) \ - $(PATHDEF_DEV) \ - $(PATHDEF_TTY_PFX) $(PATHDEF_UTMP) $(PATHDEF_UTMPX) diff --git a/inetutils/07-other-buildsys-updates.patch b/inetutils/07-other-buildsys-updates.patch deleted file mode 100644 index 726d7d53..00000000 --- a/inetutils/07-other-buildsys-updates.patch +++ /dev/null @@ -1,67 +0,0 @@ -diff -Naur inetutils-1.9.2-orig/configure.ac inetutils-1.9.2/configure.ac ---- inetutils-1.9.2-orig/configure.ac 2014-12-12 11:55:10.606800000 +0300 -+++ inetutils-1.9.2/configure.ac 2014-12-12 11:55:10.653600000 +0300 -@@ -560,7 +560,13 @@ - AC_MSG_CHECKING(hosts_ctl in -lwrap); - save_LIBS=$LIBS - LIBS="$save_LIBS -lwrap" -- AC_TRY_LINK([int allow_severity = 1; int deny_severity = 1;], -+ AC_TRY_LINK([#ifdef __CYGWIN__ -+ extern int allow_severity = 1; -+ extern int deny_severity = 1; -+ #else -+ int allow_severity = 1; -+ int deny_severity = 1; -+ #endif], - hosts_ctl(), eval "ac_cv_lib_wrap_hosts_ctl=yes", - eval "ac_cv_lib_wrap_hosts_ctl=no") - LIBS=$save_LIBS -@@ -596,7 +602,7 @@ - sys/proc.h sys/select.h sys/time.h sys/wait.h \ - sys/resource.h \ - stropts.h tcpd.h utmp.h utmpx.h unistd.h \ -- vis.h osockaddr.h], [], [], [ -+ vis.h osockaddr.h crypt.h], [], [], [ - #include - #ifdef HAVE_STDIO_H - # include -@@ -860,7 +866,11 @@ - - AC_DECL_SYS_SIGLIST - --AC_CHECK_DECLS(crypt, , , [#include ]) -+AC_CHECK_DECLS(crypt, , , -+ [IU_FLUSHLEFT([#include -+ #ifdef HAVE_CRYPT_H -+ # include -+ #endif])]) - - # EWOULDBLOCK is more or less the BSD version of posix EAGAIN. - IU_CHECK_MACRO(EWOULDBLOCK, [#include ], , , -@@ -887,6 +897,8 @@ - iu_syslog_includes), , iu_syslog_includes),) - undefine([iu_syslog_includes]) - -+IU_CHECK_MACRO(TIOCNOTTY, [#include ],,,) -+ - # Some systems don't declare common functions (especially if they - # return int), at least in the expected header file. Check. - AC_CHECK_DECLS([fclose, pclose], , , [#include ]) -@@ -999,8 +1011,6 @@ - [Define to 1 for a system using streams for ptys]) - ;; - *cygwin*) -- CFLAGS="${CFLAGS} -DNCURSES_STATIC" -- LDFLAGS="${LDFLAGS} -Wl,-static" - LIBS="/usr/lib/textmode.o ${LIBS}" - AC_DEFINE(UTMPX, 1, [FIXME]) - ;; -diff -Naur inetutils-1.9.2-orig/man/Makefile.am inetutils-1.9.2/man/Makefile.am ---- inetutils-1.9.2-orig/man/Makefile.am 2013-09-26 12:36:38.000000000 +0300 -+++ inetutils-1.9.2/man/Makefile.am 2014-12-12 11:55:10.653600000 +0300 -@@ -216,4 +216,4 @@ - --include=$(srcdir)/$(TOOL).h2m \ - --output=$(TOOL).$(SECTION) \ - --section $(SECTION) \ -- $(mapped_name) -+ $(mapped_name)$(EXEEXT) diff --git a/inetutils/08-libinetutils.patch b/inetutils/08-libinetutils.patch deleted file mode 100644 index c8c7b7bd..00000000 --- a/inetutils/08-libinetutils.patch +++ /dev/null @@ -1,192 +0,0 @@ -diff -Naur inetutils-1.9.2-orig/libinetutils/daemon.c inetutils-1.9.2/libinetutils/daemon.c ---- inetutils-1.9.2-orig/libinetutils/daemon.c 2013-12-03 17:57:44.000000000 +0300 -+++ inetutils-1.9.2/libinetutils/daemon.c 2014-12-12 11:55:11.043600000 +0300 -@@ -51,6 +51,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -103,13 +104,87 @@ - - #define MAXFD 64 - --void -+/* copy signal stuff from inetd.c -- POSIX says that the various -+ signal interfaces should not be mixed in the same program. -+ Because inetd uses 'most recent signal interface' it can find, -+ we should too. -+*/ -+ -+#define SIGBLOCK (sigmask(SIGCHLD)|sigmask(SIGHUP)|sigmask(SIGALRM)) -+#if defined(HAVE_SIGACTION) -+# define SIGSTATUS sigset_t -+# define sigstatus_empty(s) sigemptyset(&s) -+#else -+# define SIGSTATUS long -+# define sigstatus_empty(s) s = 0 -+#endif -+ -+static void -+signal_set_handler (int signo, RETSIGTYPE (*handler) ()) -+{ -+#if defined(HAVE_SIGACTION) -+ struct sigaction sa; -+ memset ((char *)&sa, 0, sizeof(sa)); -+ sigemptyset (&sa.sa_mask); -+ sigaddset (&sa.sa_mask, signo); -+#ifdef SA_RESTART -+ sa.sa_flags = SA_RESTART; -+#endif -+ sa.sa_handler = handler; -+ sigaction (signo, &sa, NULL); -+#elif defined(HAVE_SIGVEC) -+ struct sigvec sv; -+ memset (&sv, 0, sizeof(sv)); -+ sv.sv_mask = SIGBLOCK; -+ sv.sv_handler = handler; -+ sigvec (signo, &sv, NULL); -+#else /* !HAVE_SIGVEC */ -+ signal (signo, handler); -+#endif /* HAVE_SIGACTION */ -+} -+ -+static void -+signal_block (SIGSTATUS *old_status) -+{ -+#ifdef HAVE_SIGACTION -+ sigset_t sigs; -+ -+ sigemptyset (&sigs); -+ sigaddset (&sigs, SIGCHLD); -+ sigaddset (&sigs, SIGHUP); -+ sigaddset (&sigs, SIGALRM); -+ sigprocmask (SIG_BLOCK, &sigs, old_status); -+#else -+ long omask = sigblock (SIGBLOCK); -+ if (old_status) -+ *old_status = omask; -+#endif -+} -+ -+static void -+signal_unblock (SIGSTATUS *status) -+{ -+#ifdef HAVE_SIGACTION -+ if (status) -+ sigprocmask (SIG_SETMASK, status, 0); -+ else -+ { -+ sigset_t empty; -+ sigemptyset (&empty); -+ sigprocmask (SIG_SETMASK, &empty, 0); -+ } -+#else -+ sigsetmask (status ? *status : 0); -+#endif -+} -+ -+RETSIGTYPE - waitdaemon_timeout (int signo _GL_UNUSED_PARAMETER) - { - int left; - - left = alarm (0); -- signal (SIGALRM, SIG_DFL); -+ signal_set_handler (SIGALRM, SIG_DFL); - if (left == 0) - error (EXIT_FAILURE, 0, "timed out waiting for child"); - } -@@ -138,9 +213,29 @@ - default: /* In the parent. */ - if (maxwait > 0) - { -- signal (SIGALRM, waitdaemon_timeout); -+ int status; -+ pid_t wpid; -+ -+ signal_unblock(NULL); -+ signal_set_handler (SIGALRM, waitdaemon_timeout); - alarm (maxwait); -- pause (); -+ do -+ { -+ wpid = waitpid(childpid, &status, WUNTRACED -+#ifdef WCONTINUED /* Not all implementations support this */ -+ | WCONTINUED -+#endif -+ ); -+ if (wpid == -1) -+ { -+ /* should't happen for timeouts, because the -+ SIGALRM handler will error (and exit). However, -+ we may recieve some OTHER signal... -+ */ -+ error (1, 0, "interrupted while waiting for child"); -+ } -+ } -+ while (!WIFEXITED(status) && !WIFSIGNALED(status)); - } - _exit (EXIT_SUCCESS); - } -@@ -152,7 +247,7 @@ - then SIGHUP is sent to all process belonging to the same session, - i.e., also to the second child. - */ -- signal (SIGHUP, SIG_IGN); -+ signal_set_handler (SIGHUP, SIG_IGN); - - switch (fork ()) - { -@@ -202,5 +297,9 @@ - int - daemon (int nochdir, int noclose) - { -+#ifdef __CYGWIN__ -+ return (waitdaemon (nochdir, noclose, 5) == -1) ? -1 : 0; -+#else - return (waitdaemon (nochdir, noclose, 0) == -1) ? -1 : 0; -+#endif - } -diff -Naur inetutils-1.9.2-orig/libinetutils/logwtmp.c inetutils-1.9.2/libinetutils/logwtmp.c ---- inetutils-1.9.2-orig/libinetutils/logwtmp.c 2013-09-26 12:36:38.000000000 +0300 -+++ inetutils-1.9.2/libinetutils/logwtmp.c 2014-12-12 11:55:11.043600000 +0300 -@@ -50,6 +50,10 @@ - extern int errno; - #endif - -+#ifndef O_BINARY -+#define O_BINARY 0 -+#endif -+ - #ifdef HAVE_UTMPX_H - static void - _logwtmp (struct utmpx *ut) -@@ -62,9 +66,9 @@ - static int fd = -1; - - if (fd < 0) -- fd = open (OUR_WTMP, O_WRONLY | O_APPEND, 0); -+ fd = open (OUR_WTMP, O_WRONLY | O_APPEND | O_BINARY, 0); - #else -- int fd = open (OUR_WTMP, O_WRONLY | O_APPEND, 0); -+ int fd = open (OUR_WTMP, O_WRONLY | O_APPEND | O_BINARY, 0); - #endif - - if (fd >= 0) -diff -Naur inetutils-1.9.2-orig/libinetutils/setsig.c inetutils-1.9.2/libinetutils/setsig.c ---- inetutils-1.9.2-orig/libinetutils/setsig.c 2013-09-26 12:36:38.000000000 +0300 -+++ inetutils-1.9.2/libinetutils/setsig.c 2014-12-12 11:55:11.059200000 +0300 -@@ -26,6 +26,10 @@ - - #include - -+#ifdef __CYGWIN__ -+typedef _sig_func_ptr sig_t; -+#endif -+ - /* This is exactly like the traditional signal function, but turns on the - SA_RESTART bit where possible. */ - sighandler_t diff --git a/inetutils/09-inetd.patch b/inetutils/09-inetd.patch deleted file mode 100644 index 9adf3db7..00000000 --- a/inetutils/09-inetd.patch +++ /dev/null @@ -1,272 +0,0 @@ -diff -Naur inetutils-1.9.2-orig/src/inetd.c inetutils-1.9.2/src/inetd.c ---- inetutils-1.9.2-orig/src/inetd.c 2013-12-23 14:57:54.000000000 +0300 -+++ inetutils-1.9.2/src/inetd.c 2014-12-12 11:55:11.402400000 +0300 -@@ -138,6 +138,13 @@ - #include "version-etc.h" - #include "unused-parameter.h" - -+#ifdef __CYGWIN__ -+#include -+#include -+#include -+#endif /* __CYGWIN__ */ -+ -+ - #ifndef EAI_ADDRFAMILY - # define EAI_ADDRFAMILY 1 - #endif -@@ -151,7 +158,14 @@ - #endif - #define SIGBLOCK (sigmask(SIGCHLD)|sigmask(SIGHUP)|sigmask(SIGALRM)) - -+enum { -+ NO_DAEMON = 0, -+ UNIX_DAEMON -+}; -+ - bool debug = false; -+static int daemonize = UNIX_DAEMON; -+ - int nsock, maxsock; - fd_set allsock; - int options; -@@ -196,6 +210,13 @@ - {"resolve", OPT_RESOLVE, NULL, 0, - "resolve IP addresses when setting environment variables " - "(see --environment)", GRP+1}, -+#ifdef __CYGWIN__ -+ {0,0,0,0,"Cygwin-specific options:",GRP+2}, -+ {"no-daemonize", 'D', NULL, 0, -+ "Do not run as a daemon", GRP+2}, -+ {"traditional-daemon", 'T', NULL, 0, -+ "This option is present for backwards compatibility.", GRP+2}, -+#endif /* __CYGWIN__ */ - #undef GRP - {NULL, 0, NULL, 0, NULL, 0} - }; -@@ -237,6 +258,16 @@ - resolve_option = true; - break; - -+#ifdef __CYGWIN__ -+ case 'D': /* don't become a daemon */ -+ daemonize = NO_DAEMON; -+ break; -+ -+ case 'T': /* act like a normal unix daemon */ -+ daemonize = UNIX_DAEMON; -+ break; -+#endif /* __CYGWIN__ */ -+ - default: - return ARGP_ERR_UNKNOWN; - } -@@ -412,6 +443,44 @@ - #endif - } - -+#ifdef __CYGWIN__ -+void -+hide_console () -+{ -+ HMODULE lib; -+ HWND WINAPI (*GetConsoleWindow) (void) = NULL; -+ HWND console = NULL; -+ -+ AllocConsole (); -+ if (lib = LoadLibrary ("kernel32.dll")) -+ GetConsoleWindow = (HWND WINAPI (*) (void)) -+ GetProcAddress (lib, "GetConsoleWindow"); -+ -+ if (GetConsoleWindow) -+ /* If GetConsoleWindow exists (W2K and newer), use it. */ -+ console = GetConsoleWindow (); -+ if (!console) -+ { -+ /* Get console window handle as described in KB article Q124103 */ -+ char title[32]; -+ snprintf (title, 32, "inetd.%d", getpid ()); -+ SetConsoleTitle (title); -+ Sleep (40); -+ console = FindWindow (NULL, title); -+ if (console) -+ { -+ char ctitle[256]; -+ if (!GetWindowText (console, ctitle, 256) || strcmp (title, ctitle)) -+ console = NULL; -+ } -+ } -+ if (console) -+ ShowWindow (console, SW_HIDE); -+} -+#endif /* __CYGWIN__ */ -+ -+ -+ - void - run_service (int ctrl, struct servtab *sep) - { -@@ -431,6 +500,10 @@ - close (ctrl); - dup2 (0, 1); - dup2 (0, 2); -+#ifdef __CYGWIN__ -+ if (strcmp (sep->se_user, "root")) -+ { -+#endif - pwd = getpwnam (sep->se_user); - if (pwd == NULL) - { -@@ -452,14 +525,21 @@ - _exit (EXIT_FAILURE); - } - } -+#ifdef __CYGWIN__ -+ } -+ else -+ { -+ pwd = getpwuid (getuid ()); -+ } -+#endif - if (pwd->pw_uid) - { - if (grp && grp->gr_gid) - { - if (setgid (grp->gr_gid) < 0) - { -- syslog (LOG_ERR, "%s: can't set gid %d: %m", -- sep->se_service, grp->gr_gid); -+ syslog (LOG_ERR, "%s: can't set gid %d uid(%d): %m", -+ sep->se_service, pwd->pw_gid, pwd->pw_uid); - _exit (EXIT_FAILURE); - } - } -@@ -1278,6 +1358,10 @@ - } - while ((sep = getconfigent (fconfig, file, &line))) - { -+#ifdef __CYGWIN__ -+ if (strcmp (sep->se_user, "root")) -+ { -+#endif - pwd = getpwnam (sep->se_user); - if (pwd == NULL) - { -@@ -1285,6 +1369,9 @@ - sep->se_service, sep->se_proto, sep->se_user); - continue; - } -+#ifdef __CYGWIN__ -+ } -+#endif - if (sep->se_group && *sep->se_group) - { - grp = getgrnam (sep->se_group); -@@ -1497,10 +1584,48 @@ - } - else - snprintf (buf, sizeof buf, "-%s", a); -- strncpy (cp, buf, LastArg - cp); -- cp += strlen (cp); -- while (cp < LastArg) -- *cp++ = ' '; -+ -+ /* the non-portable code in the #else block relies on -+ the system allocating all of the strings in argv[] -+ contiguously. On cygwin this is not necessarily so, -+ and to assume otherwise will lead to segfaults. -+ The downside here is we get supposed ps entries for -+ internal services like: -+ '-echo' instead of '-echo [remoteIP]' (okay?) -+ '-char' instead of '-chargen [remoteIP]' (awful) -+ '-disc' instead of '-discard [remoteIP]' (awful) -+ because the original argv[0] might be 'inetd' unless -+ it was specifically invoked with a full path. However, -+ this is mostly moot: -+ (1) cygwin's ps uses its own internal version of the -+ exe name (or GetModuleName) and then calls -+ cygwin_conv_xxx() for display. -+ (2) procps DOES use the modified argv[0] value -+ */ -+ { -+#ifdef __CYGWIN__ -+ char* LastNullChar = cp + strlen(cp); -+ char** scan; -+#else -+ char* LastNullChar = LastArg; -+#endif -+ -+ strncpy (cp, buf, LastNullChar - cp); -+ cp += strlen (cp); -+ while (cp < LastNullChar) -+ *cp++ = ' '; -+ -+#ifdef __CYGWIN__ -+ /* individually blank out the rest of the args */ -+ for (scan = Argv + 1; *scan != NULL; scan++) -+ { -+ char* nullChar = *scan + strlen(*scan); -+ cp = *scan; -+ while (cp < nullChar) -+ *cp++ = ' '; -+ } -+#endif -+ } - } - - /* -@@ -1939,6 +2064,16 @@ - envp++; - LastArg = envp[-1] + strlen (envp[-1]); - -+#ifdef __CYGWIN__ -+ /* on cygwin, open the log early -- because even -+ help and cmdline processing messages go directly -+ to syslog. This is because inetd is often run -+ under the SYSTEM account (which is not quite like -+ the *nix 'root') -+ */ -+ openlog("inetd", LOG_PID | LOG_NOWAIT, LOG_DAEMON); -+#endif -+ - /* Parse command line */ - iu_argp_init ("inetd", program_authors); - argp_parse (&argp, argc, argv, 0, &index, NULL); -@@ -1962,7 +2097,7 @@ - config_files[1] = newstr (PATH_INETDDIR); - } - -- if (!debug) -+ if ((debug == 0) && daemonize) - { - if (daemon (0, 0) < 0) - { -@@ -1971,6 +2106,12 @@ - exit (EXIT_FAILURE); - }; - } -+#ifndef __CYGWIN__ -+ exception_list except_list; -+ cygwin_internal (CW_INIT_EXCEPTIONS, &except_list); -+ hide_console (); -+#endif /* __CYGWIN__ */ -+ - - openlog ("inetd", LOG_PID | LOG_NOWAIT, LOG_DAEMON); - -@@ -1995,6 +2136,7 @@ - signal_set_handler (SIGCHLD, reapchild); - signal_set_handler (SIGPIPE, SIG_IGN); - -+#ifndef __CYGWIN__ - { - /* space for daemons to overwrite environment for ps */ - #define DUMMYSIZE 100 -@@ -2004,6 +2146,7 @@ - dummy[DUMMYSIZE - 1] = '\0'; - setenv ("inetd_dummy", dummy, 1); - } -+#endif /* __CYGWIN__ */ - - for (;;) - { diff --git a/inetutils/11-telnet.patch b/inetutils/11-telnet.patch deleted file mode 100644 index a5706eaa..00000000 --- a/inetutils/11-telnet.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff -Naur inetutils-1.9.2-orig/telnet/telnet.c inetutils-1.9.2/telnet/telnet.c ---- inetutils-1.9.2-orig/telnet/telnet.c 2013-09-26 12:36:38.000000000 +0300 -+++ inetutils-1.9.2/telnet/telnet.c 2014-12-12 11:55:11.761200000 +0300 -@@ -51,7 +51,7 @@ - - #include - --#if defined unix || defined __unix || defined __unix__ -+#if defined unix || defined __unix || defined __unix__ || defined __CYGWIN__ - # include - /* By the way, we need to include curses.h before telnet.h since, - * among other things, telnet.h #defines 'DO', which is a variable -@@ -756,7 +756,8 @@ - * mklist will examine this buffer, so erase it - * to cover corner cases. - */ --char termbuf[2048] = { 0 }; -+#define TERMBUF_SZ 2048 -+char termbuf[TERMBUF_SZ] = { 0 }; - - static int - init_term (char *tname, int *errp) -@@ -2371,7 +2372,7 @@ - netex = !SYNCHing; - - /* If we have seen a signal recently, reset things */ --#if defined TN3270 && (defined unix || defined __unix || defined __unix__) -+#if defined TN3270 && (defined unix || defined __unix || defined __unix__ || defined __CYGWIN__) - if (HaveInput) - { - HaveInput = 0; diff --git a/inetutils/13-ftp.patch b/inetutils/13-ftp.patch deleted file mode 100644 index 99051a7e..00000000 --- a/inetutils/13-ftp.patch +++ /dev/null @@ -1,122 +0,0 @@ -diff -Naur inetutils-1.9.2-orig/ftp/cmds.c inetutils-1.9.2/ftp/cmds.c ---- inetutils-1.9.2-orig/ftp/cmds.c 2013-12-03 17:57:43.000000000 +0300 -+++ inetutils-1.9.2/ftp/cmds.c 2014-12-12 11:55:12.135600000 +0300 -@@ -102,6 +102,10 @@ - # endif - #endif /* !DEFPORT */ - -+#ifdef __CYGWIN__ -+typedef _sig_func_ptr sig_t; -+#endif -+ - /* Returns true if STR is entirely lower case. */ - static int - all_lower (char *str) -@@ -297,6 +301,13 @@ - if (autologin) - login (host); - -+#ifdef __CYGWIN__ -+# ifndef unix -+# define unix -+# endif -+# define NBBY 8 -+#endif /* __CYGWIN__ */ -+ - #if (defined unix || defined __unix || defined __unix__) && NBBY == 8 - /* - * this ifdef is to keep someone form "porting" this to an incompatible -@@ -1852,7 +1863,7 @@ - len += strlen (strcpy (&buf[len], argv[i])); - } - } -- if (command (buf) == PRELIM) -+ if (command ("%s", buf) == PRELIM) - { - while (getreply (0) == PRELIM) - continue; -diff -Naur inetutils-1.9.2-orig/ftp/ftp.c inetutils-1.9.2/ftp/ftp.c ---- inetutils-1.9.2-orig/ftp/ftp.c 2013-12-23 14:57:54.000000000 +0300 -+++ inetutils-1.9.2/ftp/ftp.c 2014-12-12 11:55:12.135600000 +0300 -@@ -90,6 +90,11 @@ - #include "ftp_var.h" - #include "unused-parameter.h" - -+#ifdef __CYGWIN__ -+#include -+typedef _sig_func_ptr sig_t; -+#endif -+ - #if !HAVE_DECL_FCLOSE - /* Some systems don't declare fclose in , so do it ourselves. */ - extern int fclose (FILE *); -@@ -100,7 +105,9 @@ - extern int pclose (FILE *); - #endif - -+#ifndef __CYGWIN__ - extern int h_errno; -+#endif - - int data = -1; - int abrtflag = 0; -@@ -641,7 +648,15 @@ - } - else - { -+#ifdef __CYGWIN__ -+ if (curtype != TYPE_A) { -+ fin = fopen (local, "rb"); -+ } else { -+ fin = fopen (local, "r"); -+ } -+#else - fin = fopen (local, "r"); -+#endif - if (fin == NULL) - { - error (0, errno, "local: %s", local); -@@ -685,6 +700,7 @@ - break; - case TYPE_I: - case TYPE_L: -+ setmode (fileno (fin), O_BINARY); - rc = lseek (fileno (fin), restart_point, SEEK_SET); - break; - } -@@ -753,6 +769,8 @@ - - case TYPE_I: - case TYPE_L: -+ setmode (fileno (fin), O_BINARY); -+ setmode (fileno (dout), O_BINARY); - errno = d = 0; - while ((c = read (fileno (fin), buf, bufsize)) > 0) - { -@@ -987,7 +1005,17 @@ - { - struct stat st; - -+#ifdef __CYGWIN__ -+ { -+ char nmode[8]; -+ strcpy (nmode, lmode); -+ if (curtype != TYPE_A) -+ strcat (nmode, "b"); -+ fout = fopen (local, nmode); -+ } -+#else - fout = fopen (local, lmode); -+#endif - if (fout == NULL || fstat (fileno (fout), &st) < 0) - { - error (0, errno, "local: %s", local); -@@ -1016,6 +1044,8 @@ - - case TYPE_I: - case TYPE_L: -+ setmode (fileno (fout), O_BINARY); -+ setmode (fileno (din), O_BINARY); - if (restart_point && lseek (fileno (fout), restart_point, SEEK_SET) < 0) - { - error (0, errno, "local: %s", local); diff --git a/inetutils/14-ftpd.patch b/inetutils/14-ftpd.patch deleted file mode 100644 index 312649bf..00000000 --- a/inetutils/14-ftpd.patch +++ /dev/null @@ -1,311 +0,0 @@ -diff -Naur inetutils-1.9.2-orig/ftpd/auth.c inetutils-1.9.2/ftpd/auth.c ---- inetutils-1.9.2-orig/ftpd/auth.c 2013-09-26 12:36:38.000000000 +0300 -+++ inetutils-1.9.2/ftpd/auth.c 2014-12-12 11:55:12.478800000 +0300 -@@ -19,6 +19,17 @@ - - #include - -+#ifdef __CYGWIN__ -+# undef ERROR -+# include -+# include -+# include -+# include -+# define is_winnt (GetVersion() < 0x80000000) -+#else -+# define is_winnt (0) -+#endif -+ - #include - #include - #include -@@ -44,6 +55,9 @@ - shell as returned by getusershell(). Disallow anyone mentioned in the file - PATH_FTPUSERS to allow people such as root and uucp to be avoided. */ - -+static int -+do_cygwin_auth (const char* passwd, struct credentials *pcred); -+ - int - auth_user (const char *name, struct credentials *pcred) - { -@@ -84,6 +98,12 @@ - if (pcred->message == NULL) - return -1; - -+#ifdef __CYGWIN__ -+ /* when running under WinNT, password is always required. */ -+ if (!is_winnt) -+ { -+#endif /* __CYGWIN__ */ -+ - /* Check for anonymous log in. - * - * This code simulates part of `pam_ftp.so' -@@ -113,6 +133,9 @@ - } - return err; - } -+#ifdef __CYGWIN__ -+ } -+#endif /* __CYGWIN__ */ - - if (sgetcred (name, pcred) == 0) - { -@@ -184,18 +207,49 @@ - case AUTH_TYPE_PASSWD: - default: - { -+#ifdef __CYGWIN__ -+ if (!is_winnt) -+ { -+#endif /* __CYGWIN__ */ - char *xpasswd; - char *salt = pcred->passwd; - /* Try to authenticate the user. */ - if (pcred->passwd == NULL || *pcred->passwd == '\0') - return 1; /* Failed. */ -- xpasswd = crypt (passwd, salt); -+ xpasswd = (char*) crypt (passwd, salt); - return (!xpasswd || strcmp (xpasswd, pcred->passwd) != 0); -+#ifdef __CYGWIN__ -+ } else { -+ return do_cygwin_auth (passwd, pcred); -+ } -+#endif /* __CYGWIN__ */ - } - } /* switch (auth_type) */ - return -1; - } - -+#ifdef __CYGWIN__ -+static int -+do_cygwin_auth (const char* passwd, struct credentials *pcred) -+{ -+ struct passwd *p; -+ if ((pcred == NULL) || (pcred->name == NULL) || (pcred->name[0] == '\0')) -+ return 1; -+ -+ /* can't "recreate" p from contents of pcred, because -+ struct passwd might contain extension elements -+ unknown to us -+ */ -+ p = getpwnam (pcred->name); -+ if (p == NULL) -+ return 1; -+ -+ HANDLE hToken = (HANDLE) cygwin_logon_user (p, passwd); -+ cygwin_set_impersonation_token (hToken); -+ return (hToken == INVALID_HANDLE_VALUE); // non-zero on error -+} -+#endif /* __CYGWIN__ */ -+ - int - sgetcred (const char *name, struct credentials *pcred) - { -diff -Naur inetutils-1.9.2-orig/ftpd/ftpcmd.y inetutils-1.9.2/ftpd/ftpcmd.y ---- inetutils-1.9.2-orig/ftpd/ftpcmd.y 2013-12-23 14:57:54.000000000 +0300 -+++ inetutils-1.9.2/ftpd/ftpcmd.y 2014-12-12 11:55:12.478800000 +0300 -@@ -592,7 +592,7 @@ - # endif /* BSD */ - #endif /* !HAVE_UNAME */ - --#if defined unix || defined __unix || defined __unix__ -+#if defined unix || defined __unix || defined __unix__ || defined __CYGWIN__ - sys_type = "UNIX"; - #else - sys_type = "UNKNOWN"; -diff -Naur inetutils-1.9.2-orig/ftpd/ftpd.c inetutils-1.9.2/ftpd/ftpd.c ---- inetutils-1.9.2-orig/ftpd/ftpd.c 2013-12-23 14:57:54.000000000 +0300 -+++ inetutils-1.9.2/ftpd/ftpd.c 2014-12-12 11:55:12.478800000 +0300 -@@ -113,6 +113,10 @@ - # define LOG_FTP LOG_DAEMON /* Use generic facility. */ - #endif - -+#ifndef LARGE_TRANSFER_BLOCKSIZE -+# define LARGE_TRANSFER_BLOCKSIZE 4096 -+#endif -+ - #ifndef MAP_FAILED - # define MAP_FAILED (void*)-1 - #endif -@@ -445,11 +449,21 @@ - NULL - }; - -+#if defined(WITH_WRAP) && defined(__CYGWIN__) -+extern int allow_severity; /* set value in main() */ -+extern int deny_severity; /* set value in main() */ -+#endif -+ - int - main (int argc, char *argv[], char **envp) - { - int index; - -+#if defined(WITH_WRAP) && defined(__CYGWIN__) -+ allow_severity = LOG_INFO; -+ deny_severity = LOG_NOTICE; -+#endif -+ - set_program_name (argv[0]); - - #ifdef HAVE_TZSET -@@ -560,7 +574,7 @@ - } - #endif - --#ifdef F_SETOWN -+#if defined(F_SETOWN) && !defined(__CYGWIN__) - if (fcntl (STDIN_FILENO, F_SETOWN, getpid ()) == -1) - syslog (LOG_ERR, "fcntl F_SETOWN: %m"); - #endif -@@ -684,19 +698,29 @@ - /* We MUST do a chdir () after the chroot. Otherwise - the old current directory will be accessible as "." - outside the new root! */ -- if (chroot (pcred->rootdir) < 0 || chdir (pcred->homedir) < 0) -+ if (chroot (pcred->rootdir) < 0) - { - reply (550, "Can't set guest privileges."); - goto bad; - } -+ if (chdir (pcred->homedir) < 0) -+ { -+ reply(550, "Can't access home directory."); -+ goto bad; -+ } - } - else if (pcred->dochroot) - { -- if (chroot (pcred->rootdir) < 0 || chdir (pcred->homedir) < 0) -+ if (chroot (pcred->rootdir) < 0) - { - reply (550, "Can't change root."); - goto bad; - } -+ if (chdir (pcred->homedir) < 0) -+ { -+ reply(550, "Can't access home directory."); -+ goto bad; -+ } - } - - if (seteuid ((uid_t) pcred->uid) < 0) -@@ -862,7 +886,7 @@ - char *remotehost = pcred->remotehost; - int atype = pcred->auth_type; - -- seteuid ((uid_t) 0); -+ seteuid (getuid ()); - if (pcred->logged_in) - { - logwtmp_keep_open (ttyline, "", ""); -@@ -972,7 +996,13 @@ - - if (cmd == 0) - { -+#ifdef __CYGWIN__ -+ if (type != TYPE_A) -+ fin = fopen (name, "rb"), closefunc = fclose; -+ else -+#else - fin = fopen (name, "r"), closefunc = fclose; -+#endif /* __CYGWIN__ */ - st.st_size = 0; - } - else -@@ -1059,6 +1089,13 @@ - FILE *fout, *din; - struct stat st; - int (*closefunc) (FILE *); -+ char nmode[8]; -+ -+ strcpy (nmode, mode); -+#ifdef __CYGWIN__ -+ if (type != TYPE_A) -+ strcat (nmode, "b"); -+#endif - - if (unique && stat (name, &st) == 0) - { -@@ -1074,8 +1111,16 @@ - } - - if (restart_point) -- mode = "r+"; -- fout = fopen (name, mode); -+ { -+#ifdef __CYGWIN__ -+ if (type != TYPE_A) -+ mode = "rb+"; -+ else -+#endif -+ mode = "r+"; -+ strcpy (nmode, mode); -+ } -+ fout = fopen (name, nmode); - closefunc = fclose; - if (fout == NULL || fstat (fileno (fout), &st) < 0) - { -@@ -1151,7 +1196,7 @@ - - if (data >= 0) - return fdopen (data, mode); -- seteuid ((uid_t) 0); -+ seteuid (getuid ()); - s = socket (ctrl_addr.ss_family, SOCK_STREAM, 0); - if (s < 0) - goto bad; -@@ -1414,7 +1459,14 @@ - len = filesize; - do - { -+#ifdef __CYGWIN__ -+ cnt = write (netfd, bp, -+ (len < LARGE_TRANSFER_BLOCKSIZE ? -+ len : LARGE_TRANSFER_BLOCKSIZE)); -+#else - cnt = write (netfd, bp, len); -+#endif /* __CYGWIN__ */ -+ - len -= cnt; - bp += cnt; - if (cnt > 0) -@@ -1439,6 +1491,9 @@ - syslog (LOG_DEBUG, "Starting at position %jd.", curpos); - } - -+ if (blksize <= 0) -+ blksize = LARGE_TRANSFER_BLOCKSIZE; -+ - buf = malloc ((u_int) blksize); - if (buf == NULL) - { -@@ -1978,7 +2033,7 @@ - else /* !AF_INET6 */ - ((struct sockaddr_in *) &pasv_addr)->sin_port = 0; - -- seteuid ((uid_t) 0); -+ seteuid (getuid ()); - if (bind (pdata, (struct sockaddr *) &pasv_addr, pasv_addrlen) < 0) - { - if (seteuid ((uid_t) cred.uid)) -diff -Naur inetutils-1.9.2-orig/ftpd/server_mode.c inetutils-1.9.2/ftpd/server_mode.c ---- inetutils-1.9.2-orig/ftpd/server_mode.c 2013-09-26 12:36:38.000000000 +0300 -+++ inetutils-1.9.2/ftpd/server_mode.c 2014-12-12 11:55:12.478800000 +0300 -@@ -58,8 +58,14 @@ - extern int hosts_ctl (char *, char *, char *, char *); - # endif - -+#ifdef __CYGWIN__ -+/* provided by library (e.g. extern, here) on cygwin */ -+extern int allow_severity; /* set value in main() */ -+extern int deny_severity; /* set value in main() */ -+#else - int allow_severity = LOG_INFO; - int deny_severity = LOG_NOTICE; -+#endif - - static int - check_host (struct sockaddr *sa, socklen_t len) diff --git a/inetutils/15-syslogd.patch b/inetutils/15-syslogd.patch deleted file mode 100644 index d0733156..00000000 --- a/inetutils/15-syslogd.patch +++ /dev/null @@ -1,49 +0,0 @@ -diff -durNp inetutils-1.9.4.orig/man/syslogd.8 inetutils-1.9.4/man/syslogd.8 ---- inetutils-1.9.4.orig/man/syslogd.8 2015-05-12 20:17:12.000000000 +0800 -+++ inetutils-1.9.4/man/syslogd.8 2017-05-14 21:25:31.093750000 +0800 -@@ -30,6 +30,14 @@ print debug information (implies \fB\-\- - override configuration directory (default: - \fI\,/usr/local/etc/syslog.d\/\fP) - .TP -+\fB\-D\fR, \fB\-\-no\-daemonize\fR -+This is a synonym for \fB\-\-no\-detach\fR, and is provided for -+backwards compatibility with previous Cygwin ports. This flag -+(or its synonym) is necessary when installing syslogd as service -+started from cygrunsrv. The usual way to +install syslogd as -+service is to run the syslogd-config script. See -+/usr/share/doc/Cygwin/inetutils.README for more information. -+.TP - \fB\-f\fR, \fB\-\-rcfile\fR=\fI\,FILE\/\fR - override configuration file (default: - \fI\,/usr/local/etc/syslog.conf\/\fP) -diff -durNp inetutils-1.9.4.orig/src/syslogd.c inetutils-1.9.4/src/syslogd.c ---- inetutils-1.9.4.orig/src/syslogd.c 2015-05-12 20:13:25.000000000 +0800 -+++ inetutils-1.9.4/src/syslogd.c 2017-05-14 21:27:45.562500000 +0800 -@@ -348,6 +348,7 @@ static struct argp_option argp_options[] - {"mark", 'm', "INTVL", 0, "specify timestamp interval in minutes" - " (0 for no timestamping)", GRP+1}, - {"no-detach", 'n', NULL, 0, "do not enter daemon mode", GRP+1}, -+ {"no-daemonize", 'D', NULL, 0, "Synonym for -n", GRP+1}, - {"no-forward", OPT_NO_FORWARD, NULL, 0, "do not forward any messages " - "(overrides --hop)", GRP+1}, - #ifdef PATH_KLOG -@@ -432,6 +433,7 @@ parse_opt (int key, char *arg, struct ar - break; - - case 'n': -+ case 'D': - NoDetach = 1; - break; - -@@ -1108,7 +1110,11 @@ printsys (const char *msg) - char *lp, *q, line[MAXLINE + 1]; - const char *p; - -+#ifdef __CYGWIN__ -+ strcpy (line, "kernel: "); -+#else - strcpy (line, "vmunix: "); -+#endif - lp = line + strlen (line); - for (p = msg; *p != '\0';) - { diff --git a/inetutils/16-talk.patch b/inetutils/16-talk.patch deleted file mode 100644 index fcd21627..00000000 --- a/inetutils/16-talk.patch +++ /dev/null @@ -1,131 +0,0 @@ -diff -Naur inetutils-1.9.2-orig/talk/ctl.c inetutils-1.9.2/talk/ctl.c ---- inetutils-1.9.2-orig/talk/ctl.c 2013-09-26 12:36:38.000000000 +0300 -+++ inetutils-1.9.2/talk/ctl.c 2014-12-12 11:55:13.492800000 +0300 -@@ -57,6 +57,13 @@ - - #include - #include -+#ifdef HAVE_OSOCKADDR_H -+# include -+#else -+# ifndef HAVE_STRUCT_OSOCKADDR -+# include -+# endif -+#endif - #include - #include - #include "talk.h" -diff -Naur inetutils-1.9.2-orig/talk/ctl_transact.c inetutils-1.9.2/talk/ctl_transact.c ---- inetutils-1.9.2-orig/talk/ctl_transact.c 2013-09-26 12:36:38.000000000 +0300 -+++ inetutils-1.9.2/talk/ctl_transact.c 2014-12-12 11:55:13.492800000 +0300 -@@ -55,6 +55,13 @@ - #include - #include - #include -+#ifdef HAVE_OSOCKADDR_H -+# include -+#else -+# ifndef HAVE_STRUCT_OSOCKADDR -+# include -+# endif -+#endif - #include - #include - #include "talk_ctl.h" -diff -Naur inetutils-1.9.2-orig/talk/display.c inetutils-1.9.2/talk/display.c ---- inetutils-1.9.2-orig/talk/display.c 2013-09-26 12:36:38.000000000 +0300 -+++ inetutils-1.9.2/talk/display.c 2014-12-12 11:55:13.492800000 +0300 -@@ -125,7 +125,11 @@ - - for (i = 0; i < size; i++) - { -+#ifdef __CYGWIN__ -+ if ((*text == '\n') || (*text == '\r')) -+#else - if (*text == '\n') -+#endif - { - xscroll (win, 0); - text++; -diff -Naur inetutils-1.9.2-orig/talk/get_addrs.c inetutils-1.9.2/talk/get_addrs.c ---- inetutils-1.9.2-orig/talk/get_addrs.c 2013-09-26 12:36:38.000000000 +0300 -+++ inetutils-1.9.2/talk/get_addrs.c 2014-12-12 11:55:13.492800000 +0300 -@@ -55,6 +55,13 @@ - #include - #include - #include -+#ifdef HAVE_OSOCKADDR_H -+# include -+#else -+# ifndef HAVE_STRUCT_OSOCKADDR -+# include -+# endif -+#endif - #include - #include - #include -diff -Naur inetutils-1.9.2-orig/talk/get_names.c inetutils-1.9.2/talk/get_names.c ---- inetutils-1.9.2-orig/talk/get_names.c 2013-09-26 12:36:38.000000000 +0300 -+++ inetutils-1.9.2/talk/get_names.c 2014-12-12 11:55:13.492800000 +0300 -@@ -55,6 +55,13 @@ - #include - #include - #include -+#ifdef HAVE_OSOCKADDR_H -+# include -+#else -+# ifndef HAVE_STRUCT_OSOCKADDR -+# include -+# endif -+#endif - #include - #include - #include -diff -Naur inetutils-1.9.2-orig/talk/invite.c inetutils-1.9.2/talk/invite.c ---- inetutils-1.9.2-orig/talk/invite.c 2013-09-26 12:36:38.000000000 +0300 -+++ inetutils-1.9.2/talk/invite.c 2014-12-12 11:55:13.492800000 +0300 -@@ -57,6 +57,13 @@ - #include - #include - #include -+#ifdef HAVE_OSOCKADDR_H -+# include -+#else -+# ifndef HAVE_STRUCT_OSOCKADDR -+# include -+# endif -+#endif - #include - #include - #include -diff -Naur inetutils-1.9.2-orig/talk/io.c inetutils-1.9.2/talk/io.c ---- inetutils-1.9.2-orig/talk/io.c 2013-09-26 12:36:38.000000000 +0300 -+++ inetutils-1.9.2/talk/io.c 2014-12-12 11:55:13.508400000 +0300 -@@ -69,6 +69,10 @@ - #include - #include "talk.h" - -+#ifdef __CYGWIN__ -+#include -+#endif -+ - #define A_LONG_TIME 10000000 - - /* -diff -Naur inetutils-1.9.2-orig/talk/look_up.c inetutils-1.9.2/talk/look_up.c ---- inetutils-1.9.2-orig/talk/look_up.c 2013-09-26 12:36:38.000000000 +0300 -+++ inetutils-1.9.2/talk/look_up.c 2014-12-12 11:55:13.508400000 +0300 -@@ -54,6 +54,13 @@ - #include - #include - #include -+#ifdef HAVE_OSOCKADDR_H -+# include -+#else -+# ifndef HAVE_STRUCT_OSOCKADDR -+# include -+# endif -+#endif - #include - #include - #include diff --git a/inetutils/17-talkd.patch b/inetutils/17-talkd.patch deleted file mode 100644 index bd4888f0..00000000 --- a/inetutils/17-talkd.patch +++ /dev/null @@ -1,94 +0,0 @@ -diff -Naur inetutils-1.9.2-orig/talkd/acl.c inetutils-1.9.2/talkd/acl.c ---- inetutils-1.9.2-orig/talkd/acl.c 2013-09-26 12:36:38.000000000 +0300 -+++ inetutils-1.9.2/talkd/acl.c 2014-12-12 11:55:13.867200000 +0300 -@@ -332,6 +332,28 @@ - level = -1; /* Enforce a deny rule. */ - } - -+ /* existence check */ -+ if (access (filename, F_OK) != 0) -+ { -+ switch (errno) -+ { -+ case ENOENT: -+ /* no error message if user doesn't have a .talkrc file */ -+ break; -+ default: -+ syslog (LOG_ERR, "con't open config file %s: %m", filename); -+ break; -+ } -+ return NULL; -+ } -+ -+ /* read check */ -+ if (access (filename, R_OK) != 0) -+ { -+ syslog (LOG_ERR, "con't open config file %s: %m", filename); -+ return NULL; -+ } -+ - mark = acl_tail; - read_acl (filename, level); - free (filename); -diff -Naur inetutils-1.9.2-orig/talkd/announce.c inetutils-1.9.2/talkd/announce.c ---- inetutils-1.9.2-orig/talkd/announce.c 2013-09-26 12:36:38.000000000 +0300 -+++ inetutils-1.9.2/talkd/announce.c 2014-12-12 11:55:13.867200000 +0300 -@@ -88,7 +88,7 @@ - } - - static int --print_mesg (char *tty, CTL_MSG * request, char *remote_machine) -+print_mesg (char *tty, CTL_MSG * request, const char *remote_machine) - { - time_t t; - LINE ln; -@@ -125,7 +125,7 @@ - /* See if the user is accepting messages. If so, announce that - a talk is requested. */ - int --announce (CTL_MSG * request, char *remote_machine) -+announce (CTL_MSG * request, const char *remote_machine) - { - char *ttypath; - int len; -diff -Naur inetutils-1.9.2-orig/talkd/intalkd.h inetutils-1.9.2/talkd/intalkd.h ---- inetutils-1.9.2-orig/talkd/intalkd.h 2013-09-26 12:36:38.000000000 +0300 -+++ inetutils-1.9.2/talkd/intalkd.h 2014-12-12 11:55:13.867200000 +0300 -@@ -22,6 +22,13 @@ - #include - #include - #include -+#ifdef HAVE_OSOCKADDR_H -+# include -+#else -+# ifndef HAVE_STRUCT_OSOCKADDR -+# include -+# endif -+#endif - #include - #include - #include -@@ -65,4 +72,4 @@ - extern int new_id (void); - extern void read_acl (char *config_file, int system); - extern int acl_match (CTL_MSG * msg, struct sockaddr_in *sa_in); --extern int announce (CTL_MSG * request, char *remote_machine); -+extern int announce (CTL_MSG * request, const char *remote_machine); -diff -Naur inetutils-1.9.2-orig/talkd/process.c inetutils-1.9.2/talkd/process.c ---- inetutils-1.9.2-orig/talkd/process.c 2013-10-29 13:38:56.000000000 +0300 -+++ inetutils-1.9.2/talkd/process.c 2014-12-12 11:55:13.867200000 +0300 -@@ -236,12 +236,14 @@ - - if (stat (ftty, &statb) == 0) - { -+#ifndef __CYGWIN__ - if (!(statb.st_mode & S_IWGRP)) - { - if (status != SUCCESS) - status = PERMISSION_DENIED; - continue; - } -+#endif - if (statb.st_atime > last_time) - { - last_time = statb.st_atime; diff --git a/inetutils/PKGBUILD b/inetutils/PKGBUILD index 8e29264d..7cbba1c5 100644 --- a/inetutils/PKGBUILD +++ b/inetutils/PKGBUILD @@ -1,84 +1,57 @@ # Maintainer: Martell Malone pkgname=inetutils -pkgver=1.9.4 -pkgrel=5 +pkgver=2.4 +pkgrel=1 pkgdesc="A collection of common network programs." arch=('i686' 'x86_64') url="https://www.gnu.org/software/inetutils/" -license=('GPL3') +license=('spdx:GPL-3.0-or-later') depends=('gcc-libs' 'libintl' 'libcrypt' 'libreadline' 'ncurses') makedepends=('gettext-devel' 'libcrypt-devel' 'libreadline-devel' 'ncurses-devel' 'autotools' 'gcc' 'tftp-hpa' 'help2man') options=('!emptydirs') -install=inetutils.install source=(https://ftp.gnu.org/gnu/inetutils/${pkgname}-${pkgver}.tar.xz - 01-buildsystem-updates.patch - 07-other-buildsys-updates.patch - 08-libinetutils.patch - 09-inetd.patch - 11-telnet.patch - 13-ftp.patch - 14-ftpd.patch - 15-syslogd.patch - 16-talk.patch - 17-talkd.patch - inetutils-1.9.4-1.src.patch + inetutils-2.4-1.src.patch + icmp6.h osockaddr.h - talkd.h - tftp.h - inetutils-1.9.4-update-gnulib.patch) -sha256sums=('849d96f136effdef69548a940e3e0ec0624fc0c81265296987986a0dd36ded37' - 'e88387223e1559bc4919dc8963149ecdb6ee8d812bdd07afa0342bd35de4fd65' - 'ba3131b7825bb1b23280515a104391f69ae00f4e0caf285b2487080e008a979d' - 'bd5308733b610233b23af51760d849f53aae038253ead1430193be03b89c0e45' - 'b760c8adf10fa630101370a7cbb1c602d4ee10f18378dbffa98d1c1fbc6653c3' - '2751a47380c59d0d99a4d5c9eea0cf14ef9f40469a33fa32af1b12c3cac1d90d' - '277491be3779b4993f3e1a200c8fa899201c4630e18e62fd268556d4c8e1a3c5' - '90bc197ed42fe646b44b40fa68c0b76c1baf82daa047bd9e63758513f4e0e6f3' - '09f4b2375eb350613aea8c2ae6726bf3df6f7d4cc737f3ea7473e6d2e0ba0257' - '4260c0a18a7a16e4485aeb7cd8acc998cbb8e4c29d4b8d6bcbc535d86c79452c' - 'd749005e6733f3ab7912a1c5952713499b76155386c2bfa9235a3e02dbce4fd8' - '66fa288a99beed6d7b885b980d06c8b13ce43f5c34461e515875f8705fbb84c1' + talkd.h) +sha256sums=('1789d6b1b1a57dfe2a7ab7b533ee9f5dfd9cbf5b59bb1bb3c2612ed08d0f68b2' + 'f70555d075a9c02cbc9b3580d4401b27a3069febac86152da06a76ee4da91df3' + 'efad23dea555319c503c0b6ed7ec6b46c8faa48c138c763749686fc66e98c4b8' 'e19596afff3b2ed163cf1a5c8a8d034208f9f996ace1ac76fd877a2d16aa448d' - '5ad3115e95be02f1d0467ec13750f2d9096c7dfd6cf723a775e8718954e58018' - 'f486d5235c54c03af270c85a9c519e21315534412d0787e159116e132f1b47da' - '22d6de583f4313a37eec070fb2a15bac576b95d62acc4ad759ec25cb2133dc6c') + 'b9e2401b0756c9bebcb0b0835d3c8f218198a121013f4990637ed1b9af0c72fd') prepare() { cd ${srcdir}/${pkgname}-${pkgver} + + # from cygwin mkdir -p headers/protocols cp ${srcdir}/osockaddr.h headers/protocols/osockaddr.h cp ${srcdir}/talkd.h headers/protocols/talkd.h - # mkdir -p headers/arpa - # cp ${srcdir}/tftp.h headers/arpa/tftp.h - - patch -p1 -i ${srcdir}/01-buildsystem-updates.patch - patch -p1 -i ${srcdir}/07-other-buildsys-updates.patch - patch -p1 -i ${srcdir}/08-libinetutils.patch - patch -p1 -i ${srcdir}/09-inetd.patch - patch -p1 -i ${srcdir}/11-telnet.patch - patch -p1 -i ${srcdir}/13-ftp.patch - patch -p1 -i ${srcdir}/14-ftpd.patch - patch -p1 -i ${srcdir}/15-syslogd.patch - patch -p1 -i ${srcdir}/16-talk.patch - patch -p1 -i ${srcdir}/17-talkd.patch - patch -p1 -i ${srcdir}/inetutils-1.9.4-1.src.patch - patch -p1 -i ${srcdir}/inetutils-1.9.4-update-gnulib.patch + mkdir -p headers/netinet + cp ${srcdir}/icmp6.h headers/netinet/icmp6.h + patch -p2 -i ${srcdir}/inetutils-2.4-1.src.patch autoreconf -fiv } build() { - CPPFLAGS+=" -I${srcdir}/${pkgname}-${pkgver}/headers" cd ${srcdir}/${pkgname}-${pkgver} - cat > config.cache << EOF -gl_cv_func_getcwd_path_max=yes -ac_cv_func_mmap_fixed_mapped=no -EOF + mkdir -p "${srcdir}/build-${MSYSTEM}" && cd "${srcdir}/build-${MSYSTEM}" + + # copied from cygwin + export ac_cv_func_mmap_fixed_mapped=no + + # the cygwin patch adds talkd.h, but not in a way configure can detect it + # so force it here + export ac_cv_header_protocols_talkd_h=yes + + # this isn't set in ./configure but needed to get a valid Makefile -- don't ask me... + export EXEEXT=.exe local CYGWIN_CHOST="${CHOST/-msys/-cygwin}" - ./configure --prefix=/usr \ + ../${pkgbase}-${pkgver}/configure --prefix=/usr \ --build=${CYGWIN_CHOST} \ --libexec=/usr/bin \ --localstatedir=/var \ @@ -102,13 +75,13 @@ EOF --disable-inetd --disable-whois \ --disable-uucpd --disable-ifconfig \ --enable-dnsdomainname \ - --disable-traceroute \ - --cache-file=config.cache + --disable-traceroute make } package() { - cd ${srcdir}/${pkgname}-${pkgver} + cd "${srcdir}/build-${MSYSTEM}" + make DESTDIR="${pkgdir}" install } diff --git a/inetutils/icmp6.h b/inetutils/icmp6.h new file mode 100644 index 00000000..1b2f26a1 --- /dev/null +++ b/inetutils/icmp6.h @@ -0,0 +1,345 @@ +/* Copyright (C) 1991-1997,2000,2006,2009 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _NETINET_ICMP6_H +#define _NETINET_ICMP6_H 1 + +#include +#include +#include +#include + +#define ICMP6_FILTER 1 + +#define ICMP6_FILTER_BLOCK 1 +#define ICMP6_FILTER_PASS 2 +#define ICMP6_FILTER_BLOCKOTHERS 3 +#define ICMP6_FILTER_PASSONLY 4 + +struct icmp6_filter + { + uint32_t icmp6_filt[8]; + }; + +struct icmp6_hdr + { + uint8_t icmp6_type; /* type field */ + uint8_t icmp6_code; /* code field */ + uint16_t icmp6_cksum; /* checksum field */ + union + { + uint32_t icmp6_un_data32[1]; /* type-specific field */ + uint16_t icmp6_un_data16[2]; /* type-specific field */ + uint8_t icmp6_un_data8[4]; /* type-specific field */ + } icmp6_dataun; + }; + +#define icmp6_data32 icmp6_dataun.icmp6_un_data32 +#define icmp6_data16 icmp6_dataun.icmp6_un_data16 +#define icmp6_data8 icmp6_dataun.icmp6_un_data8 +#define icmp6_pptr icmp6_data32[0] /* parameter prob */ +#define icmp6_mtu icmp6_data32[0] /* packet too big */ +#define icmp6_id icmp6_data16[0] /* echo request/reply */ +#define icmp6_seq icmp6_data16[1] /* echo request/reply */ +#define icmp6_maxdelay icmp6_data16[0] /* mcast group membership */ + +#define ICMP6_DST_UNREACH 1 +#define ICMP6_PACKET_TOO_BIG 2 +#define ICMP6_TIME_EXCEEDED 3 +#define ICMP6_PARAM_PROB 4 + +#define ICMP6_INFOMSG_MASK 0x80 /* all informational messages */ + +#define ICMP6_ECHO_REQUEST 128 +#define ICMP6_ECHO_REPLY 129 +#define MLD_LISTENER_QUERY 130 +#define MLD_LISTENER_REPORT 131 +#define MLD_LISTENER_REDUCTION 132 + +#define ICMP6_DST_UNREACH_NOROUTE 0 /* no route to destination */ +#define ICMP6_DST_UNREACH_ADMIN 1 /* communication with destination */ + /* administratively prohibited */ +#define ICMP6_DST_UNREACH_BEYONDSCOPE 2 /* beyond scope of source address */ +#define ICMP6_DST_UNREACH_ADDR 3 /* address unreachable */ +#define ICMP6_DST_UNREACH_NOPORT 4 /* bad port */ + +#define ICMP6_TIME_EXCEED_TRANSIT 0 /* Hop Limit == 0 in transit */ +#define ICMP6_TIME_EXCEED_REASSEMBLY 1 /* Reassembly time out */ + +#define ICMP6_PARAMPROB_HEADER 0 /* erroneous header field */ +#define ICMP6_PARAMPROB_NEXTHEADER 1 /* unrecognized Next Header */ +#define ICMP6_PARAMPROB_OPTION 2 /* unrecognized IPv6 option */ + +#define ICMP6_FILTER_WILLPASS(type, filterp) \ + ((((filterp)->icmp6_filt[(type) >> 5]) & (1 << ((type) & 31))) == 0) + +#define ICMP6_FILTER_WILLBLOCK(type, filterp) \ + ((((filterp)->icmp6_filt[(type) >> 5]) & (1 << ((type) & 31))) != 0) + +#define ICMP6_FILTER_SETPASS(type, filterp) \ + ((((filterp)->icmp6_filt[(type) >> 5]) &= ~(1 << ((type) & 31)))) + +#define ICMP6_FILTER_SETBLOCK(type, filterp) \ + ((((filterp)->icmp6_filt[(type) >> 5]) |= (1 << ((type) & 31)))) + +#define ICMP6_FILTER_SETPASSALL(filterp) \ + memset (filterp, 0, sizeof (struct icmp6_filter)); + +#define ICMP6_FILTER_SETBLOCKALL(filterp) \ + memset (filterp, 0xFF, sizeof (struct icmp6_filter)); + +#define ND_ROUTER_SOLICIT 133 +#define ND_ROUTER_ADVERT 134 +#define ND_NEIGHBOR_SOLICIT 135 +#define ND_NEIGHBOR_ADVERT 136 +#define ND_REDIRECT 137 + +struct nd_router_solicit /* router solicitation */ + { + struct icmp6_hdr nd_rs_hdr; + /* could be followed by options */ + }; + +#define nd_rs_type nd_rs_hdr.icmp6_type +#define nd_rs_code nd_rs_hdr.icmp6_code +#define nd_rs_cksum nd_rs_hdr.icmp6_cksum +#define nd_rs_reserved nd_rs_hdr.icmp6_data32[0] + +struct nd_router_advert /* router advertisement */ + { + struct icmp6_hdr nd_ra_hdr; + uint32_t nd_ra_reachable; /* reachable time */ + uint32_t nd_ra_retransmit; /* retransmit timer */ + /* could be followed by options */ + }; + +#define nd_ra_type nd_ra_hdr.icmp6_type +#define nd_ra_code nd_ra_hdr.icmp6_code +#define nd_ra_cksum nd_ra_hdr.icmp6_cksum +#define nd_ra_curhoplimit nd_ra_hdr.icmp6_data8[0] +#define nd_ra_flags_reserved nd_ra_hdr.icmp6_data8[1] +#define ND_RA_FLAG_MANAGED 0x80 +#define ND_RA_FLAG_OTHER 0x40 +#define ND_RA_FLAG_HOME_AGENT 0x20 +#define nd_ra_router_lifetime nd_ra_hdr.icmp6_data16[1] + +struct nd_neighbor_solicit /* neighbor solicitation */ + { + struct icmp6_hdr nd_ns_hdr; + struct in6_addr nd_ns_target; /* target address */ + /* could be followed by options */ + }; + +#define nd_ns_type nd_ns_hdr.icmp6_type +#define nd_ns_code nd_ns_hdr.icmp6_code +#define nd_ns_cksum nd_ns_hdr.icmp6_cksum +#define nd_ns_reserved nd_ns_hdr.icmp6_data32[0] + +struct nd_neighbor_advert /* neighbor advertisement */ + { + struct icmp6_hdr nd_na_hdr; + struct in6_addr nd_na_target; /* target address */ + /* could be followed by options */ + }; + +#define nd_na_type nd_na_hdr.icmp6_type +#define nd_na_code nd_na_hdr.icmp6_code +#define nd_na_cksum nd_na_hdr.icmp6_cksum +#define nd_na_flags_reserved nd_na_hdr.icmp6_data32[0] +#if BYTE_ORDER == BIG_ENDIAN +#define ND_NA_FLAG_ROUTER 0x80000000 +#define ND_NA_FLAG_SOLICITED 0x40000000 +#define ND_NA_FLAG_OVERRIDE 0x20000000 +#else /* BYTE_ORDER == LITTLE_ENDIAN */ +#define ND_NA_FLAG_ROUTER 0x00000080 +#define ND_NA_FLAG_SOLICITED 0x00000040 +#define ND_NA_FLAG_OVERRIDE 0x00000020 +#endif + +struct nd_redirect /* redirect */ + { + struct icmp6_hdr nd_rd_hdr; + struct in6_addr nd_rd_target; /* target address */ + struct in6_addr nd_rd_dst; /* destination address */ + /* could be followed by options */ + }; + +#define nd_rd_type nd_rd_hdr.icmp6_type +#define nd_rd_code nd_rd_hdr.icmp6_code +#define nd_rd_cksum nd_rd_hdr.icmp6_cksum +#define nd_rd_reserved nd_rd_hdr.icmp6_data32[0] + +struct nd_opt_hdr /* Neighbor discovery option header */ + { + uint8_t nd_opt_type; + uint8_t nd_opt_len; /* in units of 8 octets */ + /* followed by option specific data */ + }; + +#define ND_OPT_SOURCE_LINKADDR 1 +#define ND_OPT_TARGET_LINKADDR 2 +#define ND_OPT_PREFIX_INFORMATION 3 +#define ND_OPT_REDIRECTED_HEADER 4 +#define ND_OPT_MTU 5 +#define ND_OPT_RTR_ADV_INTERVAL 7 +#define ND_OPT_HOME_AGENT_INFO 8 + +struct nd_opt_prefix_info /* prefix information */ + { + uint8_t nd_opt_pi_type; + uint8_t nd_opt_pi_len; + uint8_t nd_opt_pi_prefix_len; + uint8_t nd_opt_pi_flags_reserved; + uint32_t nd_opt_pi_valid_time; + uint32_t nd_opt_pi_preferred_time; + uint32_t nd_opt_pi_reserved2; + struct in6_addr nd_opt_pi_prefix; + }; + +#define ND_OPT_PI_FLAG_ONLINK 0x80 +#define ND_OPT_PI_FLAG_AUTO 0x40 +#define ND_OPT_PI_FLAG_RADDR 0x20 + +struct nd_opt_rd_hdr /* redirected header */ + { + uint8_t nd_opt_rh_type; + uint8_t nd_opt_rh_len; + uint16_t nd_opt_rh_reserved1; + uint32_t nd_opt_rh_reserved2; + /* followed by IP header and data */ + }; + +struct nd_opt_mtu /* MTU option */ + { + uint8_t nd_opt_mtu_type; + uint8_t nd_opt_mtu_len; + uint16_t nd_opt_mtu_reserved; + uint32_t nd_opt_mtu_mtu; + }; + +struct mld_hdr + { + struct icmp6_hdr mld_icmp6_hdr; + struct in6_addr mld_addr; /* multicast address */ + }; + +#define mld_type mld_icmp6_hdr.icmp6_type +#define mld_code mld_icmp6_hdr.icmp6_code +#define mld_cksum mld_icmp6_hdr.icmp6_cksum +#define mld_maxdelay mld_icmp6_hdr.icmp6_data16[0] +#define mld_reserved mld_icmp6_hdr.icmp6_data16[1] + +#define ICMP6_ROUTER_RENUMBERING 138 + +struct icmp6_router_renum /* router renumbering header */ + { + struct icmp6_hdr rr_hdr; + uint8_t rr_segnum; + uint8_t rr_flags; + uint16_t rr_maxdelay; + uint32_t rr_reserved; + }; + +#define rr_type rr_hdr.icmp6_type +#define rr_code rr_hdr.icmp6_code +#define rr_cksum rr_hdr.icmp6_cksum +#define rr_seqnum rr_hdr.icmp6_data32[0] + +/* Router renumbering flags */ +#define ICMP6_RR_FLAGS_TEST 0x80 +#define ICMP6_RR_FLAGS_REQRESULT 0x40 +#define ICMP6_RR_FLAGS_FORCEAPPLY 0x20 +#define ICMP6_RR_FLAGS_SPECSITE 0x10 +#define ICMP6_RR_FLAGS_PREVDONE 0x08 + +struct rr_pco_match /* match prefix part */ + { + uint8_t rpm_code; + uint8_t rpm_len; + uint8_t rpm_ordinal; + uint8_t rpm_matchlen; + uint8_t rpm_minlen; + uint8_t rpm_maxlen; + uint16_t rpm_reserved; + struct in6_addr rpm_prefix; + }; + +/* PCO code values */ +#define RPM_PCO_ADD 1 +#define RPM_PCO_CHANGE 2 +#define RPM_PCO_SETGLOBAL 3 + +struct rr_pco_use /* use prefix part */ + { + uint8_t rpu_uselen; + uint8_t rpu_keeplen; + uint8_t rpu_ramask; + uint8_t rpu_raflags; + uint32_t rpu_vltime; + uint32_t rpu_pltime; + uint32_t rpu_flags; + struct in6_addr rpu_prefix; + }; + +#define ICMP6_RR_PCOUSE_RAFLAGS_ONLINK 0x20 +#define ICMP6_RR_PCOUSE_RAFLAGS_AUTO 0x10 + +#if BYTE_ORDER == BIG_ENDIAN +# define ICMP6_RR_PCOUSE_FLAGS_DECRVLTIME 0x80000000 +# define ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME 0x40000000 +#elif BYTE_ORDER == LITTLE_ENDIAN +# define ICMP6_RR_PCOUSE_FLAGS_DECRVLTIME 0x80 +# define ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME 0x40 +#endif + +struct rr_result /* router renumbering result message */ + { + uint16_t rrr_flags; + uint8_t rrr_ordinal; + uint8_t rrr_matchedlen; + uint32_t rrr_ifid; + struct in6_addr rrr_prefix; + }; + +#if BYTE_ORDER == BIG_ENDIAN +# define ICMP6_RR_RESULT_FLAGS_OOB 0x0002 +# define ICMP6_RR_RESULT_FLAGS_FORBIDDEN 0x0001 +#elif BYTE_ORDER == LITTLE_ENDIAN +# define ICMP6_RR_RESULT_FLAGS_OOB 0x0200 +# define ICMP6_RR_RESULT_FLAGS_FORBIDDEN 0x0100 +#endif + +/* Mobile IPv6 extension: Advertisement Interval. */ +struct nd_opt_adv_interval + { + uint8_t nd_opt_adv_interval_type; + uint8_t nd_opt_adv_interval_len; + uint16_t nd_opt_adv_interval_reserved; + uint32_t nd_opt_adv_interval_ival; + }; + +/* Mobile IPv6 extension: Home Agent Info. */ +struct nd_opt_home_agent_info + { + uint8_t nd_opt_home_agent_info_type; + uint8_t nd_opt_home_agent_info_len; + uint16_t nd_opt_home_agent_info_reserved; + uint16_t nd_opt_home_agent_info_preference; + uint16_t nd_opt_home_agent_info_lifetime; + }; + +#endif /* netinet/icmpv6.h */ diff --git a/inetutils/inetutils-1.9.4-1.src.patch b/inetutils/inetutils-1.9.4-1.src.patch deleted file mode 100644 index fcbe5166..00000000 --- a/inetutils/inetutils-1.9.4-1.src.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff -durN inetutils-1.9.4.orig/.version inetutils-1.9.4/.version ---- inetutils-1.9.4.orig/.version 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/.version 2017-05-14 21:33:59.421875000 +0800 -@@ -0,0 +1 @@ -+1.9.4 -diff -durN inetutils-1.9.4.orig/configure.ac inetutils-1.9.4/configure.ac ---- inetutils-1.9.4.orig/configure.ac 2017-05-14 21:30:40.875000000 +0800 -+++ inetutils-1.9.4/configure.ac 2017-05-14 21:36:54.406250000 +0800 -@@ -230,10 +230,15 @@ - AM_CONDITIONAL([ENABLE_libls], [test "$enable_libls" = yes]) - - # At least OpenSolaris is missing . --AC_CHECK_HEADER(protocols/talkd.h, , , -+AC_CHECK_HEADER(protocols/osockaddr.h, , , - [IU_FLUSHLEFT([#include - #include ])]) - -+AC_CHECK_HEADER(protocols/talkd.h, , , -+ [IU_FLUSHLEFT([#include -+ #include -+ #include ])]) -+ - if test "$ac_cv_header_protocols_talkd_h" = no; then - AC_MSG_WARN([protocols/talkd.h is not available, not building talk, nor talkd]) - IU_DISABLE_TARGET(talk) -@@ -611,7 +616,7 @@ - sys/proc.h sys/select.h sys/time.h sys/wait.h \ - sys/resource.h \ - stropts.h tcpd.h utmp.h utmpx.h unistd.h \ -- vis.h osockaddr.h crypt.h], [], [], [ -+ vis.h crypt.h], [], [], [ - #include - #ifdef HAVE_STDIO_H - # include -diff -durN inetutils-1.9.4.orig/libinetutils/daemon.c inetutils-1.9.4/libinetutils/daemon.c ---- inetutils-1.9.4.orig/libinetutils/daemon.c 2017-05-14 21:30:39.781250000 +0800 -+++ inetutils-1.9.4/libinetutils/daemon.c 2017-05-14 21:37:41.578125000 +0800 -@@ -56,6 +56,7 @@ - #include - #include - #include -+#include - #include - - /* diff --git a/inetutils/inetutils-1.9.4-update-gnulib.patch b/inetutils/inetutils-1.9.4-update-gnulib.patch deleted file mode 100644 index a3f3281e..00000000 --- a/inetutils/inetutils-1.9.4-update-gnulib.patch +++ /dev/null @@ -1,47100 +0,0 @@ -diff -durN inetutils-1.9.4.orig/aclocal.m4 inetutils-1.9.4/aclocal.m4 ---- inetutils-1.9.4.orig/aclocal.m4 2015-06-09 15:48:02.000000000 +0800 -+++ inetutils-1.9.4/aclocal.m4 2017-05-15 17:57:43.828125000 +0800 -@@ -1210,6 +1210,17 @@ - AC_SUBST([am__untar]) - ]) # _AM_PROG_TAR - -+m4_include([am/check_macro.m4]) -+m4_include([am/check_member.m4]) -+m4_include([am/check_weak_refs.m4]) -+m4_include([am/config_paths.m4]) -+m4_include([am/enable.m4]) -+m4_include([am/flushleft.m4]) -+m4_include([am/krb5.m4]) -+m4_include([am/libcurses.m4]) -+m4_include([am/libidn.m4]) -+m4_include([am/readline.m4]) -+m4_include([am/result.m4]) - m4_include([m4/00gnulib.m4]) - m4_include([m4/absolute-header.m4]) - m4_include([m4/alloca.m4]) -@@ -1217,6 +1228,7 @@ - m4_include([m4/arpa_inet_h.m4]) - m4_include([m4/autobuild.m4]) - m4_include([m4/btowc.m4]) -+m4_include([m4/builtin-expect.m4]) - m4_include([m4/chdir-long.m4]) - m4_include([m4/close.m4]) - m4_include([m4/closedir.m4]) -@@ -1244,6 +1256,7 @@ - m4_include([m4/fdopendir.m4]) - m4_include([m4/filemode.m4]) - m4_include([m4/filenamecat.m4]) -+m4_include([m4/flexmember.m4]) - m4_include([m4/float_h.m4]) - m4_include([m4/fnmatch.m4]) - m4_include([m4/fopen.m4]) -@@ -1263,9 +1276,11 @@ - m4_include([m4/getgroups.m4]) - m4_include([m4/gethostname.m4]) - m4_include([m4/getline.m4]) -+m4_include([m4/getlogin.m4]) - m4_include([m4/getlogin_r.m4]) - m4_include([m4/getopt.m4]) - m4_include([m4/getpass.m4]) -+m4_include([m4/getprogname.m4]) - m4_include([m4/gettext.m4]) - m4_include([m4/gettimeofday.m4]) - m4_include([m4/getugroups.m4]) -@@ -1274,6 +1289,7 @@ - m4_include([m4/glob.m4]) - m4_include([m4/gnulib-common.m4]) - m4_include([m4/gnulib-comp.m4]) -+m4_include([m4/hard-locale.m4]) - m4_include([m4/hostent.m4]) - m4_include([m4/include_next.m4]) - m4_include([m4/inet_ntop.m4]) -@@ -1286,12 +1302,14 @@ - m4_include([m4/lib-ld.m4]) - m4_include([m4/lib-link.m4]) - m4_include([m4/lib-prefix.m4]) -+m4_include([m4/limits-h.m4]) - m4_include([m4/localcharset.m4]) - m4_include([m4/locale-fr.m4]) - m4_include([m4/locale-ja.m4]) - m4_include([m4/locale-zh.m4]) - m4_include([m4/locale_h.m4]) - m4_include([m4/localeconv.m4]) -+m4_include([m4/localtime-buffer.m4]) - m4_include([m4/lock.m4]) - m4_include([m4/longlong.m4]) - m4_include([m4/lseek.m4]) -@@ -1320,7 +1338,6 @@ - m4_include([m4/nocrash.m4]) - m4_include([m4/obstack.m4]) - m4_include([m4/off_t.m4]) --m4_include([m4/onceonly.m4]) - m4_include([m4/open.m4]) - m4_include([m4/openat.m4]) - m4_include([m4/opendir.m4]) -@@ -1330,6 +1347,7 @@ - m4_include([m4/poll_h.m4]) - m4_include([m4/posix_openpt.m4]) - m4_include([m4/printf.m4]) -+m4_include([m4/pthread_rwlock_rdlock.m4]) - m4_include([m4/pty.m4]) - m4_include([m4/pty_h.m4]) - m4_include([m4/rawmemchr.m4]) -@@ -1400,14 +1418,3 @@ - m4_include([m4/xgetcwd.m4]) - m4_include([m4/xsize.m4]) - m4_include([m4/xvasprintf.m4]) --m4_include([am/check_macro.m4]) --m4_include([am/check_member.m4]) --m4_include([am/check_weak_refs.m4]) --m4_include([am/config_paths.m4]) --m4_include([am/enable.m4]) --m4_include([am/flushleft.m4]) --m4_include([am/krb5.m4]) --m4_include([am/libcurses.m4]) --m4_include([am/libidn.m4]) --m4_include([am/readline.m4]) --m4_include([am/result.m4]) -diff -durN inetutils-1.9.4.orig/bootstrap inetutils-1.9.4/bootstrap ---- inetutils-1.9.4.orig/bootstrap 2017-05-15 17:44:05.406250000 +0800 -+++ inetutils-1.9.4/bootstrap 2017-05-15 17:47:10.250000000 +0800 -@@ -1,10 +1,10 @@ - #! /bin/sh - # Print a version string. --scriptversion=2013-08-15.22; # UTC -+scriptversion=2017-01-09.19; # UTC - - # Bootstrap this package from checked-out sources. - --# Copyright (C) 2003-2013 Free Software Foundation, Inc. -+# Copyright (C) 2003-2017 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 -@@ -42,6 +42,9 @@ - - local_gl_dir=gl - -+# Honor $PERL, but work even if there is none. -+PERL="${PERL-perl}" -+ - me=$0 - - usage() { -@@ -209,12 +212,26 @@ - # Use git to update gnulib sources - use_git=true - -+check_exists() { -+ if test "$1" = "--verbose"; then -+ ($2 --version /dev/null 2>&1 -+ if test $? -ge 126; then -+ # If not found, run with diagnostics as one may be -+ # presented with env variables to set to find the right version -+ ($2 --version /dev/null 2>&1 -+ fi -+ -+ test $? -lt 126 -+} -+ - # find_tool ENVVAR NAMES... - # ------------------------- - # Search for a required program. Use the value of ENVVAR, if set, --# otherwise find the first of the NAMES that can be run (i.e., --# supports --version). If found, set ENVVAR to the program name, --# die otherwise. -+# otherwise find the first of the NAMES that can be run. -+# If found, set ENVVAR to the program name, die otherwise. - # - # FIXME: code duplication, see also gnu-web-doc-update. - find_tool () -@@ -225,7 +242,7 @@ - eval "find_tool_res=\$$find_tool_envvar" - if test x"$find_tool_res" = x; then - for i; do -- if ($i --version /dev/null 2>&1; then -+ if check_exists $i; then - find_tool_res=$i - break - fi -@@ -401,28 +418,30 @@ - done - } - --get_version() { -- app=$1 -+get_version_sed=' -+# Move version to start of line. -+s/.*[v ]\([0-9]\)/\1/ - -- $app --version >/dev/null 2>&1 || return 1 -+# Skip lines that do not start with version. -+/^[0-9]/!d - -- $app --version 2>&1 | -- sed -n '# Move version to start of line. -- s/.*[v ]\([0-9]\)/\1/ -+# Remove characters after the version. -+s/[^.a-z0-9-].*// - -- # Skip lines that do not start with version. -- /^[0-9]/!d -+# The first component must be digits only. -+s/^\([0-9]*\)[a-z-].*/\1/ - -- # Remove characters after the version. -- s/[^.a-z0-9-].*// -+#the following essentially does s/5.005/5.5/ -+s/\.0*\([1-9]\)/.\1/g -+p -+q' - -- # The first component must be digits only. -- s/^\([0-9]*\)[a-z-].*/\1/ -+get_version() { -+ app=$1 - -- #the following essentially does s/5.005/5.5/ -- s/\.0*\([1-9]\)/.\1/g -- p -- q' -+ $app --version >/dev/null 2>&1 || { $app --version; return 1; } -+ -+ $app --version 2>&1 | sed -n "$get_version_sed" - } - - check_versions() { -@@ -442,6 +461,7 @@ - test "$appvar" = TAR && appvar=AMTAR - case $appvar in - GZIP) ;; # Do not use $GZIP: it contains gzip options. -+ PERL::*) ;; # Keep perl modules as-is - *) eval "app=\${$appvar-$app}" ;; - esac - -@@ -459,12 +479,22 @@ - ret=1 - continue - } ;; -+ # Another check is for perl modules. These can be written as -+ # e.g. perl::XML::XPath in case of XML::XPath module, etc. -+ perl::*) -+ # Extract module name -+ app="${app#perl::}" -+ if ! $PERL -m"$app" -e 'exit 0' >/dev/null 2>&1; then -+ warn_ "Error: perl module '$app' not found" -+ ret=1 -+ fi -+ continue -+ ;; - esac - if [ "$req_ver" = "-" ]; then - # Merely require app to exist; not all prereq apps are well-behaved - # so we have to rely on $? rather than get_version. -- $app --version >/dev/null 2>&1 /dev/null 2>/dev/null ; then -+if $use_git && test -d .git && check_exists git; then - if git config merge.merge-changelog.driver >/dev/null ; then - : -- elif (git-merge-changelog --version) >/dev/null 2>/dev/null ; then -+ elif check_exists git-merge-changelog; then - echo "$0: initializing git-merge-changelog driver" - git config merge.merge-changelog.name 'GNU-style ChangeLog merge driver' - git config merge.merge-changelog.driver 'git-merge-changelog %O %A %B' -@@ -587,8 +625,8 @@ - # Note that $use_git is necessarily true in this case. - if git_modules_config submodule.gnulib.url >/dev/null; then - echo "$0: getting gnulib files..." -- git submodule init || exit $? -- git submodule update || exit $? -+ git submodule init -- "$gnulib_path" || exit $? -+ git submodule update -- "$gnulib_path" || exit $? - - elif [ ! -d "$gnulib_path" ]; then - echo "$0: getting gnulib files..." -@@ -617,13 +655,14 @@ - # This fallback allows at least git 1.5.5. - if test -f "$gnulib_path"/gnulib-tool; then - # Since file already exists, assume submodule init already complete. -- git submodule update || exit $? -+ git submodule update -- "$gnulib_path" || exit $? - else - # Older git can't clone into an empty directory. - rmdir "$gnulib_path" 2>/dev/null - git clone --reference "$GNULIB_SRCDIR" \ - "$(git_modules_config submodule.gnulib.url)" "$gnulib_path" \ -- && git submodule init && git submodule update \ -+ && git submodule init -- "$gnulib_path" \ -+ && git submodule update -- "$gnulib_path" \ - || exit $? - fi - fi -@@ -751,7 +790,7 @@ - # Leave any existing symlink alone, if it already points to the source, - # so that broken build tools that care about symlink times - # aren't confused into doing unnecessary builds. Conversely, if the -- # existing symlink's time stamp is older than the source, make it afresh, -+ # existing symlink's timestamp is older than the source, make it afresh, - # so that broken tools aren't confused into skipping needed builds. See - # . - test -h "$dst" && -@@ -878,7 +917,8 @@ - esac - fi - echo "$0: $gnulib_tool $gnulib_tool_options --import ..." --$gnulib_tool $gnulib_tool_options --import $gnulib_modules && -+$gnulib_tool $gnulib_tool_options --import $gnulib_modules \ -+ || die "gnulib-tool failed" - - for file in $gnulib_files; do - symlink_to_dir "$GNULIB_SRCDIR" $file \ -@@ -983,6 +1023,6 @@ - # eval: (add-hook 'write-file-hooks '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 -durN inetutils-1.9.4.orig/build-aux/announce-gen inetutils-1.9.4/build-aux/announce-gen ---- inetutils-1.9.4.orig/build-aux/announce-gen 2015-05-12 20:39:15.000000000 +0800 -+++ inetutils-1.9.4/build-aux/announce-gen 1970-01-01 08:00:00.000000000 +0800 -@@ -1,557 +0,0 @@ --eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}' -- & eval 'exec perl -wS "$0" $argv:q' -- if 0; --# Generate a release announcement message. -- --my $VERSION = '2013-07-09 06:39'; # UTC --# The definition above must lie within the first 8 lines in order --# for the Emacs time-stamp write hook (at end) to update it. --# If you change this file with Emacs, please let the write hook --# do its job. Otherwise, update this string manually. -- --# Copyright (C) 2002-2015 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 --# the Free Software Foundation, either version 3 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, see . -- --# Written by Jim Meyering -- --use strict; -- --use Getopt::Long; --use POSIX qw(strftime); -- --(my $ME = $0) =~ s|.*/||; -- --my %valid_release_types = map {$_ => 1} qw (alpha beta stable); --my @archive_suffixes = ('tar.gz', 'tar.bz2', 'tar.lzma', 'tar.xz'); --my %digest_classes = -- ( -- 'md5' => (eval { require Digest::MD5; } and 'Digest::MD5'), -- 'sha1' => ((eval { require Digest::SHA; } and 'Digest::SHA') -- or (eval { require Digest::SHA1; } and 'Digest::SHA1')) -- ); --my $srcdir = '.'; -- --sub usage ($) --{ -- my ($exit_code) = @_; -- my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR); -- if ($exit_code != 0) -- { -- print $STREAM "Try '$ME --help' for more information.\n"; -- } -- else -- { -- my @types = sort keys %valid_release_types; -- print $STREAM < = C -- --Compute the sizes of the C<@file> and return them as a hash. Return --C if one of the computation failed. -- --=cut -- --sub sizes (@) --{ -- my (@file) = @_; -- -- my $fail = 0; -- my %res; -- foreach my $f (@file) -- { -- my $cmd = "du -h $f"; -- my $t = `$cmd`; -- # FIXME-someday: give a better diagnostic, a la $PROCESS_STATUS -- $@ -- and (warn "command failed: '$cmd'\n"), $fail = 1; -- chomp $t; -- $t =~ s/^\s*([\d.]+[MkK]).*/${1}B/; -- $res{$f} = $t; -- } -- return $fail ? undef : %res; --} -- --=item C dedicated to the list of <@file>, which --sizes are stored in C<%size>, and which are available from the C<@url>. -- --=cut -- --sub print_locations ($\@\%@) --{ -- my ($title, $url, $size, @file) = @_; -- print "Here are the $title:\n"; -- foreach my $url (@{$url}) -- { -- for my $file (@file) -- { -- print " $url/$file"; -- print " (", $$size{$file}, ")" -- if exists $$size{$file}; -- print "\n"; -- } -- } -- print "\n"; --} -- --=item C. -- --=cut -- --sub print_checksums (@) --{ -- my (@file) = @_; -- -- print "Here are the MD5 and SHA1 checksums:\n"; -- print "\n"; -- -- foreach my $meth (qw (md5 sha1)) -- { -- my $class = $digest_classes{$meth} or next; -- foreach my $f (@file) -- { -- open IN, '<', $f -- or die "$ME: $f: cannot open for reading: $!\n"; -- binmode IN; -- my $dig = $class->new->addfile(*IN)->hexdigest; -- close IN; -- print "$dig $f\n"; -- } -- } -- print "\n"; --} -- --=item C addressing changes --between versions C<$prev_version> and C<$curr_version>. -- --=cut -- --sub print_news_deltas ($$$) --{ -- my ($news_file, $prev_version, $curr_version) = @_; -- -- my $news_name = $news_file; -- $news_name =~ s|^\Q$srcdir\E/||; -- -- print "\n$news_name\n\n"; -- -- # Print all lines from $news_file, starting with the first one -- # that mentions $curr_version up to but not including -- # the first occurrence of $prev_version. -- my $in_items; -- -- my $re_prefix = qr/(?:\* )?(?:Noteworthy c|Major c|C)(?i:hanges)/; -- -- my $found_news; -- open NEWS, '<', $news_file -- or die "$ME: $news_file: cannot open for reading: $!\n"; -- while (defined (my $line = )) -- { -- if ( ! $in_items) -- { -- # Match lines like these: -- # * Major changes in release 5.0.1: -- # * Noteworthy changes in release 6.6 (2006-11-22) [stable] -- $line =~ /^$re_prefix.*(?:[^\d.]|$)\Q$curr_version\E(?:[^\d.]|$)/o -- or next; -- $in_items = 1; -- print $line; -- } -- else -- { -- # This regexp must not match version numbers in NEWS items. -- # For example, they might well say "introduced in 4.5.5", -- # and we don't want that to match. -- $line =~ /^$re_prefix.*(?:[^\d.]|$)\Q$prev_version\E(?:[^\d.]|$)/o -- and last; -- print $line; -- $line =~ /\S/ -- and $found_news = 1; -- } -- } -- close NEWS; -- -- $in_items -- or die "$ME: $news_file: no matching lines for '$curr_version'\n"; -- $found_news -- or die "$ME: $news_file: no news item found for '$curr_version'\n"; --} -- --sub print_changelog_deltas ($$) --{ -- my ($package_name, $prev_version) = @_; -- -- # Print new ChangeLog entries. -- -- # First find all CVS-controlled ChangeLog files. -- use File::Find; -- my @changelog; -- find ({wanted => sub {$_ eq 'ChangeLog' && -d 'CVS' -- and push @changelog, $File::Find::name}}, -- '.'); -- -- # If there are no ChangeLog files, we're done. -- @changelog -- or return; -- my %changelog = map {$_ => 1} @changelog; -- -- # Reorder the list of files so that if there are ChangeLog -- # files in the specified directories, they're listed first, -- # in this order: -- my @dir = qw ( . src lib m4 config doc ); -- -- # A typical @changelog array might look like this: -- # ./ChangeLog -- # ./po/ChangeLog -- # ./m4/ChangeLog -- # ./lib/ChangeLog -- # ./doc/ChangeLog -- # ./config/ChangeLog -- my @reordered; -- foreach my $d (@dir) -- { -- my $dot_slash = $d eq '.' ? $d : "./$d"; -- my $target = "$dot_slash/ChangeLog"; -- delete $changelog{$target} -- and push @reordered, $target; -- } -- -- # Append any remaining ChangeLog files. -- push @reordered, sort keys %changelog; -- -- # Remove leading './'. -- @reordered = map { s!^\./!!; $_ } @reordered; -- -- print "\nChangeLog entries:\n\n"; -- # print join ("\n", @reordered), "\n"; -- -- $prev_version =~ s/\./_/g; -- my $prev_cvs_tag = "\U$package_name\E-$prev_version"; -- -- my $cmd = "cvs -n diff -u -r$prev_cvs_tag -rHEAD @reordered"; -- open DIFF, '-|', $cmd -- or die "$ME: cannot run '$cmd': $!\n"; -- # Print two types of lines, making minor changes: -- # Lines starting with '+++ ', e.g., -- # +++ ChangeLog 22 Feb 2003 16:52:51 -0000 1.247 -- # and those starting with '+'. -- # Don't print the others. -- my $prev_printed_line_empty = 1; -- while (defined (my $line = )) -- { -- if ($line =~ /^\+\+\+ /) -- { -- my $separator = "*"x70 ."\n"; -- $line =~ s///; -- $line =~ s/\s.*//; -- $prev_printed_line_empty -- or print "\n"; -- print $separator, $line, $separator; -- } -- elsif ($line =~ /^\+/) -- { -- $line =~ s///; -- print $line; -- $prev_printed_line_empty = ($line =~ /^$/); -- } -- } -- close DIFF; -- -- # The exit code should be 1. -- # Allow in case there are no modified ChangeLog entries. -- $? == 256 || $? == 128 -- or warn "warning: '$cmd' had unexpected exit code or signal ($?)\n"; --} -- --sub get_tool_versions ($$) --{ -- my ($tool_list, $gnulib_version) = @_; -- @$tool_list -- or return (); -- -- my $fail; -- my @tool_version_pair; -- foreach my $t (@$tool_list) -- { -- if ($t eq 'gnulib') -- { -- push @tool_version_pair, ucfirst $t . ' ' . $gnulib_version; -- next; -- } -- # Assume that the last "word" on the first line of -- # 'tool --version' output is the version string. -- my ($first_line, undef) = split ("\n", `$t --version`); -- if ($first_line =~ /.* (\d[\w.-]+)$/) -- { -- $t = ucfirst $t; -- push @tool_version_pair, "$t $1"; -- } -- else -- { -- defined $first_line -- and $first_line = ''; -- warn "$t: unexpected --version output\n:$first_line"; -- $fail = 1; -- } -- } -- -- $fail -- and exit 1; -- -- return @tool_version_pair; --} -- --{ -- # Neutralize the locale, so that, for instance, "du" does not -- # issue "1,2" instead of "1.2", what confuses our regexps. -- $ENV{LC_ALL} = "C"; -- -- my $mail_headers; -- my $release_type; -- my $package_name; -- my $prev_version; -- my $curr_version; -- my $gpg_key_id; -- my @url_dir_list; -- my @news_file; -- my $bootstrap_tools; -- my $gnulib_version; -- my $print_checksums_p = 1; -- -- # Reformat the warnings before displaying them. -- local $SIG{__WARN__} = sub -- { -- my ($msg) = @_; -- # Warnings from GetOptions. -- $msg =~ s/Option (\w)/option --$1/; -- warn "$ME: $msg"; -- }; -- -- GetOptions -- ( -- 'mail-headers=s' => \$mail_headers, -- 'release-type=s' => \$release_type, -- 'package-name=s' => \$package_name, -- 'previous-version=s' => \$prev_version, -- 'current-version=s' => \$curr_version, -- 'gpg-key-id=s' => \$gpg_key_id, -- 'url-directory=s' => \@url_dir_list, -- 'news=s' => \@news_file, -- 'srcdir=s' => \$srcdir, -- 'bootstrap-tools=s' => \$bootstrap_tools, -- 'gnulib-version=s' => \$gnulib_version, -- 'print-checksums!' => \$print_checksums_p, -- 'archive-suffix=s' => \@archive_suffixes, -- -- help => sub { usage 0 }, -- version => sub { print "$ME version $VERSION\n"; exit }, -- ) or usage 1; -- -- my $fail = 0; -- # Ensure that each required option is specified. -- $release_type -- or (warn "release type not specified\n"), $fail = 1; -- $package_name -- or (warn "package name not specified\n"), $fail = 1; -- $prev_version -- or (warn "previous version string not specified\n"), $fail = 1; -- $curr_version -- or (warn "current version string not specified\n"), $fail = 1; -- $gpg_key_id -- or (warn "GnuPG key ID not specified\n"), $fail = 1; -- @url_dir_list -- or (warn "URL directory name(s) not specified\n"), $fail = 1; -- -- my @tool_list = split ',', $bootstrap_tools -- if $bootstrap_tools; -- -- grep (/^gnulib$/, @tool_list) ^ defined $gnulib_version -- and (warn "when specifying gnulib as a tool, you must also specify\n" -- . "--gnulib-version=V, where V is the result of running git describe\n" -- . "in the gnulib source directory.\n"), $fail = 1; -- -- !$release_type || exists $valid_release_types{$release_type} -- or (warn "'$release_type': invalid release type\n"), $fail = 1; -- -- @ARGV -- and (warn "too many arguments:\n", join ("\n", @ARGV), "\n"), -- $fail = 1; -- $fail -- and usage 1; -- -- my $my_distdir = "$package_name-$curr_version"; -- -- my $xd = "$package_name-$prev_version-$curr_version.xdelta"; -- -- my @candidates = map { "$my_distdir.$_" } @archive_suffixes; -- my @tarballs = grep {-f $_} @candidates; -- -- @tarballs -- or die "$ME: none of " . join(', ', @candidates) . " were found\n"; -- my @sizable = @tarballs; -- -f $xd -- and push @sizable, $xd; -- my %size = sizes (@sizable); -- %size -- or exit 1; -- -- my $headers = ''; -- if (defined $mail_headers) -- { -- ($headers = $mail_headers) =~ s/\s+(\S+:)/\n$1/g; -- $headers .= "\n"; -- } -- -- # The markup is escaped as <\# so that when this script is sent by -- # mail (or part of a diff), Gnus is not triggered. -- print < -- --FIXME: put comments here -- --EOF -- -- if (@url_dir_list == 1 && @tarballs == 1) -- { -- # When there's only one tarball and one URL, use a more concise form. -- my $m = "$url_dir_list[0]/$tarballs[0]"; -- print "Here are the compressed sources and a GPG detached signature[*]:\n" -- . " $m\n" -- . " $m.sig\n\n"; -- } -- else -- { -- print_locations ("compressed sources", @url_dir_list, %size, @tarballs); -- -f $xd -- and print_locations ("xdelta diffs (useful? if so, " -- . "please tell bug-gnulib\@gnu.org)", -- @url_dir_list, %size, $xd); -- my @sig_files = map { "$_.sig" } @tarballs; -- print_locations ("GPG detached signatures[*]", @url_dir_list, %size, -- @sig_files); -- } -- -- if ($url_dir_list[0] =~ "gnu\.org") -- { -- print "Use a mirror for higher download bandwidth:\n"; -- if (@tarballs == 1 && $url_dir_list[0] =~ m!http://ftp\.gnu\.org/gnu/!) -- { -- (my $m = "$url_dir_list[0]/$tarballs[0]") -- =~ s!http://ftp\.gnu\.org/gnu/!http://ftpmirror\.gnu\.org/!; -- print " $m\n" -- . " $m.sig\n\n"; -- -- } -- else -- { -- print " http://www.gnu.org/order/ftp.html\n\n"; -- } -- } -- -- $print_checksums_p -- and print_checksums (@sizable); -- -- print <. - -@@ -50,7 +50,7 @@ - GNU config.guess ($timestamp) - - Originally written by Per Bothner. --Copyright 1992-2015 Free Software Foundation, Inc. -+Copyright 1992-2017 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." -@@ -186,9 +186,12 @@ - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched -- # to ELF recently, or will in the future. -+ # to ELF recently (or will in the future) and ABI. - case "${UNAME_MACHINE_ARCH}" in -- arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax) -+ earm*) -+ os=netbsdelf -+ ;; -+ arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ELF__ -@@ -221,7 +224,7 @@ - release='-gnu' - ;; - *) -- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` -+ release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: -@@ -237,6 +240,10 @@ - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - 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} -+ exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; -@@ -249,6 +256,9 @@ - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; -+ *:Sortix:*:*) -+ echo ${UNAME_MACHINE}-unknown-sortix -+ exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) -@@ -265,42 +275,42 @@ - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") -- UNAME_MACHINE="alpha" ;; -+ UNAME_MACHINE=alpha ;; - "EV4.5 (21064)") -- UNAME_MACHINE="alpha" ;; -+ UNAME_MACHINE=alpha ;; - "LCA4 (21066/21068)") -- UNAME_MACHINE="alpha" ;; -+ UNAME_MACHINE=alpha ;; - "EV5 (21164)") -- UNAME_MACHINE="alphaev5" ;; -+ UNAME_MACHINE=alphaev5 ;; - "EV5.6 (21164A)") -- UNAME_MACHINE="alphaev56" ;; -+ UNAME_MACHINE=alphaev56 ;; - "EV5.6 (21164PC)") -- UNAME_MACHINE="alphapca56" ;; -+ UNAME_MACHINE=alphapca56 ;; - "EV5.7 (21164PC)") -- UNAME_MACHINE="alphapca57" ;; -+ UNAME_MACHINE=alphapca57 ;; - "EV6 (21264)") -- UNAME_MACHINE="alphaev6" ;; -+ UNAME_MACHINE=alphaev6 ;; - "EV6.7 (21264A)") -- UNAME_MACHINE="alphaev67" ;; -+ UNAME_MACHINE=alphaev67 ;; - "EV6.8CB (21264C)") -- UNAME_MACHINE="alphaev68" ;; -+ UNAME_MACHINE=alphaev68 ;; - "EV6.8AL (21264B)") -- UNAME_MACHINE="alphaev68" ;; -+ UNAME_MACHINE=alphaev68 ;; - "EV6.8CX (21264D)") -- UNAME_MACHINE="alphaev68" ;; -+ UNAME_MACHINE=alphaev68 ;; - "EV6.9A (21264/EV69A)") -- UNAME_MACHINE="alphaev69" ;; -+ UNAME_MACHINE=alphaev69 ;; - "EV7 (21364)") -- UNAME_MACHINE="alphaev7" ;; -+ UNAME_MACHINE=alphaev7 ;; - "EV7.9 (21364A)") -- UNAME_MACHINE="alphaev79" ;; -+ UNAME_MACHINE=alphaev79 ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # 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 -@@ -373,16 +383,16 @@ - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build -- SUN_ARCH="i386" -+ 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. - # This test works for both compilers. -- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then -+ if [ "$CC_FOR_BUILD" != no_compiler_found ]; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ -- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ -+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then -- SUN_ARCH="x86_64" -+ SUN_ARCH=x86_64 - fi - fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -@@ -407,7 +417,7 @@ - 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} -@@ -632,13 +642,13 @@ - 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 -- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 -- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 -+ 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 -- 32) HP_ARCH="hppa2.0n" ;; -- 64) HP_ARCH="hppa2.0w" ;; -- '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 -+ 32) HP_ARCH=hppa2.0n ;; -+ 64) HP_ARCH=hppa2.0w ;; -+ '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 - esac ;; - esac - fi -@@ -677,11 +687,11 @@ - 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 - -@@ -694,12 +704,12 @@ - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - -- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | -+ if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | - grep -q __LP64__ - then -- HP_ARCH="hppa2.0w" -+ HP_ARCH=hppa2.0w - else -- HP_ARCH="hppa64" -+ HP_ARCH=hppa64 - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} -@@ -804,14 +814,14 @@ - 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_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` -+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | 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_SYS=`uname -p | 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:*:*) -@@ -827,10 +837,11 @@ - UNAME_PROCESSOR=`/usr/bin/uname -p` - 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 -@@ -893,7 +904,7 @@ - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland -- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``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 -@@ -916,7 +927,7 @@ - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 -- if test "$?" = 0 ; then LIBC="gnulibc1" ; fi -+ if test "$?" = 0 ; then LIBC=gnulibc1 ; fi - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - arc:Linux:*:* | arceb:Linux:*:*) -@@ -962,6 +973,9 @@ - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; -+ k1om:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} -+ exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; -@@ -987,6 +1001,9 @@ - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } - ;; -+ mips64el:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} -+ exit ;; - openrisc*:Linux:*:*) - echo or1k-unknown-linux-${LIBC} - exit ;; -@@ -1019,6 +1036,9 @@ - ppcle:Linux:*:*) - 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} - exit ;; -@@ -1038,7 +1058,7 @@ - echo ${UNAME_MACHINE}-dec-linux-${LIBC} - exit ;; - x86_64:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-${LIBC} -+ echo ${UNAME_MACHINE}-pc-linux-${LIBC} - exit ;; - xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} -@@ -1117,7 +1137,7 @@ - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. - # Note: whatever this is, it MUST be the same as what config.sub -- # prints for the "djgpp" host, or else GDB configury will decide that -+ # prints for the "djgpp" host, or else GDB configure will decide that - # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; -@@ -1266,6 +1286,9 @@ - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; -+ SX-ACE:SUPER-UX:*:*) -+ echo sxace-nec-superux${UNAME_RELEASE} -+ exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; -@@ -1279,9 +1302,9 @@ - UNAME_PROCESSOR=powerpc - fi - if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then -- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; 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) | \ -+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - case $UNAME_PROCESSOR in -@@ -1303,7 +1326,7 @@ - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` -- if test "$UNAME_PROCESSOR" = "x86"; then -+ if test "$UNAME_PROCESSOR" = x86; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi -@@ -1312,15 +1335,18 @@ - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; -- NEO-?:NONSTOP_KERNEL:*:*) -+ NEO-*:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk${UNAME_RELEASE} - exit ;; - NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; -- NSR-?:NONSTOP_KERNEL:*:*) -+ NSR-*:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; -+ NSX-*:NONSTOP_KERNEL:*:*) -+ echo nsx-tandem-nsk${UNAME_RELEASE} -+ exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; -@@ -1334,7 +1360,7 @@ - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. -- if test "$cputype" = "386"; then -+ if test "$cputype" = 386; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" -@@ -1376,7 +1402,7 @@ - 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 -@@ -1387,23 +1413,25 @@ - x86_64:VMkernel:*:*) - echo ${UNAME_MACHINE}-unknown-esx - exit ;; -+ amd64:Isilon\ OneFS:*:*) -+ echo x86_64-unknown-onefs -+ exit ;; - esac - - cat >&2 < 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 - -diff -durN inetutils-1.9.4.orig/build-aux/config.rpath inetutils-1.9.4/build-aux/config.rpath ---- inetutils-1.9.4.orig/build-aux/config.rpath 2015-03-31 15:07:23.000000000 +0800 -+++ inetutils-1.9.4/build-aux/config.rpath 2017-05-15 17:50:55.859375000 +0800 -@@ -2,7 +2,7 @@ - # Output a system dependent set of variables, describing how to set the - # run time search path of shared libraries in an executable. - # --# Copyright 1996-2015 Free Software Foundation, Inc. -+# Copyright 1996-2017 Free Software Foundation, Inc. - # Taken from GNU libtool, 2001 - # Originally by Gordon Matzigkeit , 1996 - # -diff -durN inetutils-1.9.4.orig/build-aux/config.sub inetutils-1.9.4/build-aux/config.sub ---- inetutils-1.9.4.orig/build-aux/config.sub 2015-03-19 23:28:31.000000000 +0800 -+++ inetutils-1.9.4/build-aux/config.sub 2017-05-15 11:01:15.078125000 +0800 -@@ -1,8 +1,8 @@ - #! /bin/sh - # Configuration validation subroutine script. --# Copyright 1992-2015 Free Software Foundation, Inc. -+# Copyright 1992-2017 Free Software Foundation, Inc. - --timestamp='2015-03-08' -+timestamp='2017-04-02' - - # 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 -@@ -33,7 +33,7 @@ - # 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;hb=HEAD -+# http://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 -@@ -53,8 +53,7 @@ - me=`echo "$0" | sed -e 's,.*/,,'` - - usage="\ --Usage: $0 [OPTION] CPU-MFR-OPSYS -- $0 [OPTION] ALIAS -+Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS - - Canonicalize a configuration name. - -@@ -68,7 +67,7 @@ - version="\ - GNU config.sub ($timestamp) - --Copyright 1992-2015 Free Software Foundation, Inc. -+Copyright 1992-2017 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." -@@ -118,7 +117,7 @@ - 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* | \ -+ kopensolaris*-gnu* | cloudabi*-eabi* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` -@@ -255,6 +254,7 @@ - | 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 \ -@@ -263,7 +263,7 @@ - | fido | fr30 | frv | ft32 \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | hexagon \ -- | i370 | i860 | i960 | ia64 \ -+ | i370 | i860 | i960 | ia16 | ia64 \ - | ip2k | iq2000 \ - | k1om \ - | le32 | le64 \ -@@ -301,11 +301,12 @@ - | open8 | or1k | or1knd | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle \ -+ | pru \ - | pyramid \ - | riscv32 | riscv64 \ - | rl78 | rx \ - | score \ -- | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ -+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ -@@ -314,6 +315,7 @@ - | ubicom32 \ - | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ - | visium \ -+ | wasm32 \ - | we32k \ - | x86 | xc16x | xstormy16 | xtensa \ - | z8k | z80) -@@ -376,6 +378,7 @@ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ -+ | ba-* \ - | be32-* | be64-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* \ -@@ -386,7 +389,7 @@ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | hexagon-* \ -- | i*86-* | i860-* | i960-* | ia64-* \ -+ | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ - | ip2k-* | iq2000-* \ - | k1om-* \ - | le32-* | le64-* \ -@@ -427,13 +430,15 @@ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ -+ | pru-* \ - | 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?-* \ -+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ - | tahoe-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile*-* \ -@@ -442,6 +447,7 @@ - | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ - | vax-* \ - | visium-* \ -+ | wasm32-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* \ - | xstormy16-* | xtensa*-* \ -@@ -518,7 +524,7 @@ - basic_machine=i386-pc - os=-aros - ;; -- asmjs) -+ asmjs) - basic_machine=asmjs-unknown - ;; - aux) -@@ -641,6 +647,14 @@ - basic_machine=m68k-bull - os=-sysv3 - ;; -+ e500v[12]) -+ basic_machine=powerpc-unknown -+ os=$os"spe" -+ ;; -+ e500v[12]-*) -+ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=$os"spe" -+ ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon -@@ -936,6 +950,9 @@ - nsr-tandem) - basic_machine=nsr-tandem - ;; -+ nsx-tandem) -+ basic_machine=nsx-tandem -+ ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf -@@ -1020,7 +1037,7 @@ - ppc-* | ppcbe-*) - basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; -- ppcle | powerpclittle | ppc-le | powerpc-little) -+ ppcle | powerpclittle) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) -@@ -1030,7 +1047,7 @@ - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; -- ppc64le | powerpc64little | ppc64-le | powerpc64-little) -+ ppc64le | powerpc64little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) -@@ -1231,6 +1248,9 @@ - basic_machine=a29k-wrs - os=-vxworks - ;; -+ wasm32) -+ basic_machine=wasm32-unknown -+ ;; - w65*) - basic_machine=w65-wdc - os=-none -@@ -1376,18 +1396,18 @@ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* | -plan9* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ -- | -aos* | -aros* | -cloudabi* \ -+ | -aos* | -aros* | -cloudabi* | -sortix* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ -- | -bitrig* | -openbsd* | -solidbsd* \ -+ | -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* \ -+ | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ - | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ -- | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ -+ | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-musl* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ -@@ -1396,7 +1416,8 @@ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ -- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) -+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ -+ | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) -@@ -1528,6 +1549,8 @@ - ;; - -nacl*) - ;; -+ -ios) -+ ;; - -none) - ;; - *) -@@ -1623,6 +1646,9 @@ - sparc-* | *-sun) - os=-sunos4.1.1 - ;; -+ pru-*) -+ os=-elf -+ ;; - *-be) - os=-beos - ;; -diff -durN inetutils-1.9.4.orig/build-aux/depcomp inetutils-1.9.4/build-aux/depcomp ---- inetutils-1.9.4.orig/build-aux/depcomp 2015-01-08 01:26:56.000000000 +0800 -+++ inetutils-1.9.4/build-aux/depcomp 2017-05-15 11:01:15.093750000 +0800 -@@ -1,9 +1,9 @@ - #! /bin/sh - # depcomp - compile a program generating dependencies as side-effects - --scriptversion=2013-05-30.07; # UTC -+scriptversion=2016-01-11.22; # UTC - --# Copyright (C) 1999-2015 Free Software Foundation, Inc. -+# Copyright (C) 1999-2017 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 -@@ -751,6 +751,6 @@ - # eval: (add-hook 'write-file-hooks '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 -durN inetutils-1.9.4.orig/build-aux/gendocs.sh inetutils-1.9.4/build-aux/gendocs.sh ---- inetutils-1.9.4.orig/build-aux/gendocs.sh 2015-05-12 20:15:28.000000000 +0800 -+++ inetutils-1.9.4/build-aux/gendocs.sh 2017-05-15 17:50:56.031250000 +0800 -@@ -2,9 +2,9 @@ - # gendocs.sh -- generate a GNU manual in many formats. This script is - # mentioned in maintain.texi. See the help message below for usage details. - --scriptversion=2015-05-05.16 -+scriptversion=2016-12-31.18 - --# Copyright 2003-2015 Free Software Foundation, Inc. -+# Copyright 2003-2017 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 -@@ -52,9 +52,27 @@ - unset CDPATH - unset use_texi2html - -+MANUAL_TITLE= -+PACKAGE= -+EMAIL=webmasters@gnu.org # please override with --email -+commonarg= # passed to all makeinfo/texi2html invcations. -+dirargs= # passed to all tools (-I dir). -+dirs= # -I directories. -+htmlarg="--css-ref=/software/gnulib/manual.css -c TOP_NODE_UP_URL=/manual" -+infoarg=--no-split -+generate_ascii=true -+generate_html=true -+generate_info=true -+generate_tex=true -+outdir=manual -+source_extra= -+split=node -+srcfile= -+texarg="-t @finalout" -+ - version="gendocs.sh $scriptversion - --Copyright 2015 Free Software Foundation, Inc. -+Copyright 2017 Free Software Foundation, Inc. - There is NO warranty. You may redistribute this software - under the terms of the GNU General Public License. - For more information about these matters, see the files named COPYING." -@@ -74,7 +92,7 @@ - -I DIR append DIR to the Texinfo search path. - --common ARG pass ARG in all invocations. - --html ARG pass ARG to makeinfo or texi2html for HTML targets, -- instead of --css-ref=/software/gnulib/manual.css. -+ instead of '$htmlarg'. - --info ARG pass ARG to makeinfo for Info, instead of --no-split. - --no-ascii skip generating the plain text output. - --no-html skip generating the html output. -@@ -137,24 +155,6 @@ - Email bug reports or enhancement requests to bug-gnulib@gnu.org. - " - --MANUAL_TITLE= --PACKAGE= --EMAIL=webmasters@gnu.org # please override with --email --commonarg= # passed to all makeinfo/texi2html invcations. --dirargs= # passed to all tools (-I dir). --dirs= # -I directories. --htmlarg=--css-ref=/software/gnulib/manual.css --infoarg=--no-split --generate_ascii=true --generate_html=true --generate_info=true --generate_tex=true --outdir=manual --source_extra= --split=node --srcfile= --texarg="-t @finalout" -- - while test $# -gt 0; do - case $1 in - -s) shift; srcfile=$1;; -diff -durN inetutils-1.9.4.orig/build-aux/git-version-gen inetutils-1.9.4/build-aux/git-version-gen ---- inetutils-1.9.4.orig/build-aux/git-version-gen 2015-03-31 15:07:23.000000000 +0800 -+++ inetutils-1.9.4/build-aux/git-version-gen 2017-05-15 17:50:56.187500000 +0800 -@@ -1,8 +1,8 @@ - #!/bin/sh - # Print a version string. --scriptversion=2014-12-02.19; # UTC -+scriptversion=2017-01-09.19; # UTC - --# Copyright (C) 2007-2015 Free Software Foundation, Inc. -+# Copyright (C) 2007-2017 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 -@@ -101,8 +101,8 @@ - case $1 in - --help) echo "$usage"; exit 0;; - --version) echo "$version"; exit 0;; -- --prefix) shift; prefix="$1";; -- --fallback) shift; fallback="$1";; -+ --prefix) shift; prefix=${1?};; -+ --fallback) shift; fallback=${1?};; - -*) - echo "$0: Unknown option '$1'." >&2 - echo "$0: Try '--help' for more information." >&2 -@@ -200,7 +200,7 @@ - # string we're using came from git. I.e., skip the test if it's "UNKNOWN" - # or if it came from .tarball-version. - if test "x$v_from_git" != x; then -- # Don't declare a version "dirty" merely because a time stamp has changed. -+ # Don't declare a version "dirty" merely because a timestamp has changed. - git update-index --refresh > /dev/null 2>&1 - - dirty=`exec 2>/dev/null;git diff-index --name-only HEAD` || dirty= -@@ -221,6 +221,6 @@ - # eval: (add-hook 'write-file-hooks '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 -durN inetutils-1.9.4.orig/build-aux/gnupload inetutils-1.9.4/build-aux/gnupload ---- inetutils-1.9.4.orig/build-aux/gnupload 2015-03-31 15:07:23.000000000 +0800 -+++ inetutils-1.9.4/build-aux/gnupload 2017-05-15 17:50:56.437500000 +0800 -@@ -1,9 +1,9 @@ - #!/bin/sh - # Sign files and upload them. - --scriptversion=2013-03-19.17; # UTC -+scriptversion=2016-01-11.22; # UTC - --# Copyright (C) 2004-2015 Free Software Foundation, Inc. -+# Copyright (C) 2004-2017 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 -@@ -435,6 +435,6 @@ - # eval: (add-hook 'write-file-hooks '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 -durN inetutils-1.9.4.orig/build-aux/install-sh inetutils-1.9.4/build-aux/install-sh ---- inetutils-1.9.4.orig/build-aux/install-sh 2014-09-30 18:46:30.000000000 +0800 -+++ inetutils-1.9.4/build-aux/install-sh 2017-05-15 11:01:15.093750000 +0800 -@@ -1,7 +1,7 @@ - #!/bin/sh - # install - install a program, script, or datafile - --scriptversion=2013-12-25.23; # UTC -+scriptversion=2016-01-11.22; # UTC - - # This originates from X11R5 (mit/util/scripts/install.sh), which was - # later released in X11R6 (xc/config/util/install.sh) with the -@@ -496,6 +496,6 @@ - # eval: (add-hook 'write-file-hooks '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 -durN inetutils-1.9.4.orig/build-aux/mdate-sh inetutils-1.9.4/build-aux/mdate-sh ---- inetutils-1.9.4.orig/build-aux/mdate-sh 2015-01-08 01:26:56.000000000 +0800 -+++ inetutils-1.9.4/build-aux/mdate-sh 2017-05-15 11:01:15.109375000 +0800 -@@ -1,9 +1,9 @@ - #!/bin/sh - # Get modification time of a file or directory and pretty-print it. - --scriptversion=2010-08-21.06; # UTC -+scriptversion=2016-01-11.22; # UTC - --# Copyright (C) 1995-2015 Free Software Foundation, Inc. -+# Copyright (C) 1995-2017 Free Software Foundation, Inc. - # written by Ulrich Drepper , June 1995 - # - # This program is free software; you can redistribute it and/or modify -@@ -219,6 +219,6 @@ - # eval: (add-hook 'write-file-hooks '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 -durN inetutils-1.9.4.orig/build-aux/snippet/_Noreturn.h inetutils-1.9.4/build-aux/snippet/_Noreturn.h ---- inetutils-1.9.4.orig/build-aux/snippet/_Noreturn.h 2015-05-12 20:14:19.000000000 +0800 -+++ inetutils-1.9.4/build-aux/snippet/_Noreturn.h 1970-01-01 08:00:00.000000000 +0800 -@@ -1,10 +0,0 @@ --#if !defined _Noreturn && __STDC_VERSION__ < 201112 --# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ -- || 0x5110 <= __SUNPRO_C) --# define _Noreturn __attribute__ ((__noreturn__)) --# elif 1200 <= _MSC_VER --# define _Noreturn __declspec (noreturn) --# else --# define _Noreturn --# endif --#endif -diff -durN inetutils-1.9.4.orig/build-aux/snippet/arg-nonnull.h inetutils-1.9.4/build-aux/snippet/arg-nonnull.h ---- inetutils-1.9.4.orig/build-aux/snippet/arg-nonnull.h 2015-05-12 20:14:19.000000000 +0800 -+++ inetutils-1.9.4/build-aux/snippet/arg-nonnull.h 1970-01-01 08:00:00.000000000 +0800 -@@ -1,26 +0,0 @@ --/* A C macro for declaring that specific arguments must not be NULL. -- Copyright (C) 2009-2015 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 the Free Software Foundation; either version 3 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, see . */ -- --/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools -- that the values passed as arguments n, ..., m must be non-NULL pointers. -- n = 1 stands for the first argument, n = 2 for the second argument etc. */ --#ifndef _GL_ARG_NONNULL --# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 --# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) --# else --# define _GL_ARG_NONNULL(params) --# endif --#endif -diff -durN inetutils-1.9.4.orig/build-aux/snippet/c++defs.h inetutils-1.9.4/build-aux/snippet/c++defs.h ---- inetutils-1.9.4.orig/build-aux/snippet/c++defs.h 2015-05-12 20:14:19.000000000 +0800 -+++ inetutils-1.9.4/build-aux/snippet/c++defs.h 1970-01-01 08:00:00.000000000 +0800 -@@ -1,271 +0,0 @@ --/* C++ compatible function declaration macros. -- Copyright (C) 2010-2015 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 the Free Software Foundation; either version 3 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, see . */ -- --#ifndef _GL_CXXDEFS_H --#define _GL_CXXDEFS_H -- --/* The three most frequent use cases of these macros are: -- -- * For providing a substitute for a function that is missing on some -- platforms, but is declared and works fine on the platforms on which -- it exists: -- -- #if @GNULIB_FOO@ -- # if !@HAVE_FOO@ -- _GL_FUNCDECL_SYS (foo, ...); -- # endif -- _GL_CXXALIAS_SYS (foo, ...); -- _GL_CXXALIASWARN (foo); -- #elif defined GNULIB_POSIXCHECK -- ... -- #endif -- -- * For providing a replacement for a function that exists on all platforms, -- but is broken/insufficient and needs to be replaced on some platforms: -- -- #if @GNULIB_FOO@ -- # if @REPLACE_FOO@ -- # if !(defined __cplusplus && defined GNULIB_NAMESPACE) -- # undef foo -- # define foo rpl_foo -- # endif -- _GL_FUNCDECL_RPL (foo, ...); -- _GL_CXXALIAS_RPL (foo, ...); -- # else -- _GL_CXXALIAS_SYS (foo, ...); -- # endif -- _GL_CXXALIASWARN (foo); -- #elif defined GNULIB_POSIXCHECK -- ... -- #endif -- -- * For providing a replacement for a function that exists on some platforms -- but is broken/insufficient and needs to be replaced on some of them and -- is additionally either missing or undeclared on some other platforms: -- -- #if @GNULIB_FOO@ -- # if @REPLACE_FOO@ -- # if !(defined __cplusplus && defined GNULIB_NAMESPACE) -- # undef foo -- # define foo rpl_foo -- # endif -- _GL_FUNCDECL_RPL (foo, ...); -- _GL_CXXALIAS_RPL (foo, ...); -- # else -- # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ -- _GL_FUNCDECL_SYS (foo, ...); -- # endif -- _GL_CXXALIAS_SYS (foo, ...); -- # endif -- _GL_CXXALIASWARN (foo); -- #elif defined GNULIB_POSIXCHECK -- ... -- #endif --*/ -- --/* _GL_EXTERN_C declaration; -- performs the declaration with C linkage. */ --#if defined __cplusplus --# define _GL_EXTERN_C extern "C" --#else --# define _GL_EXTERN_C extern --#endif -- --/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); -- declares a replacement function, named rpl_func, with the given prototype, -- consisting of return type, parameters, and attributes. -- Example: -- _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) -- _GL_ARG_NONNULL ((1))); -- */ --#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ -- _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) --#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ -- _GL_EXTERN_C rettype rpl_func parameters_and_attributes -- --/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); -- declares the system function, named func, with the given prototype, -- consisting of return type, parameters, and attributes. -- Example: -- _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) -- _GL_ARG_NONNULL ((1))); -- */ --#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ -- _GL_EXTERN_C rettype func parameters_and_attributes -- --/* _GL_CXXALIAS_RPL (func, rettype, parameters); -- declares a C++ alias called GNULIB_NAMESPACE::func -- that redirects to rpl_func, if GNULIB_NAMESPACE is defined. -- Example: -- _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); -- */ --#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ -- _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) --#if defined __cplusplus && defined GNULIB_NAMESPACE --# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ -- namespace GNULIB_NAMESPACE \ -- { \ -- rettype (*const func) parameters = ::rpl_func; \ -- } \ -- _GL_EXTERN_C int _gl_cxxalias_dummy --#else --# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ -- _GL_EXTERN_C int _gl_cxxalias_dummy --#endif -- --/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); -- is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); -- except that the C function rpl_func may have a slightly different -- declaration. A cast is used to silence the "invalid conversion" error -- that would otherwise occur. */ --#if defined __cplusplus && defined GNULIB_NAMESPACE --# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ -- namespace GNULIB_NAMESPACE \ -- { \ -- rettype (*const func) parameters = \ -- reinterpret_cast(::rpl_func); \ -- } \ -- _GL_EXTERN_C int _gl_cxxalias_dummy --#else --# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ -- _GL_EXTERN_C int _gl_cxxalias_dummy --#endif -- --/* _GL_CXXALIAS_SYS (func, rettype, parameters); -- declares a C++ alias called GNULIB_NAMESPACE::func -- that redirects to the system provided function func, if GNULIB_NAMESPACE -- is defined. -- Example: -- _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); -- */ --#if defined __cplusplus && defined GNULIB_NAMESPACE -- /* If we were to write -- rettype (*const func) parameters = ::func; -- like above in _GL_CXXALIAS_RPL_1, the compiler could optimize calls -- better (remove an indirection through a 'static' pointer variable), -- but then the _GL_CXXALIASWARN macro below would cause a warning not only -- for uses of ::func but also for uses of GNULIB_NAMESPACE::func. */ --# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ -- namespace GNULIB_NAMESPACE \ -- { \ -- static rettype (*func) parameters = ::func; \ -- } \ -- _GL_EXTERN_C int _gl_cxxalias_dummy --#else --# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ -- _GL_EXTERN_C int _gl_cxxalias_dummy --#endif -- --/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); -- is like _GL_CXXALIAS_SYS (func, rettype, parameters); -- except that the C function func may have a slightly different declaration. -- A cast is used to silence the "invalid conversion" error that would -- otherwise occur. */ --#if defined __cplusplus && defined GNULIB_NAMESPACE --# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ -- namespace GNULIB_NAMESPACE \ -- { \ -- static rettype (*func) parameters = \ -- reinterpret_cast(::func); \ -- } \ -- _GL_EXTERN_C int _gl_cxxalias_dummy --#else --# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ -- _GL_EXTERN_C int _gl_cxxalias_dummy --#endif -- --/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); -- is like _GL_CXXALIAS_SYS (func, rettype, parameters); -- except that the C function is picked among a set of overloaded functions, -- namely the one with rettype2 and parameters2. Two consecutive casts -- are used to silence the "cannot find a match" and "invalid conversion" -- errors that would otherwise occur. */ --#if defined __cplusplus && defined GNULIB_NAMESPACE -- /* The outer cast must be a reinterpret_cast. -- The inner cast: When the function is defined as a set of overloaded -- functions, it works as a static_cast<>, choosing the designated variant. -- When the function is defined as a single variant, it works as a -- reinterpret_cast<>. The parenthesized cast syntax works both ways. */ --# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ -- namespace GNULIB_NAMESPACE \ -- { \ -- static rettype (*func) parameters = \ -- reinterpret_cast( \ -- (rettype2(*)parameters2)(::func)); \ -- } \ -- _GL_EXTERN_C int _gl_cxxalias_dummy --#else --# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ -- _GL_EXTERN_C int _gl_cxxalias_dummy --#endif -- --/* _GL_CXXALIASWARN (func); -- causes a warning to be emitted when ::func is used but not when -- GNULIB_NAMESPACE::func is used. func must be defined without overloaded -- variants. */ --#if defined __cplusplus && defined GNULIB_NAMESPACE --# define _GL_CXXALIASWARN(func) \ -- _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) --# define _GL_CXXALIASWARN_1(func,namespace) \ -- _GL_CXXALIASWARN_2 (func, namespace) --/* To work around GCC bug , -- we enable the warning only when not optimizing. */ --# if !__OPTIMIZE__ --# define _GL_CXXALIASWARN_2(func,namespace) \ -- _GL_WARN_ON_USE (func, \ -- "The symbol ::" #func " refers to the system function. " \ -- "Use " #namespace "::" #func " instead.") --# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING --# define _GL_CXXALIASWARN_2(func,namespace) \ -- extern __typeof__ (func) func --# else --# define _GL_CXXALIASWARN_2(func,namespace) \ -- _GL_EXTERN_C int _gl_cxxalias_dummy --# endif --#else --# define _GL_CXXALIASWARN(func) \ -- _GL_EXTERN_C int _gl_cxxalias_dummy --#endif -- --/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); -- causes a warning to be emitted when the given overloaded variant of ::func -- is used but not when GNULIB_NAMESPACE::func is used. */ --#if defined __cplusplus && defined GNULIB_NAMESPACE --# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ -- _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ -- GNULIB_NAMESPACE) --# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ -- _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) --/* To work around GCC bug , -- we enable the warning only when not optimizing. */ --# if !__OPTIMIZE__ --# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ -- _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ -- "The symbol ::" #func " refers to the system function. " \ -- "Use " #namespace "::" #func " instead.") --# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING --# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ -- extern __typeof__ (func) func --# else --# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ -- _GL_EXTERN_C int _gl_cxxalias_dummy --# endif --#else --# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ -- _GL_EXTERN_C int _gl_cxxalias_dummy --#endif -- --#endif /* _GL_CXXDEFS_H */ -diff -durN inetutils-1.9.4.orig/build-aux/snippet/unused-parameter.h inetutils-1.9.4/build-aux/snippet/unused-parameter.h ---- inetutils-1.9.4.orig/build-aux/snippet/unused-parameter.h 2015-05-12 20:14:19.000000000 +0800 -+++ inetutils-1.9.4/build-aux/snippet/unused-parameter.h 1970-01-01 08:00:00.000000000 +0800 -@@ -1,36 +0,0 @@ --/* A C macro for declaring that specific function parameters are not used. -- Copyright (C) 2008-2015 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 the Free Software Foundation; either version 3 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, see . */ -- --/* _GL_UNUSED_PARAMETER is a marker that can be appended to function parameter -- declarations for parameters that are not used. This helps to reduce -- warnings, such as from GCC -Wunused-parameter. The syntax is as follows: -- type param _GL_UNUSED_PARAMETER -- or more generally -- param_decl _GL_UNUSED_PARAMETER -- For example: -- int param _GL_UNUSED_PARAMETER -- int *(*param)(void) _GL_UNUSED_PARAMETER -- Other possible, but obscure and discouraged syntaxes: -- int _GL_UNUSED_PARAMETER *(*param)(void) -- _GL_UNUSED_PARAMETER int *(*param)(void) -- */ --#ifndef _GL_UNUSED_PARAMETER --# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) --# define _GL_UNUSED_PARAMETER __attribute__ ((__unused__)) --# else --# define _GL_UNUSED_PARAMETER --# endif --#endif -diff -durN inetutils-1.9.4.orig/build-aux/snippet/warn-on-use.h inetutils-1.9.4/build-aux/snippet/warn-on-use.h ---- inetutils-1.9.4.orig/build-aux/snippet/warn-on-use.h 2015-05-12 20:14:19.000000000 +0800 -+++ inetutils-1.9.4/build-aux/snippet/warn-on-use.h 1970-01-01 08:00:00.000000000 +0800 -@@ -1,109 +0,0 @@ --/* A C macro for emitting warnings if a function is used. -- Copyright (C) 2010-2015 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 the Free Software Foundation; either version 3 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, see . */ -- --/* _GL_WARN_ON_USE (function, "literal string") issues a declaration -- for FUNCTION which will then trigger a compiler warning containing -- the text of "literal string" anywhere that function is called, if -- supported by the compiler. If the compiler does not support this -- feature, the macro expands to an unused extern declaration. -- -- This macro is useful for marking a function as a potential -- portability trap, with the intent that "literal string" include -- instructions on the replacement function that should be used -- instead. However, one of the reasons that a function is a -- portability trap is if it has the wrong signature. Declaring -- FUNCTION with a different signature in C is a compilation error, so -- this macro must use the same type as any existing declaration so -- that programs that avoid the problematic FUNCTION do not fail to -- compile merely because they included a header that poisoned the -- function. But this implies that _GL_WARN_ON_USE is only safe to -- use if FUNCTION is known to already have a declaration. Use of -- this macro implies that there must not be any other macro hiding -- the declaration of FUNCTION; but undefining FUNCTION first is part -- of the poisoning process anyway (although for symbols that are -- provided only via a macro, the result is a compilation error rather -- than a warning containing "literal string"). Also note that in -- C++, it is only safe to use if FUNCTION has no overloads. -- -- For an example, it is possible to poison 'getline' by: -- - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], -- [getline]) in configure.ac, which potentially defines -- HAVE_RAW_DECL_GETLINE -- - adding this code to a header that wraps the system : -- #undef getline -- #if HAVE_RAW_DECL_GETLINE -- _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" -- "not universally present; use the gnulib module getline"); -- #endif -- -- It is not possible to directly poison global variables. But it is -- possible to write a wrapper accessor function, and poison that -- (less common usage, like &environ, will cause a compilation error -- rather than issue the nice warning, but the end result of informing -- the developer about their portability problem is still achieved): -- #if HAVE_RAW_DECL_ENVIRON -- static char ***rpl_environ (void) { return &environ; } -- _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); -- # undef environ -- # define environ (*rpl_environ ()) -- #endif -- */ --#ifndef _GL_WARN_ON_USE -- --# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) --/* A compiler attribute is available in gcc versions 4.3.0 and later. */ --# define _GL_WARN_ON_USE(function, message) \ --extern __typeof__ (function) function __attribute__ ((__warning__ (message))) --# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING --/* Verify the existence of the function. */ --# define _GL_WARN_ON_USE(function, message) \ --extern __typeof__ (function) function --# else /* Unsupported. */ --# define _GL_WARN_ON_USE(function, message) \ --_GL_WARN_EXTERN_C int _gl_warn_on_use --# endif --#endif -- --/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") -- is like _GL_WARN_ON_USE (function, "string"), except that the function is -- declared with the given prototype, consisting of return type, parameters, -- and attributes. -- This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does -- not work in this case. */ --#ifndef _GL_WARN_ON_USE_CXX --# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) --# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ --extern rettype function parameters_and_attributes \ -- __attribute__ ((__warning__ (msg))) --# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING --/* Verify the existence of the function. */ --# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ --extern rettype function parameters_and_attributes --# else /* Unsupported. */ --# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ --_GL_WARN_EXTERN_C int _gl_warn_on_use --# endif --#endif -- --/* _GL_WARN_EXTERN_C declaration; -- performs the declaration with C linkage. */ --#ifndef _GL_WARN_EXTERN_C --# if defined __cplusplus --# define _GL_WARN_EXTERN_C extern "C" --# else --# define _GL_WARN_EXTERN_C extern --# endif --#endif -diff -durN inetutils-1.9.4.orig/build-aux/texinfo.tex inetutils-1.9.4/build-aux/texinfo.tex ---- inetutils-1.9.4.orig/build-aux/texinfo.tex 2015-06-04 20:31:32.000000000 +0800 -+++ inetutils-1.9.4/build-aux/texinfo.tex 2017-05-15 11:01:15.203125000 +0800 -@@ -3,11 +3,11 @@ - % Load plain if necessary, i.e., if running under initex. - \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi - % --\def\texinfoversion{2015-06-01.15} -+\def\texinfoversion{2017-04-14.11} - % - % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, - % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, --% 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 -+% 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 - % Free Software Foundation, Inc. - % - % This texinfo.tex file is free software: you can redistribute it and/or -@@ -67,6 +67,10 @@ - \everyjob{\message{[Texinfo version \texinfoversion]}% - \catcode`+=\active \catcode`\_=\active} - -+% LaTeX's \typeout. This ensures that the messages it is used for -+% are identical in format to the corresponding ones from latex/pdflatex. -+\def\typeout{\immediate\write17}% -+ - \chardef\other=12 - - % We never want plain's \outer definition of \+ in Texinfo. -@@ -158,22 +162,13 @@ - \ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi - \ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi - --% Since the category of space is not known, we have to be careful. --\chardef\spacecat = 10 --\def\spaceisspace{\catcode`\ =\spacecat} -+% Give the space character the catcode for a space. -+\def\spaceisspace{\catcode`\ =10\relax} -+ -+% Likewise for ^^M, the end of line character. -+\def\endlineisspace{\catcode13=10\relax} - --% sometimes characters are active, so we need control sequences. --\chardef\ampChar = `\& --\chardef\colonChar = `\: --\chardef\commaChar = `\, - \chardef\dashChar = `\- --\chardef\dotChar = `\. --\chardef\exclamChar= `\! --\chardef\hashChar = `\# --\chardef\lquoteChar= `\` --\chardef\questChar = `\? --\chardef\rquoteChar= `\' --\chardef\semiChar = `\; - \chardef\slashChar = `\/ - \chardef\underChar = `\_ - -@@ -196,17 +191,6 @@ - wide-spread wrap-around - } - --% Margin to add to right of even pages, to left of odd pages. --\newdimen\bindingoffset --\newdimen\normaloffset --\newdimen\pagewidth \newdimen\pageheight -- --% For a final copy, take out the rectangles --% that mark overfull boxes (in case you have decided --% that the text looks ok even though it passes the margin). --% --\def\finalout{\overfullrule=0pt } -- - % Sometimes it is convenient to have everything in the transcript file - % and nothing on the terminal. We don't just call \tracingall here, - % since that produces some useless output on the terminal. We also make -@@ -251,6 +235,15 @@ - \def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount - \removelastskip\penalty-200\bigskip\fi\fi} - -+% Output routine -+% -+ -+% For a final copy, take out the rectangles -+% that mark overfull boxes (in case you have decided -+% that the text looks ok even though it passes the margin). -+% -+\def\finalout{\overfullrule=0pt } -+ - % Do @cropmarks to get crop marks. - % - \newif\ifcropmarks -@@ -273,10 +266,18 @@ - % - % Another complication is to let the user choose whether \thischapter - % (\thissection) refers to the chapter (section) in effect at the top --% of a page, or that at the bottom of a page. The solution is --% described on page 260 of The TeXbook. It involves outputting two --% marks for the sectioning macros, one before the section break, and --% one after. I won't pretend I can describe this better than DEK... -+% of a page, or that at the bottom of a page. -+ -+% \domark is called twice inside \chapmacro, to add one -+% mark before the section break, and one after. -+% In the second call \prevchapterdefs is the same as \lastchapterdefs, -+% and \prevsectiondefs is the same as \lastsectiondefs. -+% Then if the page is not broken at the mark, some of the previous -+% section appears on the page, and we can get the name of this section -+% from \firstmark for @everyheadingmarks top. -+% @everyheadingmarks bottom uses \botmark. -+% -+% See page 260 of The TeXbook. - \def\domark{% - \toks0=\expandafter{\lastchapterdefs}% - \toks2=\expandafter{\lastsectiondefs}% -@@ -284,11 +285,15 @@ - \toks6=\expandafter{\prevsectiondefs}% - \toks8=\expandafter{\lastcolordefs}% - \mark{% -- \the\toks0 \the\toks2 % 0: top marks (\last...) -- \noexpand\or \the\toks4 \the\toks6 % 1: bottom marks (default, \prev...) -+ \the\toks0 \the\toks2 % 0: marks for @everyheadingmarks top -+ \noexpand\or \the\toks4 \the\toks6 % 1: for @everyheadingmarks bottom - \noexpand\else \the\toks8 % 2: color marks - }% - } -+ -+% \gettopheadingmarks, \getbottomheadingmarks, -+% \getcolormarks - extract needed part of mark. -+% - % \topmark doesn't work for the very first chapter (after the title - % page or the contents), so we use \firstmark there -- this gets us - % the mark with the chapter defs, unless the user sneaks in, e.g., -@@ -309,32 +314,62 @@ - \def\prevsectiondefs{} - \def\lastcolordefs{} - -+% Margin to add to right of even pages, to left of odd pages. -+\newdimen\bindingoffset -+\newdimen\normaloffset -+\newdimen\txipagewidth \newdimen\txipageheight -+ - % Main output routine. -+% - \chardef\PAGE = 255 - \output = {\onepageout{\pagecontents\PAGE}} - - \newbox\headlinebox - \newbox\footlinebox - --% \onepageout takes a vbox as an argument. Note that \pagecontents --% does insertions, but you have to call it yourself. -+% \onepageout takes a vbox as an argument. -+% \shipout a vbox for a single page, adding an optional header, footer, -+% cropmarks, and footnote. This also causes index entries for this page -+% to be written to the auxiliary files. -+% - \def\onepageout#1{% - \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi - % - \ifodd\pageno \advance\hoffset by \bindingoffset - \else \advance\hoffset by -\bindingoffset\fi - % -+ % Common context changes for both heading and footing. - % Do this outside of the \shipout so @code etc. will be expanded in - % the headline as they should be, not taken literally (outputting ''code). -- \def\commmonheadfootline{\let\hsize=\pagewidth \texinfochars} -+ \def\commmonheadfootline{\let\hsize=\txipagewidth \texinfochars} - % -- \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi -- \global\setbox\headlinebox = \vbox{\commmonheadfootline \makeheadline}% -+ % Retrieve the information for the headings from the marks in the page, -+ % and call Plain TeX's \makeheadline and \makefootline, which use the -+ % values in \headline and \footline. -+ % -+ % This is used to check if we are on the first page of a chapter. -+ \ifcase1\topmark\fi -+ \let\prevchaptername\thischaptername -+ \ifcase0\firstmark\fi -+ \let\curchaptername\thischaptername - % -+ \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi - \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi -+ % -+ \ifx\curchaptername\prevchaptername -+ \let\thischapterheading\thischapter -+ \else -+ % \thischapterheading is the same as \thischapter except it is blank -+ % for the first page of a chapter. This is to prevent the chapter name -+ % being shown twice. -+ \def\thischapterheading{}% -+ \fi -+ % -+ \global\setbox\headlinebox = \vbox{\commmonheadfootline \makeheadline}% - \global\setbox\footlinebox = \vbox{\commmonheadfootline \makefootline}% - % - {% -+ % Set context for writing to auxiliary files like index files. - % Have to do this stuff outside the \shipout because we want it to - % take effect in \write's, yet the group defined by the \vbox ends - % before the \shipout runs. -@@ -343,10 +378,10 @@ - \normalturnoffactive % \ in index entries must not stay \, e.g., if - % the page break happens to be in the middle of an example. - % We don't want .vr (or whatever) entries like this: -- % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}} -+ % \entry{{\indexbackslash }acronym}{32}{\code {\acronym}} - % "\acronym" won't work when it's read back in; - % it needs to be -- % {\code {{\tt \backslashcurfont }acronym} -+ % {\code {{\backslashcurfont }acronym} - \shipout\vbox{% - % Do this early so pdf references go to the beginning of the page. - \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi -@@ -404,7 +439,8 @@ - - \newinsert\margin \dimen\margin=\maxdimen - --\def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}} -+% Main part of page, including any footnotes -+\def\pagebody#1{\vbox to\txipageheight{\boxmaxdepth=\maxdepth #1}} - {\catcode`\@ =11 - \gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi - % marginal hacks, juha@viisa.uucp (Juha Takala) -@@ -426,9 +462,13 @@ - \def\nsbot{\vbox - {\hrule height\cornerlong depth\cornerthick width\cornerthick}} - -+ -+% Argument parsing -+ - % Parse an argument, then pass it to #1. The argument is the rest of - % the input line (except we remove a trailing comment). #1 should be a - % macro which expects an ordinary undelimited TeX argument. -+% For example, \def\foo{\parsearg\fooxxx}. - % - \def\parsearg{\parseargusing{}} - \def\parseargusing#1#2{% -@@ -447,9 +487,11 @@ - }% - } - --% First remove any @comment, then any @c comment. -+% First remove any @comment, then any @c comment. Also remove a @texinfoc -+% comment (see \scanmacro for details). Pass the result on to \argcheckspaces. - \def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm} --\def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm} -+\def\argremovec#1\c#2\ArgTerm{\argremovetexinfoc #1\texinfoc\ArgTerm} -+\def\argremovetexinfoc#1\texinfoc#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm} - - % Each occurrence of `\^^M' or `\^^M' is replaced by a single space. - % -@@ -484,14 +526,13 @@ - % - \def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}} - -+ -+% \parseargdef - define a command taking an argument on the line -+% - % \parseargdef\foo{...} - % is roughly equivalent to - % \def\foo{\parsearg\Xfoo} - % \def\Xfoo#1{...} --% --% Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my --% favourite TeX trick. --kasal, 16nov03 -- - \def\parseargdef#1{% - \expandafter \doparseargdef \csname\string#1\endcsname #1% - } -@@ -681,21 +722,26 @@ - \endgraf % Not \par, as it may have been set to \lisppar. - \global\dimen1 = \prevdepth - \egroup % End the \vtop. -+ \addgroupbox -+ \prevdepth = \dimen1 -+ \checkinserts -+} -+ -+\def\addgroupbox{ - % \dimen0 is the vertical size of the group's box. - \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox - % \dimen2 is how much space is left on the page (more or less). -- \dimen2 = \pageheight \advance\dimen2 by -\pagetotal -+ \dimen2 = \txipageheight \advance\dimen2 by -\pagetotal - % if the group doesn't fit on the current page, and it's a big big - % group, force a page break. - \ifdim \dimen0 > \dimen2 -- \ifdim \pagetotal < \vfilllimit\pageheight -+ \ifdim \pagetotal < \vfilllimit\txipageheight - \page - \fi - \fi - \box\groupbox -- \prevdepth = \dimen1 -- \checkinserts - } -+ - % - % TeX puts in an \escapechar (i.e., `@') at the beginning of the help - % message, so this ends up printing `@group can only ...'. -@@ -819,36 +865,6 @@ - \temp - } - --% @| inserts a changebar to the left of the current line. It should --% surround any changed text. This approach does *not* work if the --% change spans more than two lines of output. To handle that, we would --% have adopt a much more difficult approach (putting marks into the main --% vertical list for the beginning and end of each change). This command --% is not documented, not supported, and doesn't work. --% --\def\|{% -- % \vadjust can only be used in horizontal mode. -- \leavevmode -- % -- % Append this vertical mode material after the current line in the output. -- \vadjust{% -- % We want to insert a rule with the height and depth of the current -- % leading; that is exactly what \strutbox is supposed to record. -- \vskip-\baselineskip -- % -- % \vadjust-items are inserted at the left edge of the type. So -- % the \llap here moves out into the left-hand margin. -- \llap{% -- % -- % For a thicker or thinner bar, change the `1pt'. -- \vrule height\baselineskip width1pt -- % -- % This is the space between the bar and the text. -- \hskip 12pt -- }% -- }% --} -- - % @include FILE -- \input text of FILE. - % - \def\include{\parseargusing\filenamecatcodes\includezzz} -@@ -937,13 +953,14 @@ - % @comment ...line which is ignored... - % @c is the same as @comment - % @ignore ... @end ignore is another way to write a comment --% --\def\comment{\begingroup \catcode`\^^M=\other% -+ -+ -+\def\c{\begingroup \catcode`\^^M=\active% - \catcode`\@=\other \catcode`\{=\other \catcode`\}=\other% --\commentxxx} --{\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}} -+\cxxx} -+{\catcode`\^^M=\active \gdef\cxxx#1^^M{\endgroup}} - % --\let\c=\comment -+\let\comment\c - - % @paragraphindent NCHARS - % We'll use ems for NCHARS, close enough. -@@ -1029,45 +1046,8 @@ - % @refill is a no-op. - \let\refill=\relax - --% If working on a large document in chapters, it is convenient to --% be able to disable indexing, cross-referencing, and contents, for test runs. --% This is done with @novalidate (before @setfilename). --% --\newif\iflinks \linkstrue % by default we want the aux files. --\let\novalidate = \linksfalse -- --% @setfilename is done at the beginning of every texinfo file. --% So open here the files we need to have open while reading the input. --% This makes it possible to make a .fmt file for texinfo. --\def\setfilename{% -- \fixbackslash % Turn off hack to swallow `\input texinfo'. -- \iflinks -- \tryauxfile -- % Open the new aux file. TeX will close it automatically at exit. -- \immediate\openout\auxfile=\jobname.aux -- \fi % \openindices needs to do some work in any case. -- \openindices -- \let\setfilename=\comment % Ignore extra @setfilename cmds. -- % -- % If texinfo.cnf is present on the system, read it. -- % Useful for site-wide @afourpaper, etc. -- \openin 1 texinfo.cnf -- \ifeof 1 \else \input texinfo.cnf \fi -- \closein 1 -- % -- \comment % Ignore the actual filename. --} -- --% Called from \setfilename. --% --\def\openindices{% -- \newindex{cp}% -- \newcodeindex{fn}% -- \newcodeindex{vr}% -- \newcodeindex{tp}% -- \newcodeindex{ky}% -- \newcodeindex{pg}% --} -+% @setfilename INFO-FILENAME - ignored -+\let\setfilename=\comment - - % @bye. - \outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} -@@ -1085,10 +1065,91 @@ - \newtoks\toksC - \newtoks\toksD - \newbox\boxA -+\newbox\boxB - \newcount\countA - \newif\ifpdf - \newif\ifpdfmakepagedest - -+% -+% For LuaTeX -+% -+ -+\newif\iftxiuseunicodedestname -+\txiuseunicodedestnamefalse % For pdfTeX etc. -+ -+\ifx\luatexversion\thisisundefined -+\else -+ % Use Unicode destination names -+ \txiuseunicodedestnametrue -+ % Escape PDF strings with converting UTF-16 from UTF-8 -+ \begingroup -+ \catcode`\%=12 -+ \directlua{ -+ function UTF16oct(str) -+ tex.sprint(string.char(0x5c) .. '376' .. string.char(0x5c) .. '377') -+ for c in string.utfvalues(str) do -+ if c < 0x10000 then -+ tex.sprint( -+ string.format(string.char(0x5c) .. string.char(0x25) .. '03o' .. -+ string.char(0x5c) .. string.char(0x25) .. '03o', -+ (c / 256), (c % 256))) -+ else -+ c = c - 0x10000 -+ local c_hi = c / 1024 + 0xd800 -+ local c_lo = c % 1024 + 0xdc00 -+ tex.sprint( -+ string.format(string.char(0x5c) .. string.char(0x25) .. '03o' .. -+ string.char(0x5c) .. string.char(0x25) .. '03o' .. -+ string.char(0x5c) .. string.char(0x25) .. '03o' .. -+ string.char(0x5c) .. string.char(0x25) .. '03o', -+ (c_hi / 256), (c_hi % 256), -+ (c_lo / 256), (c_lo % 256))) -+ end -+ end -+ end -+ } -+ \endgroup -+ \def\pdfescapestrutfsixteen#1{\directlua{UTF16oct('\luaescapestring{#1}')}} -+ % Escape PDF strings without converting -+ \begingroup -+ \directlua{ -+ function PDFescstr(str) -+ for c in string.bytes(str) do -+ if c <= 0x20 or c >= 0x80 or c == 0x28 or c == 0x29 or c == 0x5c then -+ tex.sprint( -+ string.format(string.char(0x5c) .. string.char(0x25) .. '03o', -+ c)) -+ else -+ tex.sprint(string.char(c)) -+ end -+ end -+ end -+ } -+ \endgroup -+ \def\pdfescapestring#1{\directlua{PDFescstr('\luaescapestring{#1}')}} -+ \ifnum\luatexversion>84 -+ % For LuaTeX >= 0.85 -+ \def\pdfdest{\pdfextension dest} -+ \let\pdfoutput\outputmode -+ \def\pdfliteral{\pdfextension literal} -+ \def\pdfcatalog{\pdfextension catalog} -+ \def\pdftexversion{\numexpr\pdffeedback version\relax} -+ \let\pdfximage\saveimageresource -+ \let\pdfrefximage\useimageresource -+ \let\pdflastximage\lastsavedimageresourceindex -+ \def\pdfendlink{\pdfextension endlink\relax} -+ \def\pdfoutline{\pdfextension outline} -+ \def\pdfstartlink{\pdfextension startlink} -+ \def\pdffontattr{\pdfextension fontattr} -+ \def\pdfobj{\pdfextension obj} -+ \def\pdflastobj{\numexpr\pdffeedback lastobj\relax} -+ \let\pdfpagewidth\pagewidth -+ \let\pdfpageheight\pageheight -+ \edef\pdfhorigin{\pdfvariable horigin} -+ \edef\pdfvorigin{\pdfvariable vorigin} -+ \fi -+\fi -+ - % when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1 - % can be set). So we test for \relax and 0 as well as being undefined. - \ifx\pdfoutput\thisisundefined -@@ -1119,12 +1180,21 @@ - \ifx\pdfescapestring\thisisundefined - % No primitive available; should we give a warning or log? - % Many times it won't matter. -+ \xdef#1{#1}% - \else - % The expandable \pdfescapestring primitive escapes parentheses, - % backslashes, and other special chars. - \xdef#1{\pdfescapestring{#1}}% - \fi - } -+\def\txiescapepdfutfsixteen#1{% -+ \ifx\pdfescapestrutfsixteen\thisisundefined -+ % No UTF-16 converting macro available. -+ \txiescapepdf{#1}% -+ \else -+ \xdef#1{\pdfescapestrutfsixteen{#1}}% -+ \fi -+} - - \newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images - with PDF output, and none of those formats could be found. (.eps cannot -@@ -1142,8 +1212,8 @@ - \def\rgbDarkRed{0.50 0.09 0.12} - \def\rgbBlack{0 0 0} - % -- % k sets the color for filling (usual text, etc.); -- % K sets the color for stroking (thin rules, e.g., normal _'s). -+ % rg sets the color for filling (usual text, etc.); -+ % RG sets the color for stroking (thin rules, e.g., normal _'s). - \def\pdfsetcolor#1{\pdfliteral{#1 rg #1 RG}} - % - % Set color, and create a mark which defines \thiscolor accordingly, -@@ -1234,17 +1304,77 @@ - \pdfrefximage \pdflastximage - \fi} - % -- \def\pdfmkdest#1{{% -+ \def\setpdfdestname#1{{% - % We have to set dummies so commands such as @code, and characters - % such as \, aren't expanded when present in a section title. - \indexnofonts -- \turnoffactive - \makevalueexpandable -+ \turnoffactive -+ \iftxiuseunicodedestname -+ \ifx \declaredencoding \latone -+ % Pass through Latin-1 characters. -+ % LuaTeX with byte wise I/O converts Latin-1 characters to Unicode. -+ \else -+ \ifx \declaredencoding \utfeight -+ % Pass through Unicode characters. -+ \else -+ % Use ASCII approximations in destination names. -+ \passthroughcharsfalse -+ \fi -+ \fi -+ \else -+ % Use ASCII approximations in destination names. -+ \passthroughcharsfalse -+ \fi - \def\pdfdestname{#1}% - \txiescapepdf\pdfdestname -- \safewhatsit{\pdfdest name{\pdfdestname} xyz}% - }} - % -+ \def\setpdfoutlinetext#1{{% -+ \indexnofonts -+ \makevalueexpandable -+ \turnoffactive -+ \ifx \declaredencoding \latone -+ % The PDF format can use an extended form of Latin-1 in bookmark -+ % strings. See Appendix D of the PDF Reference, Sixth Edition, for -+ % the "PDFDocEncoding". -+ \passthroughcharstrue -+ % Pass through Latin-1 characters. -+ % LuaTeX: Convert to Unicode -+ % pdfTeX: Use Latin-1 as PDFDocEncoding -+ \def\pdfoutlinetext{#1}% -+ \else -+ \ifx \declaredencoding \utfeight -+ \ifx\luatexversion\thisisundefined -+ % For pdfTeX with UTF-8. -+ % TODO: the PDF format can use UTF-16 in bookmark strings, -+ % but the code for this isn't done yet. -+ % Use ASCII approximations. -+ \passthroughcharsfalse -+ \def\pdfoutlinetext{#1}% -+ \else -+ % For LuaTeX with UTF-8. -+ % Pass through Unicode characters for title texts. -+ \passthroughcharstrue -+ \def\pdfoutlinetext{#1}% -+ \fi -+ \else -+ % For non-Latin-1 or non-UTF-8 encodings. -+ % Use ASCII approximations. -+ \passthroughcharsfalse -+ \def\pdfoutlinetext{#1}% -+ \fi -+ \fi -+ % LuaTeX: Convert to UTF-16 -+ % pdfTeX: Use Latin-1 as PDFDocEncoding -+ \txiescapepdfutfsixteen\pdfoutlinetext -+ }} -+ % -+ \def\pdfmkdest#1{% -+ \setpdfdestname{#1}% -+ \safewhatsit{\pdfdest name{\pdfdestname} xyz}% -+ } -+ % - % used to mark target names; must be expandable. - \def\pdfmkpgn#1{#1} - % -@@ -1272,18 +1402,13 @@ - % page number. We could generate a destination for the section - % text in the case where a section has no node, but it doesn't - % seem worth the trouble, since most documents are normally structured. -- \edef\pdfoutlinedest{#3}% -- \ifx\pdfoutlinedest\empty -- \def\pdfoutlinedest{#4}% -- \else -- \txiescapepdf\pdfoutlinedest -+ \setpdfoutlinetext{#1} -+ \setpdfdestname{#3} -+ \ifx\pdfdestname\empty -+ \def\pdfdestname{#4}% - \fi - % -- % Also escape PDF chars in the display string. -- \edef\pdfoutlinetext{#1}% -- \txiescapepdf\pdfoutlinetext -- % -- \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}% -+ \pdfoutline goto name{\pdfmkpgn{\pdfdestname}}#2{\pdfoutlinetext}% - } - % - \def\pdfmakeoutlines{% -@@ -1438,41 +1563,297 @@ - \let\pdfmakeoutlines = \relax - \fi % \ifx\pdfoutput - -- --\message{fonts,} -- --% Change the current font style to #1, remembering it in \curfontstyle. --% For now, we do not accumulate font styles: @b{@i{foo}} prints foo in --% italics, not bold italics. - % --\def\setfontstyle#1{% -- \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd. -- \csname ten#1\endcsname % change the current font --} -- --% Select #1 fonts with the current style. -+% For XeTeX - % --\def\selectfonts#1{\csname #1fonts\endcsname \csname\curfontstyle\endcsname} -- --\def\rm{\fam=0 \setfontstyle{rm}} --\def\it{\fam=\itfam \setfontstyle{it}} --\def\sl{\fam=\slfam \setfontstyle{sl}} --\def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf} --\def\tt{\fam=\ttfam \setfontstyle{tt}} -- --% Unfortunately, we have to override this for titles and the like, since --% in those cases "rm" is bold. Sigh. --\def\rmisbold{\rm\def\curfontstyle{bf}} -+\ifx\XeTeXrevision\thisisundefined -+\else -+ % -+ % XeTeX version check -+ % -+ \ifnum\strcmp{\the\XeTeXversion\XeTeXrevision}{0.99996}>-1 -+ % TeX Live 2016 contains XeTeX 0.99996 and xdvipdfmx 20160307. -+ % It can use the `dvipdfmx:config' special (from TeX Live SVN r40941). -+ % For avoiding PDF destination name replacement, we use this special -+ % instead of xdvipdfmx's command line option `-C 0x0010'. -+ \special{dvipdfmx:config C 0x0010} -+ % XeTeX 0.99995+ comes with xdvipdfmx 20160307+. -+ % It can handle Unicode destination names for PDF. -+ \txiuseunicodedestnametrue -+ \else -+ % XeTeX < 0.99996 (TeX Live < 2016) cannot use the -+ % `dvipdfmx:config' special. -+ % So for avoiding PDF destination name replacement, -+ % xdvipdfmx's command line option `-C 0x0010' is necessary. -+ % -+ % XeTeX < 0.99995 can not handle Unicode destination names for PDF -+ % because xdvipdfmx 20150315 has a UTF-16 conversion issue. -+ % It is fixed by xdvipdfmx 20160106 (TeX Live SVN r39753). -+ \txiuseunicodedestnamefalse -+ \fi -+ % -+ % Color support -+ % -+ \def\rgbDarkRed{0.50 0.09 0.12} -+ \def\rgbBlack{0 0 0} -+ % -+ \def\pdfsetcolor#1{\special{pdf:scolor [#1]}} -+ % -+ % Set color, and create a mark which defines \thiscolor accordingly, -+ % so that \makeheadline knows which color to restore. -+ \def\setcolor#1{% -+ \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}% -+ \domark -+ \pdfsetcolor{#1}% -+ } -+ % -+ \def\maincolor{\rgbBlack} -+ \pdfsetcolor{\maincolor} -+ \edef\thiscolor{\maincolor} -+ \def\lastcolordefs{} -+ % -+ \def\makefootline{% -+ \baselineskip24pt -+ \line{\pdfsetcolor{\maincolor}\the\footline}% -+ } -+ % -+ \def\makeheadline{% -+ \vbox to 0pt{% -+ \vskip-22.5pt -+ \line{% -+ \vbox to8.5pt{}% -+ % Extract \thiscolor definition from the marks. -+ \getcolormarks -+ % Typeset the headline with \maincolor, then restore the color. -+ \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}% -+ }% -+ \vss -+ }% -+ \nointerlineskip -+ } -+ % -+ % PDF outline support -+ % -+ % Emulate pdfTeX primitive -+ \def\pdfdest name#1 xyz{% -+ \special{pdf:dest (#1) [@thispage /XYZ @xpos @ypos null]}% -+ } -+ % -+ \def\setpdfdestname#1{{% -+ % We have to set dummies so commands such as @code, and characters -+ % such as \, aren't expanded when present in a section title. -+ \indexnofonts -+ \makevalueexpandable -+ \turnoffactive -+ \iftxiuseunicodedestname -+ % Pass through Unicode characters. -+ \else -+ % Use ASCII approximations in destination names. -+ \passthroughcharsfalse -+ \fi -+ \def\pdfdestname{#1}% -+ \txiescapepdf\pdfdestname -+ }} -+ % -+ \def\setpdfoutlinetext#1{{% -+ \turnoffactive -+ % Always use Unicode characters in title texts. -+ \def\pdfoutlinetext{#1}% -+ % For XeTeX, xdvipdfmx converts to UTF-16. -+ % So we do not convert. -+ \txiescapepdf\pdfoutlinetext -+ }} -+ % -+ \def\pdfmkdest#1{% -+ \setpdfdestname{#1}% -+ \safewhatsit{\pdfdest name{\pdfdestname} xyz}% -+ } -+ % -+ % by default, use black for everything. -+ \def\urlcolor{\rgbBlack} -+ \def\linkcolor{\rgbBlack} -+ \def\endlink{\setcolor{\maincolor}\pdfendlink} -+ % -+ \def\dopdfoutline#1#2#3#4{% -+ \setpdfoutlinetext{#1} -+ \setpdfdestname{#3} -+ \ifx\pdfdestname\empty -+ \def\pdfdestname{#4}% -+ \fi -+ % -+ \special{pdf:out [-] #2 << /Title (\pdfoutlinetext) /A -+ << /S /GoTo /D (\pdfdestname) >> >> }% -+ } -+ % -+ \def\pdfmakeoutlines{% -+ \begingroup -+ % -+ % For XeTeX, counts of subentries are not necessary. -+ % Therefore, we read toc only once. -+ % -+ % We use node names as destinations. -+ \def\partentry##1##2##3##4{}% ignore parts in the outlines -+ \def\numchapentry##1##2##3##4{% -+ \dopdfoutline{##1}{1}{##3}{##4}}% -+ \def\numsecentry##1##2##3##4{% -+ \dopdfoutline{##1}{2}{##3}{##4}}% -+ \def\numsubsecentry##1##2##3##4{% -+ \dopdfoutline{##1}{3}{##3}{##4}}% -+ \def\numsubsubsecentry##1##2##3##4{% -+ \dopdfoutline{##1}{4}{##3}{##4}}% -+ % -+ \let\appentry\numchapentry% -+ \let\appsecentry\numsecentry% -+ \let\appsubsecentry\numsubsecentry% -+ \let\appsubsubsecentry\numsubsubsecentry% -+ \let\unnchapentry\numchapentry% -+ \let\unnsecentry\numsecentry% -+ \let\unnsubsecentry\numsubsecentry% -+ \let\unnsubsubsecentry\numsubsubsecentry% -+ % -+ % For XeTeX, xdvipdfmx converts strings to UTF-16. -+ % Therefore, the encoding and the language may not be considered. -+ % -+ \indexnofonts -+ \setupdatafile -+ % We can have normal brace characters in the PDF outlines, unlike -+ % Texinfo index files. So set that up. -+ \def\{{\lbracecharliteral}% -+ \def\}{\rbracecharliteral}% -+ \catcode`\\=\active \otherbackslash -+ \input \tocreadfilename -+ \endgroup -+ } -+ {\catcode`[=1 \catcode`]=2 -+ \catcode`{=\other \catcode`}=\other -+ \gdef\lbracecharliteral[{]% -+ \gdef\rbracecharliteral[}]% -+ ] - --% Texinfo sort of supports the sans serif font style, which plain TeX does not. --% So we set up a \sf. --\newfam\sffam --\def\sf{\fam=\sffam \setfontstyle{sf}} --\let\li = \sf % Sometimes we call it \li, not \sf. -+ \special{pdf:docview << /PageMode /UseOutlines >> } -+ % ``\special{pdf:tounicode ...}'' is not necessary -+ % because xdvipdfmx converts strings from UTF-8 to UTF-16 without it. -+ % However, due to a UTF-16 conversion issue of xdvipdfmx 20150315, -+ % ``\special{pdf:dest ...}'' cannot handle non-ASCII strings. -+ % It is fixed by xdvipdfmx 20160106 (TeX Live SVN r39753). -+% -+ \def\skipspaces#1{\def\PP{#1}\def\D{|}% -+ \ifx\PP\D\let\nextsp\relax -+ \else\let\nextsp\skipspaces -+ \addtokens{\filename}{\PP}% -+ \advance\filenamelength by 1 -+ \fi -+ \nextsp} -+ \def\getfilename#1{% -+ \filenamelength=0 -+ % If we don't expand the argument now, \skipspaces will get -+ % snagged on things like "@value{foo}". -+ \edef\temp{#1}% -+ \expandafter\skipspaces\temp|\relax -+ } -+ % make a live url in pdf output. -+ \def\pdfurl#1{% -+ \begingroup -+ % it seems we really need yet another set of dummies; have not -+ % tried to figure out what each command should do in the context -+ % of @url. for now, just make @/ a no-op, that's the only one -+ % people have actually reported a problem with. -+ % -+ \normalturnoffactive -+ \def\@{@}% -+ \let\/=\empty -+ \makevalueexpandable -+ % do we want to go so far as to use \indexnofonts instead of just -+ % special-casing \var here? -+ \def\var##1{##1}% -+ % -+ \leavevmode\setcolor{\urlcolor}% -+ \special{pdf:bann << /Border [0 0 0] -+ /Subtype /Link /A << /S /URI /URI (#1) >> >>}% -+ \endgroup} -+ \def\endlink{\setcolor{\maincolor}\special{pdf:eann}} -+ \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}} -+ \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} -+ \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks} -+ \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}} -+ \def\maketoks{% -+ \expandafter\poptoks\the\toksA|ENDTOKS|\relax -+ \ifx\first0\adn0 -+ \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3 -+ \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6 -+ \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9 -+ \else -+ \ifnum0=\countA\else\makelink\fi -+ \ifx\first.\let\next=\done\else -+ \let\next=\maketoks -+ \addtokens{\toksB}{\the\toksD} -+ \ifx\first,\addtokens{\toksB}{\space}\fi -+ \fi -+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi -+ \next} -+ \def\makelink{\addtokens{\toksB}% -+ {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0} -+ \def\pdflink#1{% -+ \special{pdf:bann << /Border [0 0 0] -+ /Type /Annot /Subtype /Link /A << /S /GoTo /D (#1) >> >>}% -+ \setcolor{\linkcolor}#1\endlink} -+ \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} -+% -+ % -+ % @image support -+ % -+ % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto). -+ \def\doxeteximage#1#2#3{% -+ \def\xeteximagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}% -+ \def\xeteximageheight{#3}\setbox2 = \hbox{\ignorespaces #3}% -+ % -+ % XeTeX (and the PDF format) supports .pdf, .png, .jpg (among -+ % others). Let's try in that order, PDF first since if -+ % someone has a scalable image, presumably better to use that than a -+ % bitmap. -+ \let\xeteximgext=\empty -+ \begingroup -+ \openin 1 #1.pdf \ifeof 1 -+ \openin 1 #1.PDF \ifeof 1 -+ \openin 1 #1.png \ifeof 1 -+ \openin 1 #1.jpg \ifeof 1 -+ \openin 1 #1.jpeg \ifeof 1 -+ \openin 1 #1.JPG \ifeof 1 -+ \errmessage{Could not find image file #1 for XeTeX}% -+ \else \gdef\xeteximgext{JPG}% -+ \fi -+ \else \gdef\xeteximgext{jpeg}% -+ \fi -+ \else \gdef\xeteximgext{jpg}% -+ \fi -+ \else \gdef\xeteximgext{png}% -+ \fi -+ \else \gdef\xeteximgext{PDF}% -+ \fi -+ \else \gdef\xeteximgext{pdf}% -+ \fi -+ \closein 1 -+ \endgroup -+ % -+ \def\xetexpdfext{pdf}% -+ \ifx\xeteximgext\xetexpdfext -+ \XeTeXpdffile "#1".\xeteximgext "" -+ \else -+ \def\xetexpdfext{PDF}% -+ \ifx\xeteximgext\xetexpdfext -+ \XeTeXpdffile "#1".\xeteximgext "" -+ \else -+ \XeTeXpicfile "#1".\xeteximgext "" -+ \fi -+ \fi -+ \ifdim \wd0 >0pt width \xeteximagewidth \fi -+ \ifdim \wd2 >0pt height \xeteximageheight \fi \relax -+ } -+\fi - --% We don't need math for this font style. --\def\ttsl{\setfontstyle{ttsl}} - -+% -+\message{fonts,} - - % Set the baselineskip to #1, and the lineskip and strut size - % correspondingly. There is no deep meaning behind these magic numbers -@@ -1821,8 +2202,10 @@ - % A few fonts for @defun names and args. - \setfont\defbf\bfshape{10}{\magstep1}{OT1} - \setfont\deftt\ttshape{10}{\magstep1}{OT1TT} -+\setfont\defsl\slshape{10}{\magstep1}{OT1TT} - \setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT} --\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} -+\def\df{\let\ttfont=\deftt \let\bffont = \defbf -+\let\ttslfont=\defttsl \let\slfont=\defsl \bf} - - % Fonts for indices, footnotes, small examples (9pt). - \def\smallnominalsize{9pt} -@@ -1883,6 +2266,7 @@ - % Section fonts (14.4pt). - \def\secnominalsize{14pt} - \setfont\secrm\rmbshape{12}{\magstep1}{OT1} -+\setfont\secrmnotbold\rmshape{12}{\magstep1}{OT1} - \setfont\secit\itbshape{10}{\magstep2}{OT1IT} - \setfont\secsl\slbshape{10}{\magstep2}{OT1} - \setfont\sectt\ttbshape{12}{\magstep1}{OT1TT} -@@ -1908,7 +2292,7 @@ - \font\ssecsy=cmsy10 scaled 1315 - \def\ssececsize{1200} - --% Reduced fonts for @acro in text (10pt). -+% Reduced fonts for @acronym in text (10pt). - \def\reducednominalsize{10pt} - \setfont\reducedrm\rmshape{10}{1000}{OT1} - \setfont\reducedtt\ttshape{10}{1000}{OT1TT} -@@ -1952,8 +2336,10 @@ - % A few fonts for @defun names and args. - \setfont\defbf\bfshape{10}{\magstephalf}{OT1} - \setfont\deftt\ttshape{10}{\magstephalf}{OT1TT} -+\setfont\defsl\slshape{10}{\magstephalf}{OT1TT} - \setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT} --\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} -+\def\df{\let\ttfont=\deftt \let\bffont = \defbf -+\let\slfont=\defsl \let\ttslfont=\defttsl \bf} - - % Fonts for indices, footnotes, small examples (9pt). - \def\smallnominalsize{9pt} -@@ -2039,7 +2425,7 @@ - \font\ssecsy=cmsy10 - \def\ssececsize{1000} - --% Reduced fonts for @acro in text (9pt). -+% Reduced fonts for @acronym in text (9pt). - \def\reducednominalsize{9pt} - \setfont\reducedrm\rmshape{9}{1000}{OT1} - \setfont\reducedtt\ttshape{9}{1000}{OT1TT} -@@ -2059,6 +2445,12 @@ - \rm - } % end of 10pt text font size definitions, \definetextfontsizex - -+% Fonts for short table of contents. -+\setfont\shortcontrm\rmshape{12}{1000}{OT1} -+\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12 -+\setfont\shortcontsl\slshape{12}{1000}{OT1} -+\setfont\shortconttt\ttshape{12}{1000}{OT1TT} -+ - - % We provide the user-level command - % @fonttextsize 10 -@@ -2085,20 +2477,47 @@ - \endgroup - } - -+% -+% Change the current font style to #1, remembering it in \curfontstyle. -+% For now, we do not accumulate font styles: @b{@i{foo}} prints foo in -+% italics, not bold italics. -+% -+\def\setfontstyle#1{% -+ \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd. -+ \csname #1font\endcsname % change the current font -+} -+ -+\def\rm{\fam=0 \setfontstyle{rm}} -+\def\it{\fam=\itfam \setfontstyle{it}} -+\def\sl{\fam=\slfam \setfontstyle{sl}} -+\def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf} -+\def\tt{\fam=\ttfam \setfontstyle{tt}} -+ -+% Texinfo sort of supports the sans serif font style, which plain TeX does not. -+% So we set up a \sf. -+\newfam\sffam -+\def\sf{\fam=\sffam \setfontstyle{sf}} -+ -+% We don't need math for this font style. -+\def\ttsl{\setfontstyle{ttsl}} -+ -+ - % In order for the font changes to affect most math symbols and letters, - % we have to define the \textfont of the standard families. We don't - % bother to reset \scriptfont and \scriptscriptfont; awaiting user need. - % - \def\resetmathfonts{% -- \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy -- \textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf -- \textfont\ttfam=\tentt \textfont\sffam=\tensf -+ \textfont0=\rmfont \textfont1=\ifont \textfont2=\syfont -+ \textfont\itfam=\itfont \textfont\slfam=\slfont \textfont\bffam=\bffont -+ \textfont\ttfam=\ttfont \textfont\sffam=\sffont - } - --% The font-changing commands redefine the meanings of \tenSTYLE, instead --% of just \STYLE. We do this because \STYLE needs to also set the --% current \fam for math mode. Our \STYLE (e.g., \rm) commands hardwire --% \tenSTYLE to set the current font. -+% -+ -+% The font-changing commands (all called \...fonts) redefine the meanings -+% of \STYLEfont, instead of just \STYLE. We do this because \STYLE needs -+% to also set the current \fam for math mode. Our \STYLE (e.g., \rm) -+% commands hardwire \STYLEfont to set the current font. - % - % Each font-changing command also sets the names \lsize (one size lower) - % and \lllsize (three sizes lower). These relative commands are used -@@ -2106,78 +2525,63 @@ - % - % This all needs generalizing, badly. - % --\def\textfonts{% -- \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl -- \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc -- \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy -- \let\tenttsl=\textttsl -- \def\curfontsize{text}% -- \def\lsize{reduced}\def\lllsize{smaller}% -- \resetmathfonts \setleading{\textleading}} --\def\titlefonts{% -- \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl -- \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc -- \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy -- \let\tenttsl=\titlettsl -- \def\curfontsize{title}% -- \def\lsize{chap}\def\lllsize{subsec}% -- \resetmathfonts \setleading{27pt}} --\def\titlefont#1{{\titlefonts\rmisbold #1}} --\def\chapfonts{% -- \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl -- \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc -- \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy -- \let\tenttsl=\chapttsl -- \def\curfontsize{chap}% -- \def\lsize{sec}\def\lllsize{text}% -- \resetmathfonts \setleading{19pt}} --\def\secfonts{% -- \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl -- \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc -- \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy -- \let\tenttsl=\secttsl -- \def\curfontsize{sec}% -- \def\lsize{subsec}\def\lllsize{reduced}% -- \resetmathfonts \setleading{17pt}} --\def\subsecfonts{% -- \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl -- \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc -- \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy -- \let\tenttsl=\ssecttsl -- \def\curfontsize{ssec}% -- \def\lsize{text}\def\lllsize{small}% -- \resetmathfonts \setleading{15pt}} --\let\subsubsecfonts = \subsecfonts --\def\reducedfonts{% -- \let\tenrm=\reducedrm \let\tenit=\reducedit \let\tensl=\reducedsl -- \let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc -- \let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy -- \let\tenttsl=\reducedttsl -- \def\curfontsize{reduced}% -- \def\lsize{small}\def\lllsize{smaller}% -- \resetmathfonts \setleading{10.5pt}} --\def\smallfonts{% -- \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl -- \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc -- \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy -- \let\tenttsl=\smallttsl -- \def\curfontsize{small}% -- \def\lsize{smaller}\def\lllsize{smaller}% -- \resetmathfonts \setleading{10.5pt}} --\def\smallerfonts{% -- \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl -- \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc -- \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy -- \let\tenttsl=\smallerttsl -- \def\curfontsize{smaller}% -- \def\lsize{smaller}\def\lllsize{smaller}% -- \resetmathfonts \setleading{9.5pt}} - --% Fonts for short table of contents. --\setfont\shortcontrm\rmshape{12}{1000}{OT1} --\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12 --\setfont\shortcontsl\slshape{12}{1000}{OT1} --\setfont\shortconttt\ttshape{12}{1000}{OT1TT} -+\def\assignfonts#1{% -+ \expandafter\let\expandafter\rmfont\csname #1rm\endcsname -+ \expandafter\let\expandafter\itfont\csname #1it\endcsname -+ \expandafter\let\expandafter\slfont\csname #1sl\endcsname -+ \expandafter\let\expandafter\bffont\csname #1bf\endcsname -+ \expandafter\let\expandafter\ttfont\csname #1tt\endcsname -+ \expandafter\let\expandafter\smallcaps\csname #1sc\endcsname -+ \expandafter\let\expandafter\sffont \csname #1sf\endcsname -+ \expandafter\let\expandafter\ifont \csname #1i\endcsname -+ \expandafter\let\expandafter\syfont \csname #1sy\endcsname -+ \expandafter\let\expandafter\ttslfont\csname #1ttsl\endcsname -+} -+ -+\newif\ifrmisbold -+ -+% Select smaller font size with the current style. Used to change font size -+% in, e.g., the LaTeX logo and acronyms. If we are using bold fonts for -+% normal roman text, also use bold fonts for roman text in the smaller size. -+\def\switchtolllsize{% -+ \expandafter\assignfonts\expandafter{\lllsize}% -+ \ifrmisbold -+ \let\rmfont\bffont -+ \fi -+ \csname\curfontstyle\endcsname -+}% -+ -+\def\switchtolsize{% -+ \expandafter\assignfonts\expandafter{\lsize}% -+ \ifrmisbold -+ \let\rmfont\bffont -+ \fi -+ \csname\curfontstyle\endcsname -+}% -+ -+\def\definefontsetatsize#1#2#3#4#5{% -+\expandafter\def\csname #1fonts\endcsname{% -+ \def\curfontsize{#1}% -+ \def\lsize{#2}\def\lllsize{#3}% -+ \csname rmisbold#5\endcsname -+ \assignfonts{#1}% -+ \resetmathfonts -+ \setleading{#4}% -+}} -+ -+\definefontsetatsize{text} {reduced}{smaller}{\textleading}{false} -+\definefontsetatsize{title} {chap} {subsec} {27pt} {true} -+\definefontsetatsize{chap} {sec} {text} {19pt} {true} -+\definefontsetatsize{sec} {subsec} {reduced}{17pt} {true} -+\definefontsetatsize{ssec} {text} {small} {15pt} {true} -+\definefontsetatsize{reduced}{small} {smaller}{10.5pt}{false} -+\definefontsetatsize{small} {smaller}{smaller}{10.5pt}{false} -+\definefontsetatsize{smaller}{smaller}{smaller}{9.5pt} {false} -+ -+\def\titlefont#1{{\titlefonts\rm #1}} -+\let\subsecfonts = \ssecfonts -+\let\subsubsecfonts = \ssecfonts - - % Define these just so they can be easily changed for other fonts. - \def\angleleft{$\langle$} -@@ -2424,8 +2828,8 @@ - % - \catcode`@=11 - \def\plainfrenchspacing{% -- \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m -- \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m -+ \sfcode`\.=\@m \sfcode`\?=\@m \sfcode`\!=\@m -+ \sfcode`\:=\@m \sfcode`\;=\@m \sfcode`\,=\@m - \def\endofsentencespacefactor{1000}% for @. and friends - } - \def\plainnonfrenchspacing{% -@@ -2593,6 +2997,7 @@ - \setbox0 = \hbox{\ignorespaces #2}% look for second arg - \ifdim\wd0 > 0pt - \ifpdf -+ % For pdfTeX and LuaTeX - \ifurefurlonlylink - % PDF plus option to not display url, show just arg - \unhbox0 -@@ -2602,7 +3007,19 @@ - \unhbox0\ (\urefcode{#1})% - \fi - \else -- \unhbox0\ (\urefcode{#1})% DVI, always show arg and url -+ \ifx\XeTeXrevision\thisisundefined -+ \unhbox0\ (\urefcode{#1})% DVI, always show arg and url -+ \else -+ % For XeTeX -+ \ifurefurlonlylink -+ % PDF plus option to not display url, show just arg -+ \unhbox0 -+ \else -+ % PDF, normally display both arg and url for consistency, -+ % visibility, if the pdf is eventually used to print, etc. -+ \unhbox0\ (\urefcode{#1})% -+ \fi -+ \fi - \fi - \else - \urefcode{#1}% only url given, so show it -@@ -2613,9 +3030,9 @@ - - % Allow line breaks around only a few characters (only). - \def\urefcatcodes{% -- \catcode\ampChar=\active \catcode\dotChar=\active -- \catcode\hashChar=\active \catcode\questChar=\active -- \catcode\slashChar=\active -+ \catcode`\&=\active \catcode`\.=\active -+ \catcode`\#=\active \catcode`\?=\active -+ \catcode`\/=\active - } - { - \urefcatcodes -@@ -2703,7 +3120,18 @@ - \endlink - \endgroup} - \else -- \let\email=\uref -+ \ifx\XeTeXrevision\thisisundefined -+ \let\email=\uref -+ \else -+ \def\email#1{\doemail#1,,\finish} -+ \def\doemail#1,#2,#3\finish{\begingroup -+ \unsepspaces -+ \pdfurl{mailto:#1}% -+ \setbox0 = \hbox{\ignorespaces #2}% -+ \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi -+ \endlink -+ \endgroup} -+ \fi - \fi - - % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), -@@ -2772,18 +3200,13 @@ - % - \def\dmn#1{\thinspace #1} - --% @l was never documented to mean ``switch to the Lisp font'', --% and it is not used as such in any manual I can find. We need it for --% Polish suppressed-l. --karl, 22sep96. --%\def\l#1{{\li #1}\null} -- - % @acronym for "FBI", "NATO", and the like. - % We print this one point size smaller, since it's intended for - % all-uppercase. - % - \def\acronym#1{\doacronym #1,,\finish} - \def\doacronym#1,#2,#3\finish{% -- {\selectfonts\lsize #1}% -+ {\switchtolsize #1}% - \def\temp{#2}% - \ifx\temp\empty \else - \space ({\unsepspaces \ignorespaces \temp \unskip})% -@@ -2829,23 +3252,24 @@ - \def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi} - % - \def\math{% -- \tex -- \mathunderscore -- \let\\ = \mathbackslash -- \mathactive -- % make the texinfo accent commands work in math mode -- \let\"=\ddot -- \let\'=\acute -- \let\==\bar -- \let\^=\hat -- \let\`=\grave -- \let\u=\breve -- \let\v=\check -- \let\~=\tilde -- \let\dotaccent=\dot -- % have to provide another name for sup operator -- \let\mathopsup=\sup -- $\finishmath -+ \ifmmode\else % only go into math if not in math mode already -+ \tex -+ \mathunderscore -+ \let\\ = \mathbackslash -+ \mathactive -+ % make the texinfo accent commands work in math mode -+ \let\"=\ddot -+ \let\'=\acute -+ \let\==\bar -+ \let\^=\hat -+ \let\`=\grave -+ \let\u=\breve -+ \let\v=\check -+ \let\~=\tilde -+ \let\dotaccent=\dot -+ % have to provide another name for sup operator -+ \let\mathopsup=\sup -+ $\expandafter\finishmath\fi - } - \def\finishmath#1{#1$\endgroup} % Close the group opened by \tex. - -@@ -2875,13 +3299,10 @@ - % fix it (significant additions to font machinery) until someone notices. - % - \def\sub{\ifmmode \expandafter\sb \else \expandafter\finishsub\fi} --\def\finishsub#1{$\sb{\hbox{\selectfonts\lllsize #1}}$}% -+\def\finishsub#1{$\sb{\hbox{\switchtolllsize #1}}$}% - % - \def\sup{\ifmmode \expandafter\ptexsp \else \expandafter\finishsup\fi} --\def\finishsup#1{$\ptexsp{\hbox{\selectfonts\lllsize #1}}$}% -- --% ctrl is no longer a Texinfo command, but leave this definition for fun. --\def\ctrl #1{{\tt \rawbackslash \hat}#1} -+\def\finishsup#1{$\ptexsp{\hbox{\switchtolllsize #1}}$}% - - % @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}. - % Ignore unless FMTNAME == tex; then it is like @iftex and @tex, -@@ -2945,23 +3366,10 @@ - \let\atchar=\@ - - % @{ @} @lbracechar{} @rbracechar{} all generate brace characters. --% Unless we're in typewriter, use \ecfont because the CM text fonts do --% not have braces, and we don't want to switch into math. --\def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}} --\def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}} --\let\{=\mylbrace \let\lbracechar=\{ --\let\}=\myrbrace \let\rbracechar=\} --\begingroup -- % Definitions to produce \{ and \} commands for indices, -- % and @{ and @} for the aux/toc files. -- \catcode`\{ = \other \catcode`\} = \other -- \catcode`\[ = 1 \catcode`\] = 2 -- \catcode`\! = 0 \catcode`\\ = \other -- !gdef!lbracecmd[\{]% -- !gdef!rbracecmd[\}]% -- !gdef!lbraceatcmd[@{]% -- !gdef!rbraceatcmd[@}]% --!endgroup -+\def\lbracechar{{\ifmonospace\char123\else\ensuremath\lbrace\fi}} -+\def\rbracechar{{\ifmonospace\char125\else\ensuremath\rbrace\fi}} -+\let\{=\lbracechar -+\let\}=\rbracechar - - % @comma{} to avoid , parsing problems. - \let\comma = , -@@ -2979,8 +3387,8 @@ - % Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss. - \def\questiondown{?`} - \def\exclamdown{!`} --\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}} --\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}} -+\def\ordf{\leavevmode\raise1ex\hbox{\switchtolllsize \underbar{a}}} -+\def\ordm{\leavevmode\raise1ex\hbox{\switchtolllsize \underbar{o}}} - - % Dotless i and dotless j, used for accents. - \def\imacro{i} -@@ -3009,12 +3417,12 @@ - {\setbox0=\hbox{T}% - \vbox to \ht0{\hbox{% - \ifx\textnominalsize\xwordpt -- % for 10pt running text, \lllsize (8pt) is too small for the A in LaTeX. -+ % for 10pt running text, lllsize (8pt) is too small for the A in LaTeX. - % Revert to plain's \scriptsize, which is 7pt. - \count255=\the\fam $\fam\count255 \scriptstyle A$% - \else - % For 11pt, we can use our lllsize. -- \selectfonts\lllsize A% -+ \switchtolllsize A% - \fi - }% - \vss -@@ -3080,7 +3488,7 @@ - % - \newbox\errorbox - % --{\tentt \global\dimen0 = 3em}% Width of the box. -+{\ttfont \global\dimen0 = 3em}% Width of the box. - \dimen2 = .55pt % Thickness of rules - % The text. (`r' is open on the right, `e' somewhat less so on the left.) - \setbox0 = \hbox{\kern-.75pt \reducedsf \putworderror\kern-1.5pt} -@@ -3196,8 +3604,15 @@ - \def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E} - \def\eogonek{{\ecfont \char"A6}}\def\macrochare{e} - % --% Use the ec* fonts (cm-super in outline format) for non-CM glyphs. --\def\ecfont{% -+% Use the European Computer Modern fonts (cm-super in outline format) -+% for non-CM glyphs. That is ec* for regular text and tc* for the text -+% companion symbols (LaTeX TS1 encoding). Both are part of the ec -+% package and follow the same conventions. -+% -+\def\ecfont{\etcfont{e}} -+\def\tcfont{\etcfont{t}} -+% -+\def\etcfont#1{% - % We can't distinguish serif/sans and italic/slanted, but this - % is used for crude hacks anyway (like adding French and German - % quotes to documents typeset with CM, where we lose kerning), so -@@ -3206,14 +3621,14 @@ - \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}% - \ifmonospace - % typewriter: -- \font\thisecfont = ectt\ecsize \space at \nominalsize -+ \font\thisecfont = #1ctt\ecsize \space at \nominalsize - \else - \ifx\curfontstyle\bfstylename - % bold: -- \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize -+ \font\thisecfont = #1cb\ifusingit{i}{x}\ecsize \space at \nominalsize - \else - % regular: -- \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize -+ \font\thisecfont = #1c\ifusingit{ti}{rm}\ecsize \space at \nominalsize - \fi - \fi - \thisecfont -@@ -3224,7 +3639,7 @@ - % Adapted from the plain.tex definition of \copyright. - % - \def\registeredsymbol{% -- $^{{\ooalign{\hfil\raise.07ex\hbox{\selectfonts\lllsize R}% -+ $^{{\ooalign{\hfil\raise.07ex\hbox{\switchtolllsize R}% - \hfil\crcr\Orb}}% - }$% - } -@@ -3257,13 +3672,16 @@ - \newif\ifseenauthor - \newif\iffinishedtitlepage - --% Do an implicit @contents or @shortcontents after @end titlepage if the --% user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage. --% --\newif\ifsetcontentsaftertitlepage -- \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue --\newif\ifsetshortcontentsaftertitlepage -- \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue -+% @setcontentsaftertitlepage used to do an implicit @contents or -+% @shortcontents after @end titlepage, but it is now obsolete. -+\def\setcontentsaftertitlepage{% -+ \errmessage{@setcontentsaftertitlepage has been removed as a Texinfo -+ command; move your @contents command if you want the contents -+ after the title page.}}% -+\def\setshortcontentsaftertitlepage{% -+ \errmessage{@setshortcontentsaftertitlepage has been removed as a Texinfo -+ command; move your @shortcontents and @contents commands if you -+ want the contents after the title page.}}% - - \parseargdef\shorttitlepage{% - \begingroup \hbox{}\vskip 1.5in \chaprm \centerline{#1}% -@@ -3305,20 +3723,6 @@ - % Need this before the \...aftertitlepage checks so that if they are - % in effect the toc pages will come out with page numbers. - \HEADINGSon -- % -- % If they want short, they certainly want long too. -- \ifsetshortcontentsaftertitlepage -- \shortcontents -- \contents -- \global\let\shortcontents = \relax -- \global\let\contents = \relax -- \fi -- % -- \ifsetcontentsaftertitlepage -- \contents -- \global\let\contents = \relax -- \global\let\shortcontents = \relax -- \fi - } - - \def\finishtitlepage{% -@@ -3329,12 +3733,11 @@ - - % Settings used for typesetting titles: no hyphenation, no indentation, - % don't worry much about spacing, ragged right. This should be used --% inside a \vbox, and fonts need to be set appropriately first. Because --% it is always used for titles, nothing else, we call \rmisbold. \par --% should be specified before the end of the \vbox, since a vbox is a group. -+% inside a \vbox, and fonts need to be set appropriately first. \par should -+% be specified before the end of the \vbox, since a vbox is a group. - % - \def\raggedtitlesettings{% -- \rmisbold -+ \rm - \hyphenpenalty=10000 - \parindent=0pt - \tolerance=5000 -@@ -3343,7 +3746,7 @@ - - % Macros to be used within @titlepage: - --\let\subtitlerm=\tenrm -+\let\subtitlerm=\rmfont - \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines} - - \parseargdef\title{% -@@ -3369,7 +3772,7 @@ - \else - \checkenv\titlepage - \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi -- {\secfonts\rmisbold \leftline{#1}}% -+ {\secfonts\rm \leftline{#1}}% - \fi - } - -@@ -3383,7 +3786,7 @@ - \newtoks\evenfootline % footline on even pages - \newtoks\oddfootline % footline on odd pages - --% Now make TeX use those variables -+% Now make \makeheadline and \makefootline in Plain TeX use those variables - \headline={{\textfonts\rm \ifodd\pageno \the\oddheadline - \else \the\evenheadline \fi}} - \footline={{\textfonts\rm \ifodd\pageno \the\oddfootline -@@ -3422,7 +3825,7 @@ - % - % Leave some space for the footline. Hopefully ok to assume - % @evenfooting will not be used by itself. -- \global\advance\pageheight by -12pt -+ \global\advance\txipageheight by -12pt - \global\advance\vsize by -12pt - } - -@@ -3439,13 +3842,17 @@ - % @everyheadingmarks - % @everyfootingmarks - -+% These define \getoddheadingmarks, \getevenheadingmarks, -+% \getoddfootingmarks, and \getevenfootingmarks, each to one of -+% \gettopheadingmarks, \getbottomheadingmarks. -+% - \def\evenheadingmarks{\headingmarks{even}{heading}} - \def\oddheadingmarks{\headingmarks{odd}{heading}} - \def\evenfootingmarks{\headingmarks{even}{footing}} - \def\oddfootingmarks{\headingmarks{odd}{footing}} --\def\everyheadingmarks#1 {\headingmarks{even}{heading}{#1} -+\parseargdef\everyheadingmarks{\headingmarks{even}{heading}{#1} - \headingmarks{odd}{heading}{#1} } --\def\everyfootingmarks#1 {\headingmarks{even}{footing}{#1} -+\parseargdef\everyfootingmarks{\headingmarks{even}{footing}{#1} - \headingmarks{odd}{footing}{#1} } - % #1 = even/odd, #2 = heading/footing, #3 = top/bottom. - \def\headingmarks#1#2#3 {% -@@ -3466,7 +3873,7 @@ - % By default, they are off at the start of a document, - % and turned `on' after @end titlepage. - --\def\headings #1 {\csname HEADINGS#1\endcsname} -+\parseargdef\headings{\csname HEADINGS#1\endcsname} - - \def\headingsoff{% non-global headings elimination - \evenheadline={\hfil}\evenfootline={\hfil}% -@@ -3486,7 +3893,7 @@ - \global\evenfootline={\hfil} - \global\oddfootline={\hfil} - \global\evenheadline={\line{\folio\hfil\thistitle}} --\global\oddheadline={\line{\thischapter\hfil\folio}} -+\global\oddheadline={\line{\thischapterheading\hfil\folio}} - \global\let\contentsalignmacro = \chapoddpage - } - \let\contentsalignmacro = \chappager -@@ -3497,8 +3904,8 @@ - \global\pageno=1 - \global\evenfootline={\hfil} - \global\oddfootline={\hfil} --\global\evenheadline={\line{\thischapter\hfil\folio}} --\global\oddheadline={\line{\thischapter\hfil\folio}} -+\global\evenheadline={\line{\thischapterheading\hfil\folio}} -+\global\oddheadline={\line{\thischapterheading\hfil\folio}} - \global\let\contentsalignmacro = \chappager - } - \def\HEADINGSon{\HEADINGSdouble} -@@ -3509,7 +3916,7 @@ - \global\evenfootline={\hfil} - \global\oddfootline={\hfil} - \global\evenheadline={\line{\folio\hfil\thistitle}} --\global\oddheadline={\line{\thischapter\hfil\folio}} -+\global\oddheadline={\line{\thischapterheading\hfil\folio}} - \global\let\contentsalignmacro = \chapoddpage - } - -@@ -3517,8 +3924,8 @@ - \def\HEADINGSsinglex{% - \global\evenfootline={\hfil} - \global\oddfootline={\hfil} --\global\evenheadline={\line{\thischapter\hfil\folio}} --\global\oddheadline={\line{\thischapter\hfil\folio}} -+\global\evenheadline={\line{\thischapterheading\hfil\folio}} -+\global\oddheadline={\line{\thischapterheading\hfil\folio}} - \global\let\contentsalignmacro = \chappager - } - -@@ -3728,7 +4135,12 @@ - \noindent - \hbox to 0pt{\hss \itemcontents \kern\itemmargin}% - % -- \vadjust{\penalty 1200}}% not good to break after first line of item. -+ \ifinner\else -+ \vadjust{\penalty 1200}% not good to break after first line of item. -+ \fi -+ % We can be in inner vertical mode in a footnote, although an -+ % @itemize looks awful there. -+ }% - \flushcr - } - -@@ -4275,6 +4687,31 @@ - \fi - } - -+% Like \expandablevalue, but completely expandable (the \message in the -+% definition above operates at the execution level of TeX). Used when -+% writing to auxiliary files, due to the expansion that \write does. -+% If flag is undefined, pass through an unexpanded @value command: maybe it -+% will be set by the time it is read back in. -+% -+% NB flag names containing - or _ may not work here. -+\def\dummyvalue#1{% -+ \expandafter\ifx\csname SET#1\endcsname\relax -+ \noexpand\value{#1}% -+ \else -+ \csname SET#1\endcsname -+ \fi -+} -+ -+% Used for @value's in index entries to form the sort key: expand the @value -+% if possible, otherwise sort late. -+\def\indexnofontsvalue#1{% -+ \expandafter\ifx\csname SET#1\endcsname\relax -+ ZZZZZZZ -+ \else -+ \csname SET#1\endcsname -+ \fi -+} -+ - % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined - % with @set. - % -@@ -4350,19 +4787,16 @@ - % except not \outer, so it can be used within macros and \if's. - \edef\newwrite{\makecsname{ptexnewwrite}} - --% \newindex {foo} defines an index named foo. --% It automatically defines \fooindex such that --% \fooindex ...rest of line... puts an entry in the index foo. --% It also defines \fooindfile to be the number of the output channel for --% the file that accumulates this index. The file's extension is foo. -+% \newindex {foo} defines an index named IX. -+% It automatically defines \IXindex such that -+% \IXindex ...rest of line... puts an entry in the index IX. -+% It also defines \IXindfile to be the number of the output channel for -+% the file that accumulates this index. The file's extension is IX. - % The name of an index should be no more than 2 characters long - % for the sake of vms. - % - \def\newindex#1{% -- \iflinks -- \expandafter\newwrite \csname#1indfile\endcsname -- \openout \csname#1indfile\endcsname \jobname.#1 % Open the file -- \fi -+ \expandafter\chardef\csname#1indfile\endcsname=0 - \expandafter\xdef\csname#1index\endcsname{% % Define @#1index - \noexpand\doindex{#1}} - } -@@ -4376,14 +4810,19 @@ - \def\defcodeindex{\parsearg\newcodeindex} - % - \def\newcodeindex#1{% -- \iflinks -- \expandafter\newwrite \csname#1indfile\endcsname -- \openout \csname#1indfile\endcsname \jobname.#1 -- \fi -+ \expandafter\chardef\csname#1indfile\endcsname=0 - \expandafter\xdef\csname#1index\endcsname{% - \noexpand\docodeindex{#1}}% - } - -+% The default indices: -+\newindex{cp}% concepts, -+\newcodeindex{fn}% functions, -+\newcodeindex{vr}% variables, -+\newcodeindex{tp}% types, -+\newcodeindex{ky}% keys -+\newcodeindex{pg}% and programs. -+ - - % @synindex foo bar makes index foo feed into index bar. - % Do this instead of @defindex foo if you don't want it as a separate index. -@@ -4397,14 +4836,7 @@ - % #1 is \doindex or \docodeindex, #2 the index getting redefined (foo), - % #3 the target index (bar). - \def\dosynindex#1#2#3{% -- % Only do \closeout if we haven't already done it, else we'll end up -- % closing the target index. -- \expandafter \ifx\csname donesynindex#2\endcsname \relax -- % The \closeout helps reduce unnecessary open files; the limit on the -- % Acorn RISC OS is a mere 16 files. -- \expandafter\closeout\csname#2indfile\endcsname -- \expandafter\let\csname donesynindex#2\endcsname = 1 -- \fi -+ \requireopenindexfile{#3}% - % redefine \fooindfile: - \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname - \expandafter\let\csname#2indfile\endcsname=\temp -@@ -4412,106 +4844,72 @@ - \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}% - } - --% Define \doindex, the driver for all \fooindex macros. -+% Define \doindex, the driver for all index macros. - % Argument #1 is generated by the calling \fooindex macro, --% and it is "foo", the name of the index. -- --% \doindex just uses \parsearg; it calls \doind for the actual work. --% This is because \doind is more useful to call from other macros. -- --% There is also \dosubind {index}{topic}{subtopic} --% which makes an entry in a two-level index such as the operation index. -+% and it is the two-letter name of the index. - --\def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer} --\def\singleindexer #1{\doind{\indexname}{#1}} -+\def\doindex#1{\edef\indexname{#1}\parsearg\doindexxxx} -+\def\doindexxxx #1{\doind{\indexname}{#1}} - - % like the previous two, but they put @code around the argument. --\def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer} --\def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}} -+\def\docodeindex#1{\edef\indexname{#1}\parsearg\docodeindexxxx} -+\def\docodeindexxxx #1{\doind{\indexname}{\code{#1}}} - --% Take care of Texinfo commands that can appear in an index entry. --% Since there are some commands we want to expand, and others we don't, --% we have to laboriously prevent expansion for those that we don't. -+ -+% Used when writing an index entry out to an index file to prevent -+% expansion of Texinfo commands that can appear in an index entry. - % - \def\indexdummies{% - \escapechar = `\\ % use backslash in output files. -- \def\@{@}% change to @@ when we switch to @ as escape char in index files. -- \def\ {\realbackslash\space }% -- % -- % Need these unexpandable (because we define \tt as a dummy) -- % definitions when @{ or @} appear in index entry text. Also, more -- % complicated, when \tex is in effect and \{ is a \delimiter again. -- % We can't use \lbracecmd and \rbracecmd because texindex assumes -- % braces and backslashes are used only as delimiters. Perhaps we -- % should use @lbracechar and @rbracechar? -- \def\{{{\tt\char123}}% -- \def\}{{\tt\char125}}% -- % -- % I don't entirely understand this, but when an index entry is -- % generated from a macro call, the \endinput which \scanmacro inserts -- % causes processing to be prematurely terminated. This is, -- % apparently, because \indexsorttmp is fully expanded, and \endinput -- % is an expandable command. The redefinition below makes \endinput -- % disappear altogether for that purpose -- although logging shows that -- % processing continues to some further point. On the other hand, it -- % seems \endinput does not hurt in the printed index arg, since that -- % is still getting written without apparent harm. -- % -- % Sample source (mac-idx3.tex, reported by Graham Percival to -- % help-texinfo, 22may06): -- % @macro funindex {WORD} -- % @findex xyz -- % @end macro -- % ... -- % @funindex commtest -- % This is not enough to reproduce the bug, but it gives the flavor. -- % -- % Sample whatsit resulting: -- % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}} -+ \definedummyletter\@% -+ \definedummyletter\ % - % -- % So: -- \let\endinput = \empty -+ % For texindex which always views { and } as separators. -+ \def\{{\lbracechar{}}% -+ \def\}{\rbracechar{}}% - % - % Do the redefinitions. -- \commondummies -+ \definedummies - } - --% For the aux and toc files, @ is the escape character. So we want to --% redefine everything using @ as the escape character (instead of --% \realbackslash, still used for index files). When everything uses @, --% this will be simpler. -+% Used for the aux and toc files, where @ is the escape character. - % - \def\atdummies{% -- \def\@{@@}% -- \def\ {@ }% -- \let\{ = \lbraceatcmd -- \let\} = \rbraceatcmd -+ \definedummyletter\@% -+ \definedummyletter\ % -+ \definedummyletter\{% -+ \definedummyletter\}% - % - % Do the redefinitions. -- \commondummies -+ \definedummies - \otherbackslash - } - --% Called from \indexdummies and \atdummies. -+% \definedummyword defines \#1 as \string\#1\space, thus effectively -+% preventing its expansion. This is used only for control words, -+% not control letters, because the \space would be incorrect for -+% control characters, but is needed to separate the control word -+% from whatever follows. - % --\def\commondummies{% -- % \definedummyword defines \#1 as \string\#1\space, thus effectively -- % preventing its expansion. This is used only for control words, -- % not control letters, because the \space would be incorrect for -- % control characters, but is needed to separate the control word -- % from whatever follows. -- % -- % For control letters, we have \definedummyletter, which omits the -- % space. -- % -- % These can be used both for control words that take an argument and -- % those that do not. If it is followed by {arg} in the input, then -- % that will dutifully get written to the index (or wherever). -- % -- \def\definedummyword ##1{\def##1{\string##1\space}}% -- \def\definedummyletter##1{\def##1{\string##1}}% -- \let\definedummyaccent\definedummyletter -+% These can be used both for control words that take an argument and -+% those that do not. If it is followed by {arg} in the input, then -+% that will dutifully get written to the index (or wherever). -+% -+% For control letters, we have \definedummyletter, which omits the -+% space. -+% -+\def\definedummyword #1{\def#1{\string#1\space}}% -+\def\definedummyletter#1{\def#1{\string#1}}% -+\let\definedummyaccent\definedummyletter -+ -+% Called from \indexdummies and \atdummies, to effectively prevent -+% the expansion of commands. -+% -+\def\definedummies{% - % -+ \let\commondummyword\definedummyword -+ \let\commondummyletter\definedummyletter -+ \let\commondummyaccent\definedummyaccent - \commondummiesnofonts - % - \definedummyletter\_% -@@ -4552,6 +4950,7 @@ - \definedummyword\TeX - % - % Assorted special characters. -+ \definedummyword\atchar - \definedummyword\arrow - \definedummyword\bullet - \definedummyword\comma -@@ -4591,98 +4990,130 @@ - % - % We want to disable all macros so that they are not expanded by \write. - \macrolist -+ \let\value\dummyvalue - % - \normalturnoffactive -- % -- % Handle some cases of @value -- where it does not contain any -- % (non-fully-expandable) commands. -- \makevalueexpandable - } - --% \commondummiesnofonts: common to \commondummies and \indexnofonts. -+% \commondummiesnofonts: common to \definedummies and \indexnofonts. -+% Define \commondummyletter, \commondummyaccent and \commondummyword before -+% using. Used for accents, font commands, and various control letters. - % - \def\commondummiesnofonts{% - % Control letters and accents. -- \definedummyletter\!% -- \definedummyaccent\"% -- \definedummyaccent\'% -- \definedummyletter\*% -- \definedummyaccent\,% -- \definedummyletter\.% -- \definedummyletter\/% -- \definedummyletter\:% -- \definedummyaccent\=% -- \definedummyletter\?% -- \definedummyaccent\^% -- \definedummyaccent\`% -- \definedummyaccent\~% -- \definedummyword\u -- \definedummyword\v -- \definedummyword\H -- \definedummyword\dotaccent -- \definedummyword\ogonek -- \definedummyword\ringaccent -- \definedummyword\tieaccent -- \definedummyword\ubaraccent -- \definedummyword\udotaccent -- \definedummyword\dotless -+ \commondummyletter\!% -+ \commondummyaccent\"% -+ \commondummyaccent\'% -+ \commondummyletter\*% -+ \commondummyaccent\,% -+ \commondummyletter\.% -+ \commondummyletter\/% -+ \commondummyletter\:% -+ \commondummyaccent\=% -+ \commondummyletter\?% -+ \commondummyaccent\^% -+ \commondummyaccent\`% -+ \commondummyaccent\~% -+ \commondummyword\u -+ \commondummyword\v -+ \commondummyword\H -+ \commondummyword\dotaccent -+ \commondummyword\ogonek -+ \commondummyword\ringaccent -+ \commondummyword\tieaccent -+ \commondummyword\ubaraccent -+ \commondummyword\udotaccent -+ \commondummyword\dotless - % - % Texinfo font commands. -- \definedummyword\b -- \definedummyword\i -- \definedummyword\r -- \definedummyword\sansserif -- \definedummyword\sc -- \definedummyword\slanted -- \definedummyword\t -+ \commondummyword\b -+ \commondummyword\i -+ \commondummyword\r -+ \commondummyword\sansserif -+ \commondummyword\sc -+ \commondummyword\slanted -+ \commondummyword\t - % - % Commands that take arguments. -- \definedummyword\abbr -- \definedummyword\acronym -- \definedummyword\anchor -- \definedummyword\cite -- \definedummyword\code -- \definedummyword\command -- \definedummyword\dfn -- \definedummyword\dmn -- \definedummyword\email -- \definedummyword\emph -- \definedummyword\env -- \definedummyword\file -- \definedummyword\image -- \definedummyword\indicateurl -- \definedummyword\inforef -- \definedummyword\kbd -- \definedummyword\key -- \definedummyword\math -- \definedummyword\option -- \definedummyword\pxref -- \definedummyword\ref -- \definedummyword\samp -- \definedummyword\strong -- \definedummyword\tie -- \definedummyword\U -- \definedummyword\uref -- \definedummyword\url -- \definedummyword\var -- \definedummyword\verb -- \definedummyword\w -- \definedummyword\xref -- % -- % Consider: -- % @macro mkind{arg1,arg2} -- % @cindex \arg2\ -- % @end macro -- % @mkind{foo, bar} -- % The space after the comma will end up in the temporary definition -- % that we make for arg2 (see \parsemargdef ff.). We want all this to be -- % expanded for the sake of the index, so we end up just seeing "bar". -- \let\xeatspaces = \eatspaces -+ \commondummyword\abbr -+ \commondummyword\acronym -+ \commondummyword\anchor -+ \commondummyword\cite -+ \commondummyword\code -+ \commondummyword\command -+ \commondummyword\dfn -+ \commondummyword\dmn -+ \commondummyword\email -+ \commondummyword\emph -+ \commondummyword\env -+ \commondummyword\file -+ \commondummyword\image -+ \commondummyword\indicateurl -+ \commondummyword\inforef -+ \commondummyword\kbd -+ \commondummyword\key -+ \commondummyword\math -+ \commondummyword\option -+ \commondummyword\pxref -+ \commondummyword\ref -+ \commondummyword\samp -+ \commondummyword\strong -+ \commondummyword\tie -+ \commondummyword\U -+ \commondummyword\uref -+ \commondummyword\url -+ \commondummyword\var -+ \commondummyword\verb -+ \commondummyword\w -+ \commondummyword\xref - } - - % For testing: output @{ and @} in index sort strings as \{ and \}. - \newif\ifusebracesinindexes - -+\let\indexlbrace\relax -+\let\indexrbrace\relax -+ -+{\catcode`\@=0 -+\catcode`\\=13 -+ @gdef@backslashdisappear{@def\{}} -+} -+ -+{ -+\catcode`\<=13 -+\catcode`\-=13 -+\catcode`\`=13 -+ \gdef\indexnonalnumdisappear{% -+ \expandafter\ifx\csname SETtxiindexlquoteignore\endcsname\relax\else -+ % @set txiindexlquoteignore makes us ignore left quotes in the sort term. -+ % (Introduced for FSFS 2nd ed.) -+ \let`=\empty -+ \fi -+ % -+ \expandafter\ifx\csname SETtxiindexbackslashignore\endcsname\relax\else -+ \backslashdisappear -+ \fi -+ % -+ \expandafter\ifx\csname SETtxiindexhyphenignore\endcsname\relax\else -+ \def-{}% -+ \fi -+ \expandafter\ifx\csname SETtxiindexlessthanignore\endcsname\relax\else -+ \def<{}% -+ \fi -+ \expandafter\ifx\csname SETtxiindexatsignignore\endcsname\relax\else -+ \def\@{}% -+ \fi -+ } -+ -+ \gdef\indexnonalnumreappear{% -+ \useindexbackslash -+ \let-\normaldash -+ \let<\normalless -+ \def\@{@}% -+ } -+} -+ -+ - % \indexnofonts is used when outputting the strings to sort the index - % by, and when constructing control sequence names. It eliminates all - % control sequences and just writes whatever the best ASCII sort string -@@ -4690,12 +5121,11 @@ - % - \def\indexnofonts{% - % Accent commands should become @asis. -- \def\definedummyaccent##1{\let##1\asis}% -+ \def\commondummyaccent##1{\let##1\asis}% - % We can just ignore other control letters. -- \def\definedummyletter##1{\let##1\empty}% -+ \def\commondummyletter##1{\let##1\empty}% - % All control words become @asis by default; overrides below. -- \let\definedummyword\definedummyaccent -- % -+ \let\commondummyword\commondummyaccent - \commondummiesnofonts - % - % Don't no-op \tt, since it isn't a user-level command -@@ -4708,19 +5138,10 @@ - \def\_{\normalunderscore}% - \def\-{}% @- shouldn't affect sorting - % -- % Unfortunately, texindex is not prepared to handle braces in the -- % content at all. So for index sorting, we map @{ and @} to strings -- % starting with |, since that ASCII character is between ASCII { and }. -- \ifusebracesinindexes -- \def\lbracechar{\lbracecmd}% -- \def\rbracechar{\rbracecmd}% -- \else -- \def\lbracechar{|a}% -- \def\rbracechar{|b}% -- \fi -- \let\{=\lbracechar -- \let\}=\rbracechar -- % -+ \uccode`\1=`\{ \uppercase{\def\{{1}}% -+ \uccode`\1=`\} \uppercase{\def\}{1}}% -+ \let\lbracechar\{% -+ \let\rbracechar\}% - % - % Non-English letters. - \def\AA{AA}% -@@ -4729,7 +5150,7 @@ - \def\L{L}% - \def\OE{OE}% - \def\O{O}% -- \def\TH{ZZZ}% -+ \def\TH{TH}% - \def\aa{aa}% - \def\ae{ae}% - \def\dh{dzz}% -@@ -4741,45 +5162,45 @@ - \def\o{o}% - \def\questiondown{?}% - \def\ss{ss}% -- \def\th{zzz}% -+ \def\th{th}% - % - \def\LaTeX{LaTeX}% - \def\TeX{TeX}% - % -- % Assorted special characters. -- % (The following {} will end up in the sort string, but that's ok.) -- \def\arrow{->}% -- \def\bullet{bullet}% -- \def\comma{,}% -- \def\copyright{copyright}% -- \def\dots{...}% -- \def\enddots{...}% -- \def\equiv{==}% -- \def\error{error}% -- \def\euro{euro}% -- \def\expansion{==>}% -- \def\geq{>=}% -- \def\guillemetleft{<<}% -- \def\guillemetright{>>}% -- \def\guilsinglleft{<}% -- \def\guilsinglright{>}% -- \def\leq{<=}% -- \def\minus{-}% -- \def\point{.}% -- \def\pounds{pounds}% -- \def\print{-|}% -- \def\quotedblbase{"}% -- \def\quotedblleft{"}% -- \def\quotedblright{"}% -- \def\quoteleft{`}% -- \def\quoteright{'}% -- \def\quotesinglbase{,}% -- \def\registeredsymbol{R}% -- \def\result{=>}% -- \def\textdegree{o}% -- % -- \expandafter\ifx\csname SETtxiindexlquoteignore\endcsname\relax -- \else \indexlquoteignore \fi -+ % Assorted special characters. \defglyph gives the control sequence a -+ % definition that removes the {} that follows its use. -+ \defglyph\atchar{@}% -+ \defglyph\arrow{->}% -+ \defglyph\bullet{bullet}% -+ \defglyph\comma{,}% -+ \defglyph\copyright{copyright}% -+ \defglyph\dots{...}% -+ \defglyph\enddots{...}% -+ \defglyph\equiv{==}% -+ \defglyph\error{error}% -+ \defglyph\euro{euro}% -+ \defglyph\expansion{==>}% -+ \defglyph\geq{>=}% -+ \defglyph\guillemetleft{<<}% -+ \defglyph\guillemetright{>>}% -+ \defglyph\guilsinglleft{<}% -+ \defglyph\guilsinglright{>}% -+ \defglyph\leq{<=}% -+ \defglyph\lbracechar{\{}% -+ \defglyph\minus{-}% -+ \defglyph\point{.}% -+ \defglyph\pounds{pounds}% -+ \defglyph\print{-|}% -+ \defglyph\quotedblbase{"}% -+ \defglyph\quotedblleft{"}% -+ \defglyph\quotedblright{"}% -+ \defglyph\quoteleft{`}% -+ \defglyph\quoteright{'}% -+ \defglyph\quotesinglbase{,}% -+ \defglyph\rbracechar{\}}% -+ \defglyph\registeredsymbol{R}% -+ \defglyph\result{=>}% -+ \defglyph\textdegree{o}% - % - % We need to get rid of all macros, leaving only the arguments (if present). - % Of course this is not nearly correct, but it is the best we can do for now. -@@ -4792,21 +5213,24 @@ - % goes to end-of-line is not handled. - % - \macrolist -+ \let\value\indexnofontsvalue - } -+\def\defglyph#1#2{\def#1##1{#2}} % see above -+ -+ - --% Undocumented (for FSFS 2nd ed.): @set txiindexlquoteignore makes us --% ignore left quotes in the sort term. --{\catcode`\`=\active -- \gdef\indexlquoteignore{\let`=\empty}} - --\let\indexbackslash=0 %overridden during \printindex. - \let\SETmarginindex=\relax % put index entries in margin (undocumented)? - - % Most index entries go through here, but \dosubind is the general case. - % #1 is the index name, #2 is the entry text. - \def\doind#1#2{\dosubind{#1}{#2}{}} - --% Workhorse for all \fooindexes. -+% There is also \dosubind {index}{topic}{subtopic} -+% which makes an entry in a two-level index such as the operation index. -+% TODO: Two-level index? Operation index? -+ -+% Workhorse for all indexes. - % #1 is name of index, #2 is stuff to put there, #3 is subentry -- - % empty if called from \doind, as we usually are (the main exception - % is with most defuns, which call us directly). -@@ -4814,6 +5238,7 @@ - \def\dosubind#1#2#3{% - \iflinks - {% -+ \requireopenindexfile{#1}% - % Store the main index entry text (including the third arg). - \toks0 = {#2}% - % If third arg is present, precede it with a space. -@@ -4829,7 +5254,50 @@ - \fi - } - --% Write the entry in \toks0 to the index file: -+% Check if an index file has been opened, and if not, open it. -+\def\requireopenindexfile#1{% -+\ifnum\csname #1indfile\endcsname=0 -+ \expandafter\newwrite \csname#1indfile\endcsname -+ \edef\suffix{#1}% -+ % A .fls suffix would conflict with the file extension for the output -+ % of -recorder, so use .f1s instead. -+ \ifx\suffix\indexisfl\def\suffix{f1}\fi -+ % Open the file -+ \immediate\openout\csname#1indfile\endcsname \jobname.\suffix -+ % Using \immediate above here prevents an object entering into the current -+ % box, which could confound checks such as those in \safewhatsit for -+ % preceding skips. -+ \typeout{Writing index file \jobname.\suffix}% -+\fi} -+\def\indexisfl{fl} -+ -+% Output \ as {\indexbackslash}, because \ is an escape character in -+% the index files. -+\let\indexbackslash=\relax -+{\catcode`\@=0 \catcode`\\=\active -+ @gdef@useindexbackslash{@def\{{@indexbackslash}}} -+} -+ -+% Definition for writing index entry text. -+\def\sortas#1{\ignorespaces}% -+ -+% Definition for writing index entry sort key. Should occur at the at -+% the beginning of the index entry, like -+% @cindex @sortas{september} \september -+% The \ignorespaces takes care of following space, but there's no way -+% to remove space before it. -+{ -+\catcode`\-=13 -+\gdef\indexwritesortas{% -+ \begingroup -+ \indexnonalnumreappear -+ \indexwritesortasxxx} -+\gdef\indexwritesortasxxx#1{% -+ \xdef\indexsortkey{#1}\endgroup} -+} -+ -+ -+% Write the entry in \toks0 to the index file. - % - \def\dosubindwrite{% - % Put the index entry in the margin if desired. -@@ -4839,14 +5307,26 @@ - % - % Remember, we are within a group. - \indexdummies % Must do this here, since \bf, etc expand at this stage -- \def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now -- % so it will be output as is; and it will print as backslash. -+ \useindexbackslash % \indexbackslash isn't defined now so it will be output -+ % as is; and it will print as backslash. -+ % The braces around \indexbrace are recognized by texindex. - % -- % Process the index entry with all font commands turned off, to -- % get the string to sort by. -+ % Get the string to sort by, by processing the index entry with all -+ % font commands turned off. - {\indexnofonts -- \edef\temp{\the\toks0}% need full expansion -- \xdef\indexsorttmp{\temp}% -+ \def\lbracechar{{\indexlbrace}}% -+ \def\rbracechar{{\indexrbrace}}% -+ \let\{=\lbracechar -+ \let\}=\rbracechar -+ \indexnonalnumdisappear -+ \xdef\indexsortkey{}% -+ \let\sortas=\indexwritesortas -+ \edef\temp{\the\toks0}% -+ \setbox\dummybox = \hbox{\temp}% Make sure to execute any \sortas -+ \ifx\indexsortkey\empty -+ \xdef\indexsortkey{\temp}% -+ \ifx\indexsortkey\empty\xdef\indexsortkey{ }\fi -+ \fi - }% - % - % Set up the complete index entry, with both the sort key and -@@ -4856,10 +5336,11 @@ - % sorted result. - \edef\temp{% - \write\writeto{% -- \string\entry{\indexsorttmp}{\noexpand\folio}{\the\toks0}}% -+ \string\entry{\indexsortkey}{\noexpand\folio}{\the\toks0}}% - }% - \temp - } -+\newbox\dummybox % used above - - % Take care of unwanted page breaks/skips around a whatsit: - % -@@ -4984,52 +5465,107 @@ - % \initial {@} - % as its first line, TeX doesn't complain about mismatched braces - % (because it thinks @} is a control sequence). -- \catcode`\@ = 11 -- \openin 1 \jobname.#1s -+ \catcode`\@ = 12 -+ % See comment in \requireopenindexfile. -+ \def\indexname{#1}\ifx\indexname\indexisfl\def\indexname{f1}\fi -+ \openin 1 \jobname.\indexname s - \ifeof 1 - % \enddoublecolumns gets confused if there is no text in the index, - % and it loses the chapter title and the aux file entries for the - % index. The easiest way to prevent this problem is to make sure - % there is some text. - \putwordIndexNonexistent -+ \typeout{No file \jobname.\indexname s.}% - \else -+ \catcode`\\ = 0 - % - % If the index file exists but is empty, then \openin leaves \ifeof - % false. We have to make TeX try to read something from the file, so - % it can discover if there is anything in it. -- \read 1 to \temp -+ \read 1 to \thisline - \ifeof 1 - \putwordIndexIsEmpty - \else - % Index files are almost Texinfo source, but we use \ as the escape - % character. It would be better to use @, but that's too big a change - % to make right now. -- \def\indexbackslash{\backslashcurfont}% -- \catcode`\\ = 0 -- \escapechar = `\\ -+ \def\indexbackslash{\ttbackslash}% -+ \let\indexlbrace\{ % Likewise, set these sequences for braces -+ \let\indexrbrace\} % used in the sort key. - \begindoublecolumns -- \input \jobname.#1s -+ \let\entrywidowpenalty=\indexwidowpenalty -+ % -+ % Read input from the index file line by line. -+ \loopdo -+ \ifeof1 -+ \let\firsttoken\relax -+ \else -+ \read 1 to \nextline -+ \edef\act{\gdef\noexpand\firsttoken{\getfirsttoken\nextline}}% -+ \act -+ \fi -+ \thisline -+ % -+ \ifeof1\else -+ \let\thisline\nextline -+ \repeat -+ %% - \enddoublecolumns - \fi - \fi - \closein 1 - \endgroup} - -+\def\getfirsttoken#1{\expandafter\getfirsttokenx#1\endfirsttoken} -+\long\def\getfirsttokenx#1#2\endfirsttoken{\noexpand#1} -+ -+\def\loopdo#1\repeat{\def\body{#1}\loopdoxxx} -+\def\loopdoxxx{\let\next=\relax\body\let\next=\loopdoxxx\fi\next} -+ - % These macros are used by the sorted index file itself. - % Change them to control the appearance of the index. - --\def\initial#1{{% -- % Some minor font changes for the special characters. -- \let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt -+{\catcode`\/=13 \catcode`\-=13 \catcode`\^=13 \catcode`\~=13 \catcode`\_=13 -+\catcode`\|=13 \catcode`\<=13 \catcode`\>=13 \catcode`\+=13 \catcode`\"=13 -+\catcode`\$=3 -+\gdef\initialglyphs{% -+ % Some changes for non-alphabetic characters. Using the glyphs from the -+ % math fonts looks more consistent than the typewriter font used elsewhere -+ % for these characters. -+ \def\indexbackslash{\math{\backslash}}% -+ \let\\=\indexbackslash - % -+ % Can't get bold backslash so don't use bold forward slash -+ \catcode`\/=13 -+ \def/{{\secrmnotbold \normalslash}}% -+ \def-{{\normaldash\normaldash}}% en dash `--' -+ \def^{{\chapbf \normalcaret}}% -+ \def~{{\chapbf \normaltilde}}% -+ \def\_{% -+ \leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em }% -+ \def|{$\vert$}% -+ \def<{$\less$}% -+ \def>{$\gtr$}% -+ \def+{$\normalplus$}% -+}} -+ -+\def\initial{% -+ \bgroup -+ \initialglyphs -+ \initialx -+} -+ -+\def\initialx#1{% - % Remove any glue we may have, we'll be inserting our own. - \removelastskip - % - % We like breaks before the index initials, so insert a bonus. -+ % The glue before the bonus allows a little bit of space at the -+ % bottom of a column to reduce an increase in inter-line spacing. - \nobreak -- \vskip 0pt plus 3\baselineskip -- \penalty 0 -- \vskip 0pt plus -3\baselineskip -+ \vskip 0pt plus 5\baselineskip -+ \penalty -300 -+ \vskip 0pt plus -5\baselineskip - % - % Typeset the initial. Making this add up to a whole number of - % baselineskips increases the chance of the dots lining up from column -@@ -5037,63 +5573,45 @@ - % we need before each entry, but it's better. - % - % No shrink because it confuses \balancecolumns. -- \vskip 1.67\baselineskip plus .5\baselineskip -- \leftline{\secbf #1}% -+ \vskip 1.67\baselineskip plus 1\baselineskip -+ \leftline{\secfonts \kern-0.05em \secbf #1}% -+ % \secfonts is inside the argument of \leftline so that the change of -+ % \baselineskip will not affect any glue inserted before the vbox that -+ % \leftline creates. - % Do our best not to break after the initial. - \nobreak - \vskip .33\baselineskip plus .1\baselineskip --}} -+ \egroup % \initialglyphs -+} -+ -+\newdimen\entryrightmargin -+\entryrightmargin=0pt - - % \entry typesets a paragraph consisting of the text (#1), dot leaders, and - % then page number (#2) flushed to the right margin. It is used for index - % and table of contents entries. The paragraph is indented by \leftskip. - % --% A straightforward implementation would start like this: --% \def\entry#1#2{... --% But this freezes the catcodes in the argument, and can cause problems to --% @code, which sets - active. This problem was fixed by a kludge--- --% ``-'' was active throughout whole index, but this isn't really right. --% The right solution is to prevent \entry from swallowing the whole text. --% --kasal, 21nov03 - \def\entry{% - \begingroup - % -+ % For pdfTeX and XeTeX. -+ % The redefinition of \domark stops marks being added in \pdflink to -+ % preserve coloured links across page boundaries. Otherwise the marks -+ % would get in the way of \lastbox in \insertindexentrybox. -+ \let\domark\relax -+ % - % Start a new paragraph if necessary, so our assignments below can't - % affect previous text. - \par - % -- % Do not fill out the last line with white space. -- \parfillskip = 0in -- % - % No extra space above this paragraph. - \parskip = 0in - % -- % Do not prefer a separate line ending with a hyphen to fewer lines. -- \finalhyphendemerits = 0 -- % -- % \hangindent is only relevant when the entry text and page number -- % don't both fit on one line. In that case, bob suggests starting the -- % dots pretty far over on the line. Unfortunately, a large -- % indentation looks wrong when the entry text itself is broken across -- % lines. So we use a small indentation and put up with long leaders. -- % -- % \hangafter is reset to 1 (which is the value we want) at the start -- % of each paragraph, so we need not do anything with that. -- \hangindent = 2em -- % -- % When the entry text needs to be broken, just fill out the first line -- % with blank space. -- \rightskip = 0pt plus1fil -- % -- % A bit of stretch before each entry for the benefit of balancing -- % columns. -- \vskip 0pt plus1pt -- % - % When reading the text of entry, convert explicit line breaks - % from @* into spaces. The user might give these in long section - % titles, for instance. - \def\*{\unskip\space\ignorespaces}% -- \def\entrybreak{\hfil\break}% -+ \def\entrybreak{\hfil\break}% An undocumented command - % - % Swallow the left brace of the text (first parameter): - \afterassignment\doentry -@@ -5101,45 +5619,166 @@ - } - \def\entrybreak{\unskip\space\ignorespaces}% - \def\doentry{% -+ % Save the text of the entry -+ \global\setbox\boxA=\hbox\bgroup - \bgroup % Instead of the swallowed brace. - \noindent - \aftergroup\finishentry - % And now comes the text of the entry. -+ % Not absorbing as a macro argument reduces the chance of problems -+ % with catcodes occurring. - } --\def\finishentry#1{% -+{\catcode`\@=11 -+\gdef\finishentry#1{% -+ \egroup % end box A -+ \dimen@ = \wd\boxA % Length of text of entry -+ \global\setbox\boxA=\hbox\bgroup\unhbox\boxA - % #1 is the page number. - % -- % The following is kludged to not output a line of dots in the index if -- % there are no page numbers. The next person who breaks this will be -- % cursed by a Unix daemon. -- \setbox\boxA = \hbox{#1}% -- \ifdim\wd\boxA = 0pt -- \ % -+ % Get the width of the page numbers, and only use -+ % leaders if they are present. -+ \global\setbox\boxB = \hbox{#1}% -+ \ifdim\wd\boxB = 0pt -+ \null\nobreak\hfill\ % - \else - % -- % If we must, put the page number on a line of its own, and fill out -- % this line with blank space. (The \hfil is overwhelmed with the -- % fill leaders glue in \indexdotfill if the page number does fit.) -- \hfil\penalty50 - \null\nobreak\indexdotfill % Have leaders before the page number. - % -- % The `\ ' here is removed by the implicit \unskip that TeX does as -- % part of (the primitive) \par. Without it, a spurious underfull -- % \hbox ensues. - \ifpdf -- \pdfgettoks#1.% -- \ \the\toksA -+ \pdfgettoks#1.% -+ \hskip\skip\thinshrinkable\the\toksA - \else -- \ #1% -+ \ifx\XeTeXrevision\thisisundefined -+ \hskip\skip\thinshrinkable #1% -+ \else -+ \pdfgettoks#1.% -+ \hskip\skip\thinshrinkable\the\toksA -+ \fi - \fi - \fi -- \par -+ \egroup % end \boxA -+ \ifdim\wd\boxB = 0pt -+ \global\setbox\entryindexbox=\vbox{\unhbox\boxA}% -+ \else -+ \global\setbox\entryindexbox=\vbox\bgroup -+ % We want the text of the entries to be aligned to the left, and the -+ % page numbers to be aligned to the right. -+ % -+ \parindent = 0pt -+ \advance\leftskip by 0pt plus 1fil -+ \advance\leftskip by 0pt plus -1fill -+ \rightskip = 0pt plus -1fil -+ \advance\rightskip by 0pt plus 1fill -+ % Cause last line, which could consist of page numbers on their own -+ % if the list of page numbers is long, to be aligned to the right. -+ \parfillskip=0pt plus -1fill -+ % -+ \advance\rightskip by \entryrightmargin -+ % Determine how far we can stretch into the margin. -+ % This allows, e.g., "Appendix H GNU Free Documentation License" to -+ % fit on one line in @letterpaper format. -+ \ifdim\entryrightmargin>2.1em -+ \dimen@i=2.1em -+ \else -+ \dimen@i=0em -+ \fi -+ \advance \parfillskip by 0pt minus 1\dimen@i -+ % -+ \dimen@ii = \hsize -+ \advance\dimen@ii by -1\leftskip -+ \advance\dimen@ii by -1\entryrightmargin -+ \advance\dimen@ii by 1\dimen@i -+ \ifdim\wd\boxA > \dimen@ii % If the entry doesn't fit in one line -+ \ifdim\dimen@ > 0.8\dimen@ii % due to long index text -+ \dimen@ = 0.7\dimen@ % Try to split the text roughly evenly -+ \dimen@ii = \hsize -+ \ifnum\dimen@>\dimen@ii -+ % If the entry is too long, use the whole line -+ \dimen@ = \dimen@ii -+ \fi -+ \advance\leftskip by 0pt plus 1fill % ragged right -+ \advance \dimen@ by 1\rightskip -+ \parshape = 2 0pt \dimen@ 0em \dimen@ii -+ % Ideally we'd add a finite glue at the end of the first line only, -+ % instead of using \parshape with explicit line lengths, but TeX -+ % doesn't seem to provide a way to do such a thing. -+ % -+ \leftskip = 1em -+ \parindent = -1em -+ \fi\fi -+ \indent % start paragraph -+ \unhbox\boxA -+ % -+ % Do not prefer a separate line ending with a hyphen to fewer lines. -+ \finalhyphendemerits = 0 -+ % -+ % Word spacing - no stretch -+ \spaceskip=\fontdimen2\font minus \fontdimen4\font -+ % -+ \linepenalty=1000 % Discourage line breaks. -+ \hyphenpenalty=5000 % Discourage hyphenation. -+ % -+ \par % format the paragraph -+ \egroup % The \vbox -+ \fi - \endgroup -+ % delay text of entry until after penalty -+ \bgroup\aftergroup\insertindexentrybox -+ \entrywidowpenalty -+}} -+ -+\newskip\thinshrinkable -+\skip\thinshrinkable=.15em minus .15em -+ -+\newbox\entryindexbox -+\def\insertindexentrybox{% -+ \ourunvbox\entryindexbox -+} -+ -+% Use \lastbox to take apart vbox box by box, and add each sub-box -+% to the current vertical list. -+\def\ourunvbox#1{% -+\bgroup % for local binding of \delayedbox -+ % Remove the last box from box #1 -+ \global\setbox#1=\vbox{% -+ \unvbox#1% -+ \unskip % remove any glue -+ \unpenalty -+ \global\setbox\interbox=\lastbox -+ }% -+ \setbox\delayedbox=\box\interbox -+ \ifdim\ht#1=0pt\else -+ \ourunvbox#1 % Repeat on what's left of the box -+ \nobreak -+ \fi -+ \box\delayedbox -+\egroup -+} -+\newbox\delayedbox -+\newbox\interbox -+ -+% Default is no penalty -+\let\entrywidowpenalty\egroup -+ -+% Used from \printindex. \firsttoken should be the first token -+% after the \entry. If it's not another \entry, we are at the last -+% line of a group of index entries, so insert a penalty to discourage -+% widowed index entries. -+\long\def\indexwidowpenalty{% -+ \def\isentry{\entry}% -+ \ifx\firsttoken\isentry -+ \else -+ \penalty 9000 -+ \fi -+ \egroup % now comes the box added with \aftergroup - } - - % Like plain.tex's \dotfill, except uses up at least 1 em. -+% The filll stretch here overpowers both the fil and fill stretch to push -+% the page number to the right. - \def\indexdotfill{\cleaders -- \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1fill} -+ \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1filll} -+ - - \def\primary #1{\line{#1\hfil}} - -@@ -5153,7 +5792,11 @@ - \ifpdf - \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. - \else -- #2 -+ \ifx\XeTeXrevision\thisisundefined -+ #2 -+ \else -+ \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. -+ \fi - \fi - \par - }} -@@ -5161,12 +5804,37 @@ - % Define two-column mode, which we use to typeset indexes. - % Adapted from the TeXbook, page 416, which is to say, - % the manmac.tex format used to print the TeXbook itself. --\catcode`\@=11 -+\catcode`\@=11 % private names - - \newbox\partialpage - \newdimen\doublecolumnhsize - -+% Use inside an output routine to save \topmark and \firstmark -+\def\savemarks{% -+ \global\savedtopmark=\expandafter{\topmark }% -+ \global\savedfirstmark=\expandafter{\firstmark }% -+} -+\newtoks\savedtopmark -+\newtoks\savedfirstmark -+ -+% Set \topmark and \firstmark for next time \output runs. -+% Can't be run from withinside \output (because any material -+% added while an output routine is active, including -+% penalties, is saved for after it finishes). The page so far -+% should be empty, otherwise what's on it will be thrown away. -+\def\restoremarks{% -+ \mark{\the\savedtopmark}% -+ \bgroup\output = {% -+ \setbox\dummybox=\box\PAGE -+ }abc\eject\egroup -+ % "abc" because output routine doesn't fire for a completely empty page. -+ \mark{\the\savedfirstmark}% -+} -+ - \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns -+ % If not much space left on page, start a new page. -+ \ifdim\pagetotal>0.8\vsize\vfill\eject\fi -+ % - % Grab any single-column material above us. - \output = {% - % -@@ -5186,8 +5854,15 @@ - \unvbox\PAGE - \kern-\topskip \kern\baselineskip - }% -+ \savemarks - }% - \eject % run that output routine to set \partialpage -+ \restoremarks -+ % -+ % We recover the two marks that the last output routine saved in order -+ % to propagate the information in marks added around a chapter heading, -+ % which could be otherwise be lost by the time the final page is output. -+ % - % - % Use the double-column output routine for subsequent pages. - \output = {\doublecolumnout}% -@@ -5213,27 +5888,31 @@ - \divide\doublecolumnhsize by 2 - \hsize = \doublecolumnhsize - % -- % Double the \vsize as well. (We don't need a separate register here, -- % since nobody clobbers \vsize.) -+ % Double the \vsize as well. -+ \advance\vsize by -\ht\partialpage - \vsize = 2\vsize -+ % -+ % For the benefit of balancing columns -+ \advance\baselineskip by 0pt plus 0.5pt - } - - % The double-column output routine for all double-column pages except --% the last. -+% the last, which is done by \balancecolumns. - % - \def\doublecolumnout{% -+ % - \splittopskip=\topskip \splitmaxdepth=\maxdepth - % Get the available space for the double columns -- the normal - % (undoubled) page height minus any material left over from the - % previous page. - \dimen@ = \vsize - \divide\dimen@ by 2 -- \advance\dimen@ by -\ht\partialpage - % - % box0 will be the left-hand column, box2 the right. -- \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@ -+ \setbox0=\vsplit\PAGE to\dimen@ \setbox2=\vsplit\PAGE to\dimen@ -+ \global\advance\vsize by 2\ht\partialpage - \onepageout\pagesofar -- \unvbox255 -+ \unvbox\PAGE - \penalty\outputpenalty - } - % -@@ -5244,10 +5923,11 @@ - % - \hsize = \doublecolumnhsize - \wd0=\hsize \wd2=\hsize -- \hbox to\pagewidth{\box0\hfil\box2}% -+ \hbox to\txipagewidth{\box0\hfil\box2}% - } --% --% All done with double columns. -+ -+ -+% Finished with with double columns. - \def\enddoublecolumns{% - % The following penalty ensures that the page builder is exercised - % _before_ we change the output routine. This is necessary in the -@@ -5270,7 +5950,7 @@ - % goal. When TeX sees \eject from below which follows the final - % section, it invokes the new output routine that we've set after - % \balancecolumns below; \onepageout will try to fit the two columns -- % and the final section into the vbox of \pageheight (see -+ % and the final section into the vbox of \txipageheight (see - % \pagebody), causing an overfull box. - % - % Note that glue won't work here, because glue does not exercise the -@@ -5278,53 +5958,81 @@ - \penalty0 - % - \output = {% -- % Split the last of the double-column material. Leave it on the -- % current page, no automatic page break. -+ % Split the last of the double-column material. -+ \savemarks - \balancecolumns - % -- % If we end up splitting too much material for the current page, -- % though, there will be another page break right after this \output -- % invocation ends. Having called \balancecolumns once, we do not -+ % Having called \balancecolumns once, we do not - % want to call it again. Therefore, reset \output to its normal -- % definition right away. (We hope \balancecolumns will never be -- % called on to balance too much material, but if it is, this makes -- % the output somewhat more palatable.) -+ % definition right away. - \global\output = {\onepageout{\pagecontents\PAGE}}% - }% - \eject - \endgroup % started in \begindoublecolumns -+ \restoremarks -+ % Leave the double-column material on the current page, no automatic -+ % page break. -+ \box\balancedcolumns - % - % \pagegoal was set to the doubled \vsize above, since we restarted - % the current page. We're now back to normal single-column -- % typesetting, so reset \pagegoal to the normal \vsize (after the -- % \endgroup where \vsize got restored). -- \pagegoal = \vsize -+ % typesetting, so reset \pagegoal to the normal \vsize. -+ \global\vsize = \txipageheight % -+ \pagegoal = \txipageheight % - } -+\newbox\balancedcolumns -+\setbox\balancedcolumns=\vbox{shouldnt see this}% - % --% Called at the end of the double column material. -+% Only called for the last of the double column material. \doublecolumnout -+% does the others. - \def\balancecolumns{% -- \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120. -+ \setbox0 = \vbox{\unvbox\PAGE}% like \box255 but more efficient, see p.120. - \dimen@ = \ht0 - \advance\dimen@ by \topskip - \advance\dimen@ by-\baselineskip -- \divide\dimen@ by 2 % target to split to -- %debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}% -- \splittopskip = \topskip -- % Loop until we get a decent breakpoint. -- {% -- \vbadness = 10000 -- \loop -- \global\setbox3 = \copy0 -- \global\setbox1 = \vsplit3 to \dimen@ -- \ifdim\ht3>\dimen@ -- \global\advance\dimen@ by 1pt -- \repeat -- }% -- %debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}% -- \setbox0=\vbox to\dimen@{\unvbox1}% -- \setbox2=\vbox to\dimen@{\unvbox3}% -+ \ifdim\dimen@<5\baselineskip -+ % Don't split a short final column in two. -+ \setbox2=\vbox{}% -+ \else -+ \divide\dimen@ by 2 % target to split to -+ \dimen@ii = \dimen@ -+ \splittopskip = \topskip -+ % Loop until left column is at least as high as the right column. -+ {% -+ \vbadness = 10000 -+ \loop -+ \global\setbox3 = \copy0 -+ \global\setbox1 = \vsplit3 to \dimen@ -+ \ifdim\ht1<\ht3 -+ \global\advance\dimen@ by 1pt -+ \repeat -+ }% -+ % Now the left column is in box 1, and the right column in box 3. -+ % Check whether the left column has come out higher than the page itself. -+ % (Note that we have doubled \vsize for the double columns, so -+ % the actual height of the page is 0.5\vsize). -+ \ifdim2\ht1>\vsize -+ % Just split the last of the double column material roughly in half. -+ \setbox2=\box0 -+ \setbox0 = \vsplit2 to \dimen@ii -+ \setbox0=\vbox to \dimen@ii {\unvbox0\vfill}% -+ \setbox2=\vbox to \dimen@ii {\unvbox2\vfill}% -+ \else -+ % Compare the heights of the two columns. -+ \ifdim4\ht1>5\ht3 -+ % Column heights are too different, so don't make their bottoms -+ % flush with each other. -+ \setbox2=\vbox to \ht1 {\unvbox3\vfill}% -+ \setbox0=\vbox to \ht1 {\unvbox1\vfill}% -+ \else -+ % Make column bottoms flush with each other. -+ \setbox2=\vbox to\ht1{\unvbox3\unskip}% -+ \setbox0=\vbox to\ht1{\unvbox1\unskip}% -+ \fi -+ \fi -+ \fi - % -- \pagesofar -+ \global\setbox\balancedcolumns=\vbox{\pagesofar}% - } - \catcode`\@ = \other - -@@ -5339,10 +6047,14 @@ - \null - \vskip.3\vsize % move it down on the page a bit - \begingroup -- \noindent \titlefonts\rmisbold #1\par % the text -+ \noindent \titlefonts\rm #1\par % the text - \let\lastnode=\empty % no node to associate with - \writetocentry{part}{#1}{}% but put it in the toc - \headingsoff % no headline or footline on the part page -+ % This outputs a mark at the end of the page that clears \thischapter -+ % and \thissection, as is done in \startcontents. -+ \let\pchapsepmacro\relax -+ \chapmacro{}{Yomitfromtoc}{}% - \chapoddpage - \endgroup - } -@@ -5587,9 +6299,6 @@ - - % @centerchap is like @unnumbered, but the heading is centered. - \outer\parseargdef\centerchap{% -- % Well, we could do the following in a group, but that would break -- % an assumption that \chapmacro is called at the outermost level. -- % Thus we are safer this way: --kasal, 24feb04 - \let\centerparametersmaybe = \centerparameters - \unnmhead0{#1}% - \let\centerparametersmaybe = \relax -@@ -5713,7 +6422,11 @@ - - % Define plain chapter starts, and page on/off switching for it. - \def\chapbreak{\dobreak \chapheadingskip {-4000}} -+ -+% Start a new page - \def\chappager{\par\vfill\supereject} -+ -+% \chapoddpage - start on an odd page for a new chapter - % Because \domark is called before \chapoddpage, the filler page will - % get the headings for the next chapter, which is wrong. But we don't - % care -- we just disable all headings on the filler page. -@@ -5728,7 +6441,7 @@ - \fi - } - --\def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname} -+\parseargdef\setchapternewpage{\csname CHAPPAG#1\endcsname} - - \def\CHAPPAGoff{% - \global\let\contentsalignmacro = \chappager -@@ -5749,7 +6462,7 @@ - - \CHAPPAGon - --% Chapter opening. -+% \chapmacro - Chapter opening. - % - % #1 is the text, #2 is the section type (Ynumbered, Ynothing, - % Yappendix, Yomitfromtoc), #3 the chapter number. -@@ -5761,7 +6474,13 @@ - \def\Yomitfromtockeyword{Yomitfromtoc} - % - \def\chapmacro#1#2#3{% -- \checkenv{}% chapters, etc., should not start inside an environment. -+ \expandafter\ifx\thisenv\titlepage\else -+ \checkenv{}% chapters, etc., should not start inside an environment. -+ \fi -+ % FIXME: \chapmacro is currently called from inside \titlepage when -+ % \setcontentsaftertitlepage to print the "Table of Contents" heading, but -+ % this should probably be done by \sectionheading with an option to print -+ % in chapter size. - % - % Insert the first mark before the heading break (see notes for \domark). - \let\prevchapterdefs=\lastchapterdefs -@@ -5814,7 +6533,7 @@ - \domark - % - {% -- \chapfonts \rmisbold -+ \chapfonts \rm - \let\footnote=\errfootnoteheading % give better error message - % - % Have to define \lastsection before calling \donoderef, because the -@@ -5868,30 +6587,6 @@ - } - - --% I don't think this chapter style is supported any more, so I'm not --% updating it with the new noderef stuff. We'll see. --karl, 11aug03. --% --\def\setchapterstyle #1 {\csname CHAPF#1\endcsname} --% --\def\unnchfopen #1{% -- \chapoddpage -- \vbox{\chapfonts \raggedtitlesettings #1\par}% -- \nobreak\bigskip\nobreak --} --\def\chfopen #1#2{\chapoddpage {\chapfonts --\vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}% --\par\penalty 5000 % --} --\def\centerchfopen #1{% -- \chapoddpage -- \vbox{\chapfonts \raggedtitlesettings \hfill #1\hfill}% -- \nobreak\bigskip \nobreak --} --\def\CHAPFopen{% -- \global\let\chapmacro=\chfopen -- \global\let\centerchapmacro=\centerchfopen} -- -- - % Section titles. These macros combine the section number parts and - % call the generic \sectionheading to do the printing. - % -@@ -5930,7 +6625,7 @@ - \let\footnote=\errfootnoteheading - % - % Switch to the right set of fonts. -- \csname #2fonts\endcsname \rmisbold -+ \csname #2fonts\endcsname \rm - % - % Insert first mark before the heading break (see notes for \domark). - \let\prevsectiondefs=\lastsectiondefs -@@ -6094,7 +6789,14 @@ - % 1 and 2 (the page numbers aren't printed), and so are the first - % two pages of the document. Thus, we'd have two destinations named - % `1', and two named `2'. -- \ifpdf \global\pdfmakepagedesttrue \fi -+ \ifpdf -+ \global\pdfmakepagedesttrue -+ \else -+ \ifx\XeTeXrevision\thisisundefined -+ \else -+ \global\pdfmakepagedesttrue -+ \fi -+ \fi - } - - -@@ -6143,7 +6845,7 @@ - \savepageno = \pageno - \begingroup % Set up to handle contents files properly. - \raggedbottom % Worry more about breakpoints than the bottom. -- \advance\hsize by -\contentsrightmargin % Don't use the full line length. -+ \entryrightmargin=\contentsrightmargin % Don't use the full line length. - % - % Roman numerals for page numbers. - \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi -@@ -6248,7 +6950,7 @@ - - % Chapters, in the main contents. - \def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}} --% -+ - % Chapters, in the short toc. - % See comments in \dochapentry re vbox and related settings. - \def\shortchapentry#1#2#3#4{% -@@ -6263,7 +6965,7 @@ - \setbox0 = \hbox{\putwordAppendix{} M}% - \hbox to \wd0{\putwordAppendix{} #1\hss}} - % --\def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\labelspace#1}{#4}} -+\def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\hskip.7em#1}{#4}} - - % Unnumbered chapters. - \def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}} -@@ -6296,6 +6998,8 @@ - \def\dochapentry#1#2{% - \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip - \begingroup -+ % Move the page numbers slightly to the right -+ \advance\entryrightmargin by -0.05em - \chapentryfonts - \tocentry{#1}{\dopageno\bgroup#2\egroup}% - \endgroup -@@ -6352,7 +7056,6 @@ - \catcode `\>=\other - \catcode `\`=\other - \catcode `\'=\other -- \escapechar=`\\ - % - % ' is active in math mode (mathcode"8000). So reset it, and all our - % other math active characters (just in case), to plain's definitions. -@@ -6415,6 +7118,24 @@ - \endgraf - \ifdim\lastskip<\envskipamount - \removelastskip -+ \ifnum\lastpenalty<10000 -+ % Penalize breaking before the environment, because preceding text -+ % often leads into it. -+ \penalty100 -+ \fi -+ \vskip\envskipamount -+ \fi -+ \fi -+}} -+ -+\def\afterenvbreak{{% -+ % =10000 instead of <10000 because of a special case in \itemzzz and -+ % \sectionheading, q.v. -+ \ifnum \lastpenalty=10000 \else -+ \advance\envskipamount by \parskip -+ \endgraf -+ \ifdim\lastskip<\envskipamount -+ \removelastskip - % it's not a good place to break if the last penalty was \nobreak - % or better ... - \ifnum\lastpenalty<10000 \penalty-50 \fi -@@ -6423,8 +7144,6 @@ - \fi - }} - --\let\afterenvbreak = \aboveenvbreak -- - % \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will - % also clear it, so that its embedded environments do the narrowing again. - \let\nonarrowing=\relax -@@ -6468,7 +7187,7 @@ - % collide with the section heading. - \ifnum\lastpenalty>10000 \vskip\parskip \penalty\lastpenalty \fi - % -- \vbox\bgroup -+ \setbox\groupbox=\vbox\bgroup - \baselineskip=0pt\parskip=0pt\lineskip=0pt - \carttop - \hbox\bgroup -@@ -6492,6 +7211,7 @@ - \egroup - \cartbot - \egroup -+ \addgroupbox - \checkinserts - } - -@@ -6874,7 +7594,7 @@ - % typesetting commands (@smallbook, font changes, etc.) have to be done - % beforehand -- and a) we want @copying to be done first in the source - % file; b) letting users define the frontmatter in as flexible order as --% possible is very desirable. -+% possible is desirable. - % - \def\copying{\checkenv{}\begingroup\scanargctxt\docopying} - \def\docopying#1@end copying{\endgroup\def\copyingtext{#1}} -@@ -6969,7 +7689,7 @@ - \temp - } - --% \domakedefun \deffn \deffnx \deffnheader -+% \domakedefun \deffn \deffnx \deffnheader { (defn. of \deffnheader) } - % - % Define \deffn and \deffnx, without parameters. - % \deffnheader has to be defined explicitly. -@@ -7178,7 +7898,7 @@ - \fi % no return type - #3% output function name - }% -- {\rm\enskip}% hskip 0.5 em of \tenrm -+ {\rm\enskip}% hskip 0.5 em of \rmfont - % - \boldbrax - % arguments will be output next, if any. -@@ -7307,34 +8027,41 @@ - } - \fi - --\def\scanmacro#1{\begingroup -+% alias because \c means cedilla in @tex or @math -+\let\texinfoc=\c -+ -+\newcount\savedcatcodeone -+\newcount\savedcatcodetwo -+ -+% Used at the time of macro expansion. -+% Argument is macro body with arguments substituted -+\def\scanmacro#1{% - \newlinechar`\^^M -- \let\xeatspaces\eatspaces -+ \def\xeatspaces{\eatspaces}% - % -- % Undo catcode changes of \startcontents and \doprintindex -- % When called from @insertcopying or (short)caption, we need active -- % backslash to get it printed correctly. Previously, we had -- % \catcode`\\=\other instead. We'll see whether a problem appears -- % with macro expansion. --kasal, 19aug04 -- \catcode`\@=0 \catcode`\\=\active \escapechar=`\@ -+ % Temporarily undo catcode changes of \printindex. Set catcode of @ to -+ % 0 so that @-commands in macro expansions aren't printed literally when -+ % formatting an index file, where \ is used as the escape character. -+ \savedcatcodeone=\catcode`\@ -+ \savedcatcodetwo=\catcode`\\ -+ \catcode`\@=0 -+ \catcode`\\=\active - % -- % ... and for \example: -- \spaceisspace -+ % Process the macro body under the current catcode regime. -+ \scantokens{#1@texinfoc}% - % -- % The \empty here causes a following catcode 5 newline to be eaten as -- % part of reading whitespace after a control sequence. It does not -- % eat a catcode 13 newline. There's no good way to handle the two -- % cases (untried: maybe e-TeX's \everyeof could help, though plain TeX -- % would then have different behavior). See the Macro Details node in -- % the manual for the workaround we recommend for macros and -- % line-oriented commands. -- % -- \scantokens{#1\empty}% --\endgroup} -+ \catcode`\@=\savedcatcodeone -+ \catcode`\\=\savedcatcodetwo -+ % -+ % The \texinfoc is to remove the \newlinechar added by \scantokens, and -+ % can be noticed by \parsearg. -+ % We avoid surrounding the call to \scantokens with \bgroup and \egroup -+ % to allow macros to open or close groups themselves. -+} - -+% Used for copying and captions - \def\scanexp#1{% -- \edef\temp{\noexpand\scanmacro{#1}}% -- \temp -+ \expandafter\scanmacro\expandafter{#1}% - } - - \newcount\paramno % Count of parameters -@@ -7342,7 +8069,7 @@ - \newif\ifrecursive % Is it recursive? - - % List of all defined macros in the form --% \definedummyword\macro1\definedummyword\macro2... -+% \commondummyword\macro1\commondummyword\macro2... - % Currently is also contains all @aliases; the list can be split - % if there is a need. - \def\macrolist{} -@@ -7350,7 +8077,7 @@ - % Add the macro to \macrolist - \def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname} - \def\addtomacrolistxxx#1{% -- \toks0 = \expandafter{\macrolist\definedummyword#1}% -+ \toks0 = \expandafter{\macrolist\commondummyword#1}% - \xdef\macrolist{\the\toks0}% - } - -@@ -7400,47 +8127,45 @@ - \catcode`\+=\other - \catcode`\<=\other - \catcode`\>=\other -- \catcode`\@=\other - \catcode`\^=\other - \catcode`\_=\other - \catcode`\|=\other - \catcode`\~=\other -- \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi -+ \passthroughcharstrue - } - - \def\scanargctxt{% used for copying and captions, not macros. - \scanctxt -+ \catcode`\@=\other - \catcode`\\=\other - \catcode`\^^M=\other - } - - \def\macrobodyctxt{% used for @macro definitions - \scanctxt -+ \catcode`\ =\other -+ \catcode`\@=\other - \catcode`\{=\other - \catcode`\}=\other - \catcode`\^^M=\other - \usembodybackslash - } - --\def\macroargctxt{% used when scanning invocations -+% Used when scanning braced macro arguments. Note, however, that catcode -+% changes here are ineffectual if the macro invocation was nested inside -+% an argument to another Texinfo command. -+\def\macroargctxt{% - \scanctxt -- \catcode`\\=0 -+ \catcode`\ =\active -+ \catcode`\^^M=\other -+ \catcode`\\=\active -+} -+ -+\def\macrolineargctxt{% used for whole-line arguments without braces -+ \scanctxt -+ \catcode`\{=\other -+ \catcode`\}=\other - } --% why catcode 0 for \ in the above? To recognize \\ \{ \} as "escapes" --% for the single characters \ { }. Thus, we end up with the "commands" --% that would be written @\ @{ @} in a Texinfo document. --% --% We already have @{ and @}. For @\, we define it here, and only for --% this purpose, to produce a typewriter backslash (so, the @\ that we --% define for @math can't be used with @macro calls): --% --\def\\{\normalbackslash}% --% --% We would like to do this for \, too, since that is what makeinfo does. --% But it is not possible, because Texinfo already has a command @, for a --% cedilla accent. Documents must use @comma{} instead. --% --% \anythingelse will almost certainly be an error of some kind. - - % \mbodybackslash is the definition of \ in @macro bodies. - % It maps \foo\ => \csname macarg.foo\endcsname => #N -@@ -7493,7 +8218,7 @@ - % Remove the macro name from \macrolist: - \begingroup - \expandafter\let\csname#1\endcsname \relax -- \let\definedummyword\unmacrodo -+ \let\commondummyword\unmacrodo - \xdef\macrolist{\macrolist}% - \endgroup - \else -@@ -7508,60 +8233,40 @@ - \ifx #1\relax - % remove this - \else -- \noexpand\definedummyword \noexpand#1% -+ \noexpand\commondummyword \noexpand#1% - \fi - } - --% This makes use of the obscure feature that if the last token of a --% is #, then the preceding argument is delimited by --% an opening brace, and that opening brace is not consumed. -+% \getargs -- Parse the arguments to a @macro line. Set \macname to -+% the name of the macro, and \argl to the braced argument list. - \def\getargs#1{\getargsxxx#1{}} - \def\getargsxxx#1#{\getmacname #1 \relax\getmacargs} - \def\getmacname#1 #2\relax{\macname={#1}} - \def\getmacargs#1{\def\argl{#1}} -+% This made use of the feature that if the last token of a -+% is #, then the preceding argument is delimited by -+% an opening brace, and that opening brace is not consumed. - --% For macro processing make @ a letter so that we can make Texinfo private macro names. --\edef\texiatcatcode{\the\catcode`\@} --\catcode `@=11\relax -- --% Parse the optional {params} list. Set up \paramno and \paramlist --% so \defmacro knows what to do. Define \macarg.BLAH for each BLAH --% in the params list to some hook where the argument is to be expanded. If --% there are less than 10 arguments that hook is to be replaced by ##N where N -+% Parse the optional {params} list to @macro or @rmacro. -+% Set \paramno to the number of arguments, -+% and \paramlist to a parameter text for the macro (e.g. #1,#2,#3 for a -+% three-param macro.) Define \macarg.BLAH for each BLAH in the params -+% list to some hook where the argument is to be expanded. If there are -+% less than 10 arguments that hook is to be replaced by ##N where N - % is the position in that list, that is to say the macro arguments are to be - % defined `a la TeX in the macro body. - % - % That gets used by \mbodybackslash (above). - % --% We need to get `macro parameter char #' into several definitions. --% The technique used is stolen from LaTeX: let \hash be something --% unexpandable, insert that wherever you need a #, and then redefine --% it to # just before using the token list produced. --% --% The same technique is used to protect \eatspaces till just before --% the macro is used. --% --% If there are 10 or more arguments, a different technique is used, where the --% hook remains in the body, and when macro is to be expanded the body is --% processed again to replace the arguments. --% --% In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the --% argument N value and then \edef the body (nothing else will expand because of --% the catcode regime underwhich the body was input). -+% If there are 10 or more arguments, a different technique is used: see -+% \parsemmanyargdef. - % --% If you compile with TeX (not eTeX), and you have macros with 10 or more --% arguments, no macro can have more than 256 arguments (else error). - \def\parsemargdef#1;{% - \paramno=0\def\paramlist{}% - \let\hash\relax -+ % \hash is redefined to `#' later to get it into definitions - \let\xeatspaces\relax - \parsemargdefxxx#1,;,% -- % In case that there are 10 or more arguments we parse again the arguments -- % list to set new definitions for the \macarg.BLAH macros corresponding to -- % each BLAH argument. It was anyhow needed to parse already once this list -- % in order to count the arguments, and as macros with at most 9 arguments -- % are by far more frequent than macro with 10 or more arguments, defining -- % twice the \macarg.BLAH macros does not cost too much processing power. - \ifnum\paramno<10\relax\else - \paramno0\relax - \parsemmanyargdef@@#1,;,% 10 or more arguments -@@ -7576,6 +8281,43 @@ - \edef\paramlist{\paramlist\hash\the\paramno,}% - \fi\next} - -+% \parsemacbody, \parsermacbody -+% -+% Read recursive and nonrecursive macro bodies. (They're different since -+% rec and nonrec macros end differently.) -+% -+% We are in \macrobodyctxt, and the \xdef causes backslashshes in the macro -+% body to be transformed. -+% Set \macrobody to the body of the macro, and call \defmacro. -+% -+{\catcode`\ =\other\long\gdef\parsemacbody#1@end macro{% -+\xdef\macrobody{\eatcr{#1}}\endgroup\defmacro}}% -+{\catcode`\ =\other\long\gdef\parsermacbody#1@end rmacro{% -+\xdef\macrobody{\eatcr{#1}}\endgroup\defmacro}}% -+ -+% Make @ a letter, so that we can make private-to-Texinfo macro names. -+\edef\texiatcatcode{\the\catcode`\@} -+\catcode `@=11\relax -+ -+%%%%%%%%%%%%%% Code for > 10 arguments only %%%%%%%%%%%%%%%%%% -+ -+% If there are 10 or more arguments, a different technique is used, where the -+% hook remains in the body, and when macro is to be expanded the body is -+% processed again to replace the arguments. -+% -+% In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the -+% argument N value and then \edef the body (nothing else will expand because of -+% the catcode regime under which the body was input). -+% -+% If you compile with TeX (not eTeX), and you have macros with 10 or more -+% arguments, no macro can have more than 256 arguments (else error). -+% -+% In case that there are 10 or more arguments we parse again the arguments -+% list to set new definitions for the \macarg.BLAH macros corresponding to -+% each BLAH argument. It was anyhow needed to parse already once this list -+% in order to count the arguments, and as macros with at most 9 arguments -+% are by far more frequent than macro with 10 or more arguments, defining -+% twice the \macarg.BLAH macros does not cost too much processing power. - \def\parsemmanyargdef@@#1,{% - \if#1;\let\next=\relax - \else -@@ -7591,16 +8333,6 @@ - \advance\paramno by 1\relax - \fi\next} - --% These two commands read recursive and nonrecursive macro bodies. --% (They're different since rec and nonrec macros end differently.) --% -- --\catcode `\@\texiatcatcode --\long\def\parsemacbody#1@end macro% --{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% --\long\def\parsermacbody#1@end rmacro% --{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% --\catcode `\@=11\relax - - \let\endargs@\relax - \let\nil@\relax -@@ -7629,8 +8361,6 @@ - \getargvals@@ - \fi - } -- --% - \def\getargvals@@{% - \ifx\paramlist\nilm@ - % Some sanity check needed here that \argvaluelist is also empty. -@@ -7674,7 +8404,8 @@ - } - - % Replace arguments by their values in the macro body, and place the result --% in macro \@tempa -+% in macro \@tempa. -+% - \def\macvalstoargs@{% - % To do this we use the property that token registers that are \the'ed - % within an \edef expand only once. So we are going to place all argument -@@ -7698,8 +8429,9 @@ - \expandafter\def\expandafter\@tempa\expandafter{\@tempc}% - } - -+% Define the named-macro outside of this group and then close this group. -+% - \def\macargexpandinbody@{% -- %% Define the named-macro outside of this group and then close this group. - \expandafter - \endgroup - \macargdeflist@ -@@ -7736,14 +8468,8 @@ - \next - } - --% Save the token stack pointer into macro #1 --\def\texisavetoksstackpoint#1{\edef#1{\the\@cclvi}} --% Restore the token stack pointer from number in macro #1 --\def\texirestoretoksstackpoint#1{\expandafter\mathchardef\expandafter\@cclvi#1\relax} --% newtoks that can be used non \outer . --\def\texinonouternewtoks{\alloc@ 5\toks \toksdef \@cclvi} -- --% Tailing missing arguments are set to empty -+% Trailing missing arguments are set to empty. -+% - \def\setemptyargvalues@{% - \ifx\paramlist\nilm@ - \let\next\macargexpandinbody@ -@@ -7773,99 +8499,191 @@ - \long\def#2{#4}% - } - --% This defines a Texinfo @macro. There are eight cases: recursive and --% nonrecursive macros of zero, one, up to nine, and many arguments. --% Much magic with \expandafter here. -+ -+%%%%%%%%%%%%%% End of code for > 10 arguments %%%%%%%%%%%%%%%%%% -+ -+ -+% This defines a Texinfo @macro or @rmacro, called by \parsemacbody. -+% \macrobody has the body of the macro in it, with placeholders for -+% its parameters, looking like "\xeatspaces{\hash 1}". -+% \paramno is the number of parameters -+% \paramlist is a TeX parameter text, e.g. "#1,#2,#3," -+% There are four cases: macros of zero, one, up to nine, and many arguments. - % \xdef is used so that macro definitions will survive the file --% they're defined in; @include reads the file inside a group. -+% they're defined in: @include reads the file inside a group. - % - \def\defmacro{% - \let\hash=##% convert placeholders to macro parameter chars -- \ifrecursive -- \ifcase\paramno -- % 0 -- \expandafter\xdef\csname\the\macname\endcsname{% -- \noexpand\scanmacro{\temp}}% -- \or % 1 -- \expandafter\xdef\csname\the\macname\endcsname{% -- \bgroup\noexpand\macroargctxt -- \noexpand\braceorline -- \expandafter\noexpand\csname\the\macname xxx\endcsname}% -- \expandafter\xdef\csname\the\macname xxx\endcsname##1{% -- \egroup\noexpand\scanmacro{\temp}}% -- \else -- \ifnum\paramno<10\relax % at most 9 -- \expandafter\xdef\csname\the\macname\endcsname{% -- \bgroup\noexpand\macroargctxt -- \noexpand\csname\the\macname xx\endcsname}% -- \expandafter\xdef\csname\the\macname xx\endcsname##1{% -- \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% -- \expandafter\expandafter -- \expandafter\xdef -- \expandafter\expandafter -- \csname\the\macname xxx\endcsname -- \paramlist{\egroup\noexpand\scanmacro{\temp}}% -- \else % 10 or more -- \expandafter\xdef\csname\the\macname\endcsname{% -- \noexpand\getargvals@{\the\macname}{\argl}% -- }% -- \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp -- \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\gobble -- \fi -- \fi -+ \ifnum\paramno=1 -+ \def\xeatspaces##1{##1}% -+ % This removes the pair of braces around the argument. We don't -+ % use \eatspaces, because this can cause ends of lines to be lost -+ % when the argument to \eatspaces is read, leading to line-based -+ % commands like "@itemize" not being read correctly. - \else -- \ifcase\paramno -- % 0 -+ \let\xeatspaces\relax % suppress expansion -+ \fi -+ \ifcase\paramno -+ % 0 -+ \expandafter\xdef\csname\the\macname\endcsname{% -+ \bgroup -+ \noexpand\spaceisspace -+ \noexpand\endlineisspace -+ \noexpand\expandafter % skip any whitespace after the macro name. -+ \expandafter\noexpand\csname\the\macname @@@\endcsname}% -+ \expandafter\xdef\csname\the\macname @@@\endcsname{% -+ \egroup -+ \noexpand\scanmacro{\macrobody}}% -+ \or % 1 -+ \expandafter\xdef\csname\the\macname\endcsname{% -+ \bgroup -+ \noexpand\braceorline -+ \expandafter\noexpand\csname\the\macname @@@\endcsname}% -+ \expandafter\xdef\csname\the\macname @@@\endcsname##1{% -+ \egroup -+ \noexpand\scanmacro{\macrobody}% -+ }% -+ \else % at most 9 -+ \ifnum\paramno<10\relax -+ % @MACNAME sets the context for reading the macro argument -+ % @MACNAME@@ gets the argument, processes backslashes and appends a -+ % comma. -+ % @MACNAME@@@ removes braces surrounding the argument list. -+ % @MACNAME@@@@ scans the macro body with arguments substituted. - \expandafter\xdef\csname\the\macname\endcsname{% -- \noexpand\norecurse{\the\macname}% -- \noexpand\scanmacro{\temp}\egroup}% -- \or % 1 -+ \bgroup -+ \noexpand\expandafter % This \expandafter skip any spaces after the -+ \noexpand\macroargctxt % macro before we change the catcode of space. -+ \noexpand\expandafter -+ \expandafter\noexpand\csname\the\macname @@\endcsname}% -+ \expandafter\xdef\csname\the\macname @@\endcsname##1{% -+ \noexpand\passargtomacro -+ \expandafter\noexpand\csname\the\macname @@@\endcsname{##1,}}% -+ \expandafter\xdef\csname\the\macname @@@\endcsname##1{% -+ \expandafter\noexpand\csname\the\macname @@@@\endcsname ##1}% -+ \expandafter\expandafter -+ \expandafter\xdef -+ \expandafter\expandafter -+ \csname\the\macname @@@@\endcsname\paramlist{% -+ \egroup\noexpand\scanmacro{\macrobody}}% -+ \else % 10 or more: - \expandafter\xdef\csname\the\macname\endcsname{% -- \bgroup\noexpand\macroargctxt -- \noexpand\braceorline -- \expandafter\noexpand\csname\the\macname xxx\endcsname}% -- \expandafter\xdef\csname\the\macname xxx\endcsname##1{% -- \egroup -- \noexpand\norecurse{\the\macname}% -- \noexpand\scanmacro{\temp}\egroup}% -- \else % at most 9 -- \ifnum\paramno<10\relax -- \expandafter\xdef\csname\the\macname\endcsname{% -- \bgroup\noexpand\macroargctxt -- \expandafter\noexpand\csname\the\macname xx\endcsname}% -- \expandafter\xdef\csname\the\macname xx\endcsname##1{% -- \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% -- \expandafter\expandafter -- \expandafter\xdef -- \expandafter\expandafter -- \csname\the\macname xxx\endcsname -- \paramlist{% -- \egroup -- \noexpand\norecurse{\the\macname}% -- \noexpand\scanmacro{\temp}\egroup}% -- \else % 10 or more: -- \expandafter\xdef\csname\the\macname\endcsname{% -- \noexpand\getargvals@{\the\macname}{\argl}% -- }% -- \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp -- \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\norecurse -- \fi -+ \noexpand\getargvals@{\the\macname}{\argl}% -+ }% -+ \global\expandafter\let\csname mac.\the\macname .body\endcsname\macrobody -+ \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\gobble - \fi - \fi} - --\catcode `\@\texiatcatcode\relax -+\catcode `\@\texiatcatcode\relax % end private-to-Texinfo catcodes - - \def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}} - --% \braceorline decides whether the next nonwhitespace character is a --% {. If so it reads up to the closing }, if not, it reads the whole --% line. Whatever was read is then fed to the next control sequence --% as an argument (by \parsebrace or \parsearg). -+ -+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -+% -+{\catcode`\@=0 \catcode`\\=13 % We need to manipulate \ so use @ as escape -+@catcode`@_=11 % private names -+@catcode`@!=11 % used as argument separator -+ -+% \passargtomacro#1#2 - -+% Call #1 with a list of tokens #2, with any doubled backslashes in #2 -+% compressed to one. -+% -+% This implementation works by expansion, and not execution (so we cannot use -+% \def or similar). This reduces the risk of this failing in contexts where -+% complete expansion is done with no execution (for example, in writing out to -+% an auxiliary file for an index entry). -+% -+% State is kept in the input stream: the argument passed to -+% @look_ahead, @gobble_and_check_finish and @add_segment is -+% -+% THE_MACRO ARG_RESULT ! {PENDING_BS} NEXT_TOKEN (... rest of input) -+% -+% where: -+% THE_MACRO - name of the macro we want to call -+% ARG_RESULT - argument list we build to pass to that macro -+% PENDING_BS - either a backslash or nothing -+% NEXT_TOKEN - used to look ahead in the input stream to see what's coming next -+ -+@gdef@passargtomacro#1#2{% -+ @add_segment #1!{}@relax#2\@_finish\% -+} -+@gdef@_finish{@_finishx} @global@let@_finishx@relax -+ -+% #1 - THE_MACRO ARG_RESULT -+% #2 - PENDING_BS -+% #3 - NEXT_TOKEN -+% #4 used to look ahead -+% -+% If the next token is not a backslash, process the rest of the argument; -+% otherwise, remove the next token. -+@gdef@look_ahead#1!#2#3#4{% -+ @ifx#4\% -+ @expandafter@gobble_and_check_finish -+ @else -+ @expandafter@add_segment -+ @fi#1!{#2}#4#4% -+} -+ -+% #1 - THE_MACRO ARG_RESULT -+% #2 - PENDING_BS -+% #3 - NEXT_TOKEN -+% #4 should be a backslash, which is gobbled. -+% #5 looks ahead -+% -+% Double backslash found. Add a single backslash, and look ahead. -+@gdef@gobble_and_check_finish#1!#2#3#4#5{% -+ @add_segment#1\!{}#5#5% -+} -+ -+@gdef@is_fi{@fi} -+ -+% #1 - THE_MACRO ARG_RESULT -+% #2 - PENDING_BS -+% #3 - NEXT_TOKEN -+% #4 is input stream until next backslash -+% -+% Input stream is either at the start of the argument, or just after a -+% backslash sequence, either a lone backslash, or a doubled backslash. -+% NEXT_TOKEN contains the first token in the input stream: if it is \finish, -+% finish; otherwise, append to ARG_RESULT the segment of the argument up until -+% the next backslash. PENDING_BACKSLASH contains a backslash to represent -+% a backslash just before the start of the input stream that has not been -+% added to ARG_RESULT. -+@gdef@add_segment#1!#2#3#4\{% -+@ifx#3@_finish -+ @call_the_macro#1!% -+@else -+ % append the pending backslash to the result, followed by the next segment -+ @expandafter@is_fi@look_ahead#1#2#4!{\}@fi -+ % this @fi is discarded by @look_ahead. -+ % we can't get rid of it with \expandafter because we don't know how -+ % long #4 is. -+} -+ -+% #1 - THE_MACRO -+% #2 - ARG_RESULT -+% #3 discards the res of the conditional in @add_segment, and @is_fi ends the -+% conditional. -+@gdef@call_the_macro#1#2!#3@fi{@is_fi #1{#2}} -+ -+} -+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -+ -+% \braceorline MAC is used for a one-argument macro MAC. It checks -+% whether the next non-whitespace character is a {. It sets the context -+% for reading the argument (slightly different in the two cases). Then, -+% to read the argument, in the whole-line case, it then calls the regular -+% \parsearg MAC; in the lbrace case, it calls \passargtomacro MAC. - % - \def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx} - \def\braceorlinexxx{% -- \ifx\nchar\bgroup\else -- \expandafter\parsearg -+ \ifx\nchar\bgroup -+ \macroargctxt -+ \expandafter\passargtomacro -+ \else -+ \macrolineargctxt\expandafter\parsearg - \fi \macnamexxx} - - -@@ -7947,7 +8765,10 @@ - \pdfmkdest{#1}% - \iflinks - {% -+ \requireauxfile - \atdummies % preserve commands, but don't expand them -+ % match definition in \xrdef, \refx, \xrefX. -+ \def\value##1{##1}% - \edef\writexrdef##1##2{% - \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef - ##1}{##2}}% these are parameters of \writexrdef -@@ -7986,9 +8807,12 @@ - % node name, #4 the name of the Info file, #5 the name of the printed - % manual. All but the node name can be omitted. - % --\def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]} --\def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]} --\def\ref#1{\xrefX[#1,,,,,,,]} -+\def\pxref{\putwordsee{} \xrefXX} -+\def\xref{\putwordSee{} \xrefXX} -+\def\ref{\xrefXX} -+ -+\def\xrefXX#1{\def\xrefXXarg{#1}\futurelet\tokenafterxref\xrefXXX} -+\def\xrefXXX{\expandafter\xrefX\expandafter[\xrefXXarg,,,,,,,]} - % - \newbox\toprefbox - \newbox\printedrefnamebox -@@ -8035,9 +8859,10 @@ - % - % Make link in pdf output. - \ifpdf -+ % For pdfTeX and LuaTeX - {\indexnofonts -- \turnoffactive - \makevalueexpandable -+ \turnoffactive - % This expands tokens, so do it after making catcode changes, so _ - % etc. don't get their TeX definitions. This ignores all spaces in - % #4, including (wrongly) those in the middle of the filename. -@@ -8045,35 +8870,74 @@ - % - % This (wrongly) does not take account of leading or trailing - % spaces in #1, which should be ignored. -- \edef\pdfxrefdest{#1}% -- \ifx\pdfxrefdest\empty -- \def\pdfxrefdest{Top}% no empty targets -- \else -- \txiescapepdf\pdfxrefdest % escape PDF special chars -+ \setpdfdestname{#1}% -+ % -+ \ifx\pdfdestname\empty -+ \def\pdfdestname{Top}% no empty targets - \fi - % - \leavevmode - \startlink attr{/Border [0 0 0]}% - \ifnum\filenamelength>0 -- goto file{\the\filename.pdf} name{\pdfxrefdest}% -+ goto file{\the\filename.pdf} name{\pdfdestname}% - \else -- goto name{\pdfmkpgn{\pdfxrefdest}}% -+ goto name{\pdfmkpgn{\pdfdestname}}% - \fi - }% - \setcolor{\linkcolor}% -+ \else -+ \ifx\XeTeXrevision\thisisundefined -+ \else -+ % For XeTeX -+ {\indexnofonts -+ \makevalueexpandable -+ \turnoffactive -+ % This expands tokens, so do it after making catcode changes, so _ -+ % etc. don't get their TeX definitions. This ignores all spaces in -+ % #4, including (wrongly) those in the middle of the filename. -+ \getfilename{#4}% -+ % -+ % This (wrongly) does not take account of leading or trailing -+ % spaces in #1, which should be ignored. -+ \setpdfdestname{#1}% -+ % -+ \ifx\pdfdestname\empty -+ \def\pdfdestname{Top}% no empty targets -+ \fi -+ % -+ \leavevmode -+ \ifnum\filenamelength>0 -+ % With default settings, -+ % XeTeX (xdvipdfmx) replaces link destination names with integers. -+ % In this case, the replaced destination names of -+ % remote PDFs are no longer known. In order to avoid a replacement, -+ % you can use xdvipdfmx's command line option `-C 0x0010'. -+ % If you use XeTeX 0.99996+ (TeX Live 2016+), -+ % this command line option is no longer necessary -+ % because we can use the `dvipdfmx:config' special. -+ \special{pdf:bann << /Border [0 0 0] /Type /Annot /Subtype /Link /A -+ << /S /GoToR /F (\the\filename.pdf) /D (\pdfdestname) >> >>}% -+ \else -+ \special{pdf:bann << /Border [0 0 0] /Type /Annot /Subtype /Link /A -+ << /S /GoTo /D (\pdfdestname) >> >>}% -+ \fi -+ }% -+ \setcolor{\linkcolor}% -+ \fi - \fi -- % -- % Float references are printed completely differently: "Figure 1.2" -- % instead of "[somenode], p.3". We distinguish them by the -- % LABEL-title being set to a magic string. - {% - % Have to otherify everything special to allow the \csname to - % include an _ in the xref name, etc. - \indexnofonts - \turnoffactive -+ \def\value##1{##1}% - \expandafter\global\expandafter\let\expandafter\Xthisreftitle - \csname XR#1-title\endcsname - }% -+ % -+ % Float references are printed completely differently: "Figure 1.2" -+ % instead of "[somenode], p.3". \iffloat distinguishes them by -+ % \Xthisreftitle being set to a magic string. - \iffloat\Xthisreftitle - % If the user specified the print name (third arg) to the ref, - % print it instead of our usual "Figure 1.2". -@@ -8132,6 +8996,15 @@ - % - % output the `page 3'. - \turnoffactive \putwordpage\tie\refx{#1-pg}{}% -+ % Add a , if xref followed by a space -+ \if\space\noexpand\tokenafterxref ,% -+ \else\ifx\ \tokenafterxref ,% @TAB -+ \else\ifx\*\tokenafterxref ,% @* -+ \else\ifx\ \tokenafterxref ,% @SPACE -+ \else\ifx\ -+ \tokenafterxref ,% @NL -+ \else\ifx\tie\tokenafterxref ,% @tie -+ \fi\fi\fi\fi\fi\fi - \fi\fi - \fi - \endlink -@@ -8198,13 +9071,14 @@ - \fi\fi\fi - } - --% Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME. --% If its value is nonempty, SUFFIX is output afterward. --% -+% \refx{NAME}{SUFFIX} - reference a cross-reference string named NAME. SUFFIX -+% is output afterwards if non-empty. - \def\refx#1#2{% -+ \requireauxfile - {% - \indexnofonts - \otherbackslash -+ \def\value##1{##1}% - \expandafter\global\expandafter\let\expandafter\thisrefX - \csname XR#1\endcsname - }% -@@ -8229,16 +9103,18 @@ - #2% Output the suffix in any case. - } - --% This is the macro invoked by entries in the aux file. Usually it's --% just a \def (we prepend XR to the control sequence name to avoid --% collisions). But if this is a float type, we have more work to do. -+% This is the macro invoked by entries in the aux file. Define a control -+% sequence for a cross-reference target (we prepend XR to the control sequence -+% name to avoid collisions). The value is the page number. If this is a float -+% type, we have more work to do. - % - \def\xrdef#1#2{% -- {% The node name might contain 8-bit characters, which in our current -- % implementation are changed to commands like @'e. Don't let these -- % mess up the control sequence name. -+ {% Expand the node or anchor name to remove control sequences. -+ % \turnoffactive stops 8-bit characters being changed to commands -+ % like @'e. \refx does the same to retrieve the value in the definition. - \indexnofonts - \turnoffactive -+ \def\value##1{##1}% - \xdef\safexrefname{#1}% - }% - % -@@ -8265,6 +9141,23 @@ - \fi - } - -+% If working on a large document in chapters, it is convenient to -+% be able to disable indexing, cross-referencing, and contents, for test runs. -+% This is done with @novalidate at the beginning of the file. -+% -+\newif\iflinks \linkstrue % by default we want the aux files. -+\let\novalidate = \linksfalse -+ -+% Used when writing to the aux file, or when using data from it. -+\def\requireauxfile{% -+ \iflinks -+ \tryauxfile -+ % Open the new aux file. TeX will close it automatically at exit. -+ \immediate\openout\auxfile=\jobname.aux -+ \fi -+ \global\let\requireauxfile=\relax % Only do this once. -+} -+ - % Read the last existing aux file, if any. No error if none exists. - % - \def\tryauxfile{% -@@ -8343,9 +9236,6 @@ - % now. --karl, 15jan04. - \catcode`\\=\other - % -- % Make the characters 128-255 be printing characters. -- {\setnonasciicharscatcodenonglobal\other}% -- % - % @ is our escape character in .aux files, and we need braces. - \catcode`\{=1 - \catcode`\}=2 -@@ -8409,7 +9299,7 @@ - % We want to typeset this text as a normal paragraph, even if the - % footnote reference occurs in (for example) a display environment. - % So reset some parameters. -- \hsize=\pagewidth -+ \hsize=\txipagewidth - \interlinepenalty\interfootnotelinepenalty - \splittopskip\ht\strutbox % top baseline for broken footnotes - \splitmaxdepth\dp\strutbox -@@ -8558,6 +9448,7 @@ - \def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup - \catcode`\^^M = 5 % in case we're inside an example - \normalturnoffactive % allow _ et al. in names -+ \def\xprocessmacroarg{\eatspaces}% in case we are being used via a macro - % If the image is by itself, center it. - \ifvmode - \imagevmodetrue -@@ -8587,12 +9478,21 @@ - % - % Output the image. - \ifpdf -+ % For pdfTeX and LuaTeX <= 0.80 - \dopdfimage{#1}{#2}{#3}% - \else -- % \epsfbox itself resets \epsf?size at each figure. -- \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi -- \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi -- \epsfbox{#1.eps}% -+ \ifx\XeTeXrevision\thisisundefined -+ % For epsf.tex -+ % \epsfbox itself resets \epsf?size at each figure. -+ \setbox0 = \hbox{\ignorespaces #2}% -+ \ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi -+ \setbox0 = \hbox{\ignorespaces #3}% -+ \ifdim\wd0 > 0pt \epsfysize=#3\relax \fi -+ \epsfbox{#1.eps}% -+ \else -+ % For XeTeX -+ \doxeteximage{#1}{#2}{#3}% -+ \fi - \fi - % - \ifimagevmode -@@ -8714,7 +9614,7 @@ - % - \ifx\thiscaption\empty \else - \ifx\floatident\empty \else -- \appendtomacro\captionline{: }% had ident, so need a colon between -+ \appendtomacro\captionline{: }% had ident, so need a colon between - \fi - % - % caption text. -@@ -8738,32 +9638,20 @@ - % \floatlabel-lof. Besides \floatident, we include the short - % caption if specified, else the full caption if specified, else nothing. - {% -+ \requireauxfile - \atdummies - % -- % since we read the caption text in the macro world, where ^^M -- % is turned into a normal character, we have to scan it back, so -- % we don't write the literal three characters "^^M" into the aux file. -- \scanexp{% -- \xdef\noexpand\gtemp{% -- \ifx\thisshortcaption\empty -- \thiscaption -- \else -- \thisshortcaption -- \fi -- }% -- }% -+ \ifx\thisshortcaption\empty -+ \def\gtemp{\thiscaption}% -+ \else -+ \def\gtemp{\thisshortcaption}% -+ \fi - \immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident -- \ifx\gtemp\empty \else : \gtemp \fi}}% -+ \ifx\gtemp\empty \else : \gtemp \fi}}% - }% - \fi - \egroup % end of \vtop - % -- % place the captured inserts -- % -- % BEWARE: when the floats start floating, we have to issue warning -- % whenever an insert appears inside a float which could possibly -- % float. --kasal, 26may04 -- % - \checkinserts - } - -@@ -8938,6 +9826,70 @@ - \global\righthyphenmin = #3\relax - } - -+% XeTeX and LuaTeX can handle Unicode natively. -+% Their default I/O uses UTF-8 sequences instead of a byte-wise operation. -+% Other TeX engines' I/O (pdfTeX, etc.) is byte-wise. -+% -+\newif\iftxinativeunicodecapable -+\newif\iftxiusebytewiseio -+ -+\ifx\XeTeXrevision\thisisundefined -+ \ifx\luatexversion\thisisundefined -+ \txinativeunicodecapablefalse -+ \txiusebytewiseiotrue -+ \else -+ \txinativeunicodecapabletrue -+ \txiusebytewiseiofalse -+ \fi -+\else -+ \txinativeunicodecapabletrue -+ \txiusebytewiseiofalse -+\fi -+ -+% Set I/O by bytes instead of UTF-8 sequence for XeTeX and LuaTex -+% for non-UTF-8 (byte-wise) encodings. -+% -+\def\setbytewiseio{% -+ \ifx\XeTeXrevision\thisisundefined -+ \else -+ \XeTeXdefaultencoding "bytes" % For subsequent files to be read -+ \XeTeXinputencoding "bytes" % For document root file -+ % Unfortunately, there seems to be no corresponding XeTeX command for -+ % output encoding. This is a problem for auxiliary index and TOC files. -+ % The only solution would be perhaps to write out @U{...} sequences in -+ % place of non-ASCII characters. -+ \fi -+ -+ \ifx\luatexversion\thisisundefined -+ \else -+ \directlua{ -+ local utf8_char, byte, gsub = unicode.utf8.char, string.byte, string.gsub -+ local function convert_char (char) -+ return utf8_char(byte(char)) -+ end -+ -+ local function convert_line (line) -+ return gsub(line, ".", convert_char) -+ end -+ -+ callback.register("process_input_buffer", convert_line) -+ -+ local function convert_line_out (line) -+ local line_out = "" -+ for c in string.utfvalues(line) do -+ line_out = line_out .. string.char(c) -+ end -+ return line_out -+ end -+ -+ callback.register("process_output_buffer", convert_line_out) -+ } -+ \fi -+ -+ \txiusebytewiseiotrue -+} -+ -+ - % Helpers for encodings. - % Set the catcode of characters 128 through 255 to the specified number. - % -@@ -8960,7 +9912,9 @@ - % @documentencoding sets the definition of non-ASCII characters - % according to the specified encoding. - % --\parseargdef\documentencoding{% -+\def\documentencoding{\parseargusing\filenamecatcodes\documentencodingzzz} -+\def\documentencodingzzz#1{% -+ % - % Encoding being declared for the document. - \def\declaredencoding{\csname #1.enc\endcsname}% - % -@@ -8976,22 +9930,38 @@ - \asciichardefs - % - \else \ifx \declaredencoding \lattwo -+ \iftxinativeunicodecapable -+ \setbytewiseio -+ \fi - \setnonasciicharscatcode\active - \lattwochardefs - % - \else \ifx \declaredencoding \latone -+ \iftxinativeunicodecapable -+ \setbytewiseio -+ \fi - \setnonasciicharscatcode\active - \latonechardefs - % - \else \ifx \declaredencoding \latnine -+ \iftxinativeunicodecapable -+ \setbytewiseio -+ \fi - \setnonasciicharscatcode\active - \latninechardefs - % - \else \ifx \declaredencoding \utfeight -- \setnonasciicharscatcode\active -- % since we already invoked \utfeightchardefs at the top level -- % (below), do not re-invoke it, then our check for duplicated -- % definitions triggers. Making non-ascii chars active is enough. -+ \iftxinativeunicodecapable -+ % For native Unicode handling (XeTeX and LuaTeX) -+ \nativeunicodechardefs -+ \else -+ % For treating UTF-8 as byte sequences (TeX, eTeX and pdfTeX) -+ \setnonasciicharscatcode\active -+ % since we already invoked \utfeightchardefs at the top level -+ % (below), do not re-invoke it, otherwise our check for duplicated -+ % definitions gets triggered. Making non-ascii chars active is -+ % sufficient. -+ \fi - % - \else - \message{Ignoring unknown document encoding: #1.}% -@@ -9001,6 +9971,18 @@ - \fi % latone - \fi % lattwo - \fi % ascii -+ % -+ \ifx\XeTeXrevision\thisisundefined -+ \else -+ \ifx \declaredencoding \utfeight -+ \else -+ \ifx \declaredencoding \ascii -+ \else -+ \message{Warning: XeTeX with non-UTF-8 encodings cannot handle % -+ non-ASCII characters in auxiliary files.}% -+ \fi -+ \fi -+ \fi - } - - % emacs-page -@@ -9017,109 +9999,119 @@ - % macros containing the character definitions. - \setnonasciicharscatcode\active - % -+ -+\def\gdefchar#1#2{% -+\gdef#1{% -+ \ifpassthroughchars -+ \string#1% -+ \else -+ #2% -+ \fi -+}} -+ - % Latin1 (ISO-8859-1) character definitions. - \def\latonechardefs{% -- \gdef^^a0{\tie} -- \gdef^^a1{\exclamdown} -- \gdef^^a2{\missingcharmsg{CENT SIGN}} -- \gdef^^a3{{\pounds}} -- \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} -- \gdef^^a5{\missingcharmsg{YEN SIGN}} -- \gdef^^a6{\missingcharmsg{BROKEN BAR}} -- \gdef^^a7{\S} -- \gdef^^a8{\"{}} -- \gdef^^a9{\copyright} -- \gdef^^aa{\ordf} -- \gdef^^ab{\guillemetleft} -- \gdef^^ac{$\lnot$} -- \gdef^^ad{\-} -- \gdef^^ae{\registeredsymbol} -- \gdef^^af{\={}} -+ \gdefchar^^a0{\tie} -+ \gdefchar^^a1{\exclamdown} -+ \gdefchar^^a2{{\tcfont \char162}} % cent -+ \gdefchar^^a3{\pounds{}} -+ \gdefchar^^a4{{\tcfont \char164}} % currency -+ \gdefchar^^a5{{\tcfont \char165}} % yen -+ \gdefchar^^a6{{\tcfont \char166}} % broken bar -+ \gdefchar^^a7{\S} -+ \gdefchar^^a8{\"{}} -+ \gdefchar^^a9{\copyright{}} -+ \gdefchar^^aa{\ordf} -+ \gdefchar^^ab{\guillemetleft{}} -+ \gdefchar^^ac{\ensuremath\lnot} -+ \gdefchar^^ad{\-} -+ \gdefchar^^ae{\registeredsymbol{}} -+ \gdefchar^^af{\={}} - % -- \gdef^^b0{\textdegree} -- \gdef^^b1{$\pm$} -- \gdef^^b2{$^2$} -- \gdef^^b3{$^3$} -- \gdef^^b4{\'{}} -- \gdef^^b5{$\mu$} -- \gdef^^b6{\P} -- \gdef^^b7{\ensuremath\cdot} -- \gdef^^b8{\cedilla\ } -- \gdef^^b9{$^1$} -- \gdef^^ba{\ordm} -- \gdef^^bb{\guillemetright} -- \gdef^^bc{$1\over4$} -- \gdef^^bd{$1\over2$} -- \gdef^^be{$3\over4$} -- \gdef^^bf{\questiondown} -+ \gdefchar^^b0{\textdegree} -+ \gdefchar^^b1{$\pm$} -+ \gdefchar^^b2{$^2$} -+ \gdefchar^^b3{$^3$} -+ \gdefchar^^b4{\'{}} -+ \gdefchar^^b5{$\mu$} -+ \gdefchar^^b6{\P} -+ \gdefchar^^b7{\ensuremath\cdot} -+ \gdefchar^^b8{\cedilla\ } -+ \gdefchar^^b9{$^1$} -+ \gdefchar^^ba{\ordm} -+ \gdefchar^^bb{\guillemetright{}} -+ \gdefchar^^bc{$1\over4$} -+ \gdefchar^^bd{$1\over2$} -+ \gdefchar^^be{$3\over4$} -+ \gdefchar^^bf{\questiondown} - % -- \gdef^^c0{\`A} -- \gdef^^c1{\'A} -- \gdef^^c2{\^A} -- \gdef^^c3{\~A} -- \gdef^^c4{\"A} -- \gdef^^c5{\ringaccent A} -- \gdef^^c6{\AE} -- \gdef^^c7{\cedilla C} -- \gdef^^c8{\`E} -- \gdef^^c9{\'E} -- \gdef^^ca{\^E} -- \gdef^^cb{\"E} -- \gdef^^cc{\`I} -- \gdef^^cd{\'I} -- \gdef^^ce{\^I} -- \gdef^^cf{\"I} -+ \gdefchar^^c0{\`A} -+ \gdefchar^^c1{\'A} -+ \gdefchar^^c2{\^A} -+ \gdefchar^^c3{\~A} -+ \gdefchar^^c4{\"A} -+ \gdefchar^^c5{\ringaccent A} -+ \gdefchar^^c6{\AE} -+ \gdefchar^^c7{\cedilla C} -+ \gdefchar^^c8{\`E} -+ \gdefchar^^c9{\'E} -+ \gdefchar^^ca{\^E} -+ \gdefchar^^cb{\"E} -+ \gdefchar^^cc{\`I} -+ \gdefchar^^cd{\'I} -+ \gdefchar^^ce{\^I} -+ \gdefchar^^cf{\"I} - % -- \gdef^^d0{\DH} -- \gdef^^d1{\~N} -- \gdef^^d2{\`O} -- \gdef^^d3{\'O} -- \gdef^^d4{\^O} -- \gdef^^d5{\~O} -- \gdef^^d6{\"O} -- \gdef^^d7{$\times$} -- \gdef^^d8{\O} -- \gdef^^d9{\`U} -- \gdef^^da{\'U} -- \gdef^^db{\^U} -- \gdef^^dc{\"U} -- \gdef^^dd{\'Y} -- \gdef^^de{\TH} -- \gdef^^df{\ss} -+ \gdefchar^^d0{\DH} -+ \gdefchar^^d1{\~N} -+ \gdefchar^^d2{\`O} -+ \gdefchar^^d3{\'O} -+ \gdefchar^^d4{\^O} -+ \gdefchar^^d5{\~O} -+ \gdefchar^^d6{\"O} -+ \gdefchar^^d7{$\times$} -+ \gdefchar^^d8{\O} -+ \gdefchar^^d9{\`U} -+ \gdefchar^^da{\'U} -+ \gdefchar^^db{\^U} -+ \gdefchar^^dc{\"U} -+ \gdefchar^^dd{\'Y} -+ \gdefchar^^de{\TH} -+ \gdefchar^^df{\ss} - % -- \gdef^^e0{\`a} -- \gdef^^e1{\'a} -- \gdef^^e2{\^a} -- \gdef^^e3{\~a} -- \gdef^^e4{\"a} -- \gdef^^e5{\ringaccent a} -- \gdef^^e6{\ae} -- \gdef^^e7{\cedilla c} -- \gdef^^e8{\`e} -- \gdef^^e9{\'e} -- \gdef^^ea{\^e} -- \gdef^^eb{\"e} -- \gdef^^ec{\`{\dotless i}} -- \gdef^^ed{\'{\dotless i}} -- \gdef^^ee{\^{\dotless i}} -- \gdef^^ef{\"{\dotless i}} -+ \gdefchar^^e0{\`a} -+ \gdefchar^^e1{\'a} -+ \gdefchar^^e2{\^a} -+ \gdefchar^^e3{\~a} -+ \gdefchar^^e4{\"a} -+ \gdefchar^^e5{\ringaccent a} -+ \gdefchar^^e6{\ae} -+ \gdefchar^^e7{\cedilla c} -+ \gdefchar^^e8{\`e} -+ \gdefchar^^e9{\'e} -+ \gdefchar^^ea{\^e} -+ \gdefchar^^eb{\"e} -+ \gdefchar^^ec{\`{\dotless i}} -+ \gdefchar^^ed{\'{\dotless i}} -+ \gdefchar^^ee{\^{\dotless i}} -+ \gdefchar^^ef{\"{\dotless i}} - % -- \gdef^^f0{\dh} -- \gdef^^f1{\~n} -- \gdef^^f2{\`o} -- \gdef^^f3{\'o} -- \gdef^^f4{\^o} -- \gdef^^f5{\~o} -- \gdef^^f6{\"o} -- \gdef^^f7{$\div$} -- \gdef^^f8{\o} -- \gdef^^f9{\`u} -- \gdef^^fa{\'u} -- \gdef^^fb{\^u} -- \gdef^^fc{\"u} -- \gdef^^fd{\'y} -- \gdef^^fe{\th} -- \gdef^^ff{\"y} -+ \gdefchar^^f0{\dh} -+ \gdefchar^^f1{\~n} -+ \gdefchar^^f2{\`o} -+ \gdefchar^^f3{\'o} -+ \gdefchar^^f4{\^o} -+ \gdefchar^^f5{\~o} -+ \gdefchar^^f6{\"o} -+ \gdefchar^^f7{$\div$} -+ \gdefchar^^f8{\o} -+ \gdefchar^^f9{\`u} -+ \gdefchar^^fa{\'u} -+ \gdefchar^^fb{\^u} -+ \gdefchar^^fc{\"u} -+ \gdefchar^^fd{\'y} -+ \gdefchar^^fe{\th} -+ \gdefchar^^ff{\"y} - } - - % Latin9 (ISO-8859-15) encoding character definitions. -@@ -9127,119 +10119,119 @@ - % Encoding is almost identical to Latin1. - \latonechardefs - % -- \gdef^^a4{\euro} -- \gdef^^a6{\v S} -- \gdef^^a8{\v s} -- \gdef^^b4{\v Z} -- \gdef^^b8{\v z} -- \gdef^^bc{\OE} -- \gdef^^bd{\oe} -- \gdef^^be{\"Y} -+ \gdefchar^^a4{\euro{}} -+ \gdefchar^^a6{\v S} -+ \gdefchar^^a8{\v s} -+ \gdefchar^^b4{\v Z} -+ \gdefchar^^b8{\v z} -+ \gdefchar^^bc{\OE} -+ \gdefchar^^bd{\oe} -+ \gdefchar^^be{\"Y} - } - - % Latin2 (ISO-8859-2) character definitions. - \def\lattwochardefs{% -- \gdef^^a0{\tie} -- \gdef^^a1{\ogonek{A}} -- \gdef^^a2{\u{}} -- \gdef^^a3{\L} -- \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} -- \gdef^^a5{\v L} -- \gdef^^a6{\'S} -- \gdef^^a7{\S} -- \gdef^^a8{\"{}} -- \gdef^^a9{\v S} -- \gdef^^aa{\cedilla S} -- \gdef^^ab{\v T} -- \gdef^^ac{\'Z} -- \gdef^^ad{\-} -- \gdef^^ae{\v Z} -- \gdef^^af{\dotaccent Z} -+ \gdefchar^^a0{\tie} -+ \gdefchar^^a1{\ogonek{A}} -+ \gdefchar^^a2{\u{}} -+ \gdefchar^^a3{\L} -+ \gdefchar^^a4{\missingcharmsg{CURRENCY SIGN}} -+ \gdefchar^^a5{\v L} -+ \gdefchar^^a6{\'S} -+ \gdefchar^^a7{\S} -+ \gdefchar^^a8{\"{}} -+ \gdefchar^^a9{\v S} -+ \gdefchar^^aa{\cedilla S} -+ \gdefchar^^ab{\v T} -+ \gdefchar^^ac{\'Z} -+ \gdefchar^^ad{\-} -+ \gdefchar^^ae{\v Z} -+ \gdefchar^^af{\dotaccent Z} - % -- \gdef^^b0{\textdegree} -- \gdef^^b1{\ogonek{a}} -- \gdef^^b2{\ogonek{ }} -- \gdef^^b3{\l} -- \gdef^^b4{\'{}} -- \gdef^^b5{\v l} -- \gdef^^b6{\'s} -- \gdef^^b7{\v{}} -- \gdef^^b8{\cedilla\ } -- \gdef^^b9{\v s} -- \gdef^^ba{\cedilla s} -- \gdef^^bb{\v t} -- \gdef^^bc{\'z} -- \gdef^^bd{\H{}} -- \gdef^^be{\v z} -- \gdef^^bf{\dotaccent z} -+ \gdefchar^^b0{\textdegree{}} -+ \gdefchar^^b1{\ogonek{a}} -+ \gdefchar^^b2{\ogonek{ }} -+ \gdefchar^^b3{\l} -+ \gdefchar^^b4{\'{}} -+ \gdefchar^^b5{\v l} -+ \gdefchar^^b6{\'s} -+ \gdefchar^^b7{\v{}} -+ \gdefchar^^b8{\cedilla\ } -+ \gdefchar^^b9{\v s} -+ \gdefchar^^ba{\cedilla s} -+ \gdefchar^^bb{\v t} -+ \gdefchar^^bc{\'z} -+ \gdefchar^^bd{\H{}} -+ \gdefchar^^be{\v z} -+ \gdefchar^^bf{\dotaccent z} - % -- \gdef^^c0{\'R} -- \gdef^^c1{\'A} -- \gdef^^c2{\^A} -- \gdef^^c3{\u A} -- \gdef^^c4{\"A} -- \gdef^^c5{\'L} -- \gdef^^c6{\'C} -- \gdef^^c7{\cedilla C} -- \gdef^^c8{\v C} -- \gdef^^c9{\'E} -- \gdef^^ca{\ogonek{E}} -- \gdef^^cb{\"E} -- \gdef^^cc{\v E} -- \gdef^^cd{\'I} -- \gdef^^ce{\^I} -- \gdef^^cf{\v D} -+ \gdefchar^^c0{\'R} -+ \gdefchar^^c1{\'A} -+ \gdefchar^^c2{\^A} -+ \gdefchar^^c3{\u A} -+ \gdefchar^^c4{\"A} -+ \gdefchar^^c5{\'L} -+ \gdefchar^^c6{\'C} -+ \gdefchar^^c7{\cedilla C} -+ \gdefchar^^c8{\v C} -+ \gdefchar^^c9{\'E} -+ \gdefchar^^ca{\ogonek{E}} -+ \gdefchar^^cb{\"E} -+ \gdefchar^^cc{\v E} -+ \gdefchar^^cd{\'I} -+ \gdefchar^^ce{\^I} -+ \gdefchar^^cf{\v D} - % -- \gdef^^d0{\DH} -- \gdef^^d1{\'N} -- \gdef^^d2{\v N} -- \gdef^^d3{\'O} -- \gdef^^d4{\^O} -- \gdef^^d5{\H O} -- \gdef^^d6{\"O} -- \gdef^^d7{$\times$} -- \gdef^^d8{\v R} -- \gdef^^d9{\ringaccent U} -- \gdef^^da{\'U} -- \gdef^^db{\H U} -- \gdef^^dc{\"U} -- \gdef^^dd{\'Y} -- \gdef^^de{\cedilla T} -- \gdef^^df{\ss} -+ \gdefchar^^d0{\DH} -+ \gdefchar^^d1{\'N} -+ \gdefchar^^d2{\v N} -+ \gdefchar^^d3{\'O} -+ \gdefchar^^d4{\^O} -+ \gdefchar^^d5{\H O} -+ \gdefchar^^d6{\"O} -+ \gdefchar^^d7{$\times$} -+ \gdefchar^^d8{\v R} -+ \gdefchar^^d9{\ringaccent U} -+ \gdefchar^^da{\'U} -+ \gdefchar^^db{\H U} -+ \gdefchar^^dc{\"U} -+ \gdefchar^^dd{\'Y} -+ \gdefchar^^de{\cedilla T} -+ \gdefchar^^df{\ss} - % -- \gdef^^e0{\'r} -- \gdef^^e1{\'a} -- \gdef^^e2{\^a} -- \gdef^^e3{\u a} -- \gdef^^e4{\"a} -- \gdef^^e5{\'l} -- \gdef^^e6{\'c} -- \gdef^^e7{\cedilla c} -- \gdef^^e8{\v c} -- \gdef^^e9{\'e} -- \gdef^^ea{\ogonek{e}} -- \gdef^^eb{\"e} -- \gdef^^ec{\v e} -- \gdef^^ed{\'{\dotless{i}}} -- \gdef^^ee{\^{\dotless{i}}} -- \gdef^^ef{\v d} -+ \gdefchar^^e0{\'r} -+ \gdefchar^^e1{\'a} -+ \gdefchar^^e2{\^a} -+ \gdefchar^^e3{\u a} -+ \gdefchar^^e4{\"a} -+ \gdefchar^^e5{\'l} -+ \gdefchar^^e6{\'c} -+ \gdefchar^^e7{\cedilla c} -+ \gdefchar^^e8{\v c} -+ \gdefchar^^e9{\'e} -+ \gdefchar^^ea{\ogonek{e}} -+ \gdefchar^^eb{\"e} -+ \gdefchar^^ec{\v e} -+ \gdefchar^^ed{\'{\dotless{i}}} -+ \gdefchar^^ee{\^{\dotless{i}}} -+ \gdefchar^^ef{\v d} - % -- \gdef^^f0{\dh} -- \gdef^^f1{\'n} -- \gdef^^f2{\v n} -- \gdef^^f3{\'o} -- \gdef^^f4{\^o} -- \gdef^^f5{\H o} -- \gdef^^f6{\"o} -- \gdef^^f7{$\div$} -- \gdef^^f8{\v r} -- \gdef^^f9{\ringaccent u} -- \gdef^^fa{\'u} -- \gdef^^fb{\H u} -- \gdef^^fc{\"u} -- \gdef^^fd{\'y} -- \gdef^^fe{\cedilla t} -- \gdef^^ff{\dotaccent{}} -+ \gdefchar^^f0{\dh} -+ \gdefchar^^f1{\'n} -+ \gdefchar^^f2{\v n} -+ \gdefchar^^f3{\'o} -+ \gdefchar^^f4{\^o} -+ \gdefchar^^f5{\H o} -+ \gdefchar^^f6{\"o} -+ \gdefchar^^f7{$\div$} -+ \gdefchar^^f8{\v r} -+ \gdefchar^^f9{\ringaccent u} -+ \gdefchar^^fa{\'u} -+ \gdefchar^^fb{\H u} -+ \gdefchar^^fc{\"u} -+ \gdefchar^^fd{\'y} -+ \gdefchar^^fe{\cedilla t} -+ \gdefchar^^ff{\dotaccent{}} - } - - % UTF-8 character definitions. -@@ -9269,35 +10261,56 @@ - \fi - } - -+% Give non-ASCII bytes the active definitions for processing UTF-8 sequences - \begingroup - \catcode`\~13 -+ \catcode`\$12 - \catcode`\"12 - -+ % Loop from \countUTFx to \countUTFy, performing \UTFviiiTmp -+ % substituting ~ and $ with a character token of that value. - \def\UTFviiiLoop{% - \global\catcode\countUTFx\active - \uccode`\~\countUTFx -+ \uccode`\$\countUTFx - \uppercase\expandafter{\UTFviiiTmp}% - \advance\countUTFx by 1 - \ifnum\countUTFx < \countUTFy - \expandafter\UTFviiiLoop - \fi} - -+ % For bytes other than the first in a UTF-8 sequence. Not expected to -+ % be expanded except when writing to auxiliary files. -+ \countUTFx = "80 -+ \countUTFy = "C2 -+ \def\UTFviiiTmp{% -+ \gdef~{% -+ \ifpassthroughchars $\fi}}% -+ \UTFviiiLoop -+ - \countUTFx = "C2 - \countUTFy = "E0 - \def\UTFviiiTmp{% -- \xdef~{\noexpand\UTFviiiTwoOctets\string~}} -+ \gdef~{% -+ \ifpassthroughchars $% -+ \else\expandafter\UTFviiiTwoOctets\expandafter$\fi}}% - \UTFviiiLoop - - \countUTFx = "E0 - \countUTFy = "F0 - \def\UTFviiiTmp{% -- \xdef~{\noexpand\UTFviiiThreeOctets\string~}} -+ \gdef~{% -+ \ifpassthroughchars $% -+ \else\expandafter\UTFviiiThreeOctets\expandafter$\fi}}% - \UTFviiiLoop - - \countUTFx = "F0 - \countUTFy = "F4 - \def\UTFviiiTmp{% -- \xdef~{\noexpand\UTFviiiFourOctets\string~}} -+ \gdef~{% -+ \ifpassthroughchars $% -+ \else\expandafter\UTFviiiFourOctets\expandafter$\fi -+ }}% - \UTFviiiLoop - \endgroup - -@@ -9306,13 +10319,36 @@ - % @U{xxxx} to produce U+xxxx, if we support it. - \def\U#1{% - \expandafter\ifx\csname uni:#1\endcsname \relax -- \errhelp = \EMsimple -- \errmessage{Unicode character U+#1 not supported, sorry}% -+ \iftxinativeunicodecapable -+ % All Unicode characters can be used if native Unicode handling is -+ % active. However, if the font does not have the glyph, -+ % letters are missing. -+ \begingroup -+ \uccode`\.="#1\relax -+ \uppercase{.} -+ \endgroup -+ \else -+ \errhelp = \EMsimple -+ \errmessage{Unicode character U+#1 not supported, sorry}% -+ \fi - \else - \csname uni:#1\endcsname - \fi - } - -+% These macros are used here to construct the name of a control -+% sequence to be defined. -+\def\UTFviiiTwoOctetsName#1#2{% -+ \csname u8:#1\string #2\endcsname}% -+\def\UTFviiiThreeOctetsName#1#2#3{% -+ \csname u8:#1\string #2\string #3\endcsname}% -+\def\UTFviiiFourOctetsName#1#2#3#4{% -+ \csname u8:#1\string #2\string #3\string #4\endcsname}% -+ -+% For UTF-8 byte sequences (TeX, e-TeX and pdfTeX), -+% provide a definition macro to replace a Unicode character; -+% this gets used by the @U command -+% - \begingroup - \catcode`\"=12 - \catcode`\<=12 -@@ -9321,64 +10357,91 @@ - \catcode`\;=12 - \catcode`\!=12 - \catcode`\~=13 -- \gdef\DeclareUnicodeCharacter#1#2{% -+ \gdef\DeclareUnicodeCharacterUTFviii#1#2{% - \countUTFz = "#1\relax -- %\wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}% - \begingroup - \parseXMLCharref -- \def\UTFviiiTwoOctets##1##2{% -- \csname u8:##1\string ##2\endcsname}% -- \def\UTFviiiThreeOctets##1##2##3{% -- \csname u8:##1\string ##2\string ##3\endcsname}% -- \def\UTFviiiFourOctets##1##2##3##4{% -- \csname u8:##1\string ##2\string ##3\string ##4\endcsname}% -- \expandafter\expandafter\expandafter\expandafter -- \expandafter\expandafter\expandafter -- \gdef\UTFviiiTmp{#2}% -+ -+ % Give \u8:... its definition. The sequence of seven \expandafter's -+ % expands after the \gdef three times, e.g. -+ % -+ % 1. \UTFviiTwoOctetsName B1 B2 -+ % 2. \csname u8:B1 \string B2 \endcsname -+ % 3. \u8: B1 B2 (a single control sequence token) -+ % -+ \expandafter\expandafter -+ \expandafter\expandafter -+ \expandafter\expandafter -+ \expandafter\gdef \UTFviiiTmp{#2}% - % - \expandafter\ifx\csname uni:#1\endcsname \relax \else -- \errmessage{Internal error, already defined: #1}% -+ \message{Internal error, already defined: #1}% - \fi - % - % define an additional control sequence for this code point. - \expandafter\globallet\csname uni:#1\endcsname \UTFviiiTmp - \endgroup} -- -+ % -+ % Given the value in \countUTFz as a Unicode code point, set \UTFviiiTmp -+ % to the corresponding UTF-8 sequence. - \gdef\parseXMLCharref{% - \ifnum\countUTFz < "A0\relax - \errhelp = \EMsimple - \errmessage{Cannot define Unicode char value < 00A0}% - \else\ifnum\countUTFz < "800\relax - \parseUTFviiiA,% -- \parseUTFviiiB C\UTFviiiTwoOctets.,% -+ \parseUTFviiiB C\UTFviiiTwoOctetsName.,% - \else\ifnum\countUTFz < "10000\relax - \parseUTFviiiA;% - \parseUTFviiiA,% -- \parseUTFviiiB E\UTFviiiThreeOctets.{,;}% -+ \parseUTFviiiB E\UTFviiiThreeOctetsName.{,;}% - \else - \parseUTFviiiA;% - \parseUTFviiiA,% - \parseUTFviiiA!% -- \parseUTFviiiB F\UTFviiiFourOctets.{!,;}% -+ \parseUTFviiiB F\UTFviiiFourOctetsName.{!,;}% - \fi\fi\fi - } - -+ % Extract a byte from the end of the UTF-8 representation of \countUTFx. -+ % It must be a non-initial byte in the sequence. -+ % Change \uccode of #1 for it to be used in \parseUTFviiiB as one -+ % of the bytes. - \gdef\parseUTFviiiA#1{% - \countUTFx = \countUTFz - \divide\countUTFz by 64 -- \countUTFy = \countUTFz -+ \countUTFy = \countUTFz % Save to be the future value of \countUTFz. - \multiply\countUTFz by 64 -+ -+ % \countUTFz is now \countUTFx with the last 5 bits cleared. Subtract -+ % in order to get the last five bits. - \advance\countUTFx by -\countUTFz -+ -+ % Convert this to the byte in the UTF-8 sequence. - \advance\countUTFx by 128 - \uccode `#1\countUTFx - \countUTFz = \countUTFy} - -+ % Used to put a UTF-8 byte sequence into \UTFviiiTmp -+ % #1 is the increment for \countUTFz to yield a the first byte of the UTF-8 -+ % sequence. -+ % #2 is one of the \UTFviii*OctetsName macros. -+ % #3 is always a full stop (.) -+ % #4 is a template for the other bytes in the sequence. The values for these -+ % bytes is substituted in here with \uppercase using the \uccode's. - \gdef\parseUTFviiiB#1#2#3#4{% - \advance\countUTFz by "#10\relax - \uccode `#3\countUTFz - \uppercase{\gdef\UTFviiiTmp{#2#3#4}}} - \endgroup - -+% For native Unicode handling (XeTeX and LuaTeX), -+% provide a definition macro that sets a catcode to `other' non-globally -+% -+\def\DeclareUnicodeCharacterNativeOther#1#2{% -+ \catcode"#1=\other -+} -+ - % https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_M - % U+0000..U+007F = https://en.wikipedia.org/wiki/Basic_Latin_(Unicode_block) - % U+0080..U+00FF = https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block) -@@ -9393,502 +10456,748 @@ - % We won't be doing that here in this simple file. But we can try to at - % least make most of the characters not bomb out. - % --\def\utfeightchardefs{% -- \DeclareUnicodeCharacter{00A0}{\tie} -- \DeclareUnicodeCharacter{00A1}{\exclamdown} -- \DeclareUnicodeCharacter{00A3}{\pounds} -- \DeclareUnicodeCharacter{00A7}{\S} -- \DeclareUnicodeCharacter{00A8}{\"{ }} -- \DeclareUnicodeCharacter{00A9}{\copyright} -- \DeclareUnicodeCharacter{00AA}{\ordf} -- \DeclareUnicodeCharacter{00AB}{\guillemetleft} -- \DeclareUnicodeCharacter{00AC}{\ensuremath\lnot} -- \DeclareUnicodeCharacter{00AD}{\-} -- \DeclareUnicodeCharacter{00AE}{\registeredsymbol} -- \DeclareUnicodeCharacter{00AF}{\={ }} -- -- \DeclareUnicodeCharacter{00B0}{\ringaccent{ }} -- \DeclareUnicodeCharacter{00B1}{\ensuremath\pm} -- \DeclareUnicodeCharacter{00B2}{$^2$} -- \DeclareUnicodeCharacter{00B3}{$^3$} -- \DeclareUnicodeCharacter{00B4}{\'{ }} -- \DeclareUnicodeCharacter{00B5}{$\mu$} -- \DeclareUnicodeCharacter{00B6}{\P} -- \DeclareUnicodeCharacter{00B7}{\ensuremath\cdot} -- \DeclareUnicodeCharacter{00B8}{\cedilla{ }} -- \DeclareUnicodeCharacter{00B9}{$^1$} -- \DeclareUnicodeCharacter{00BA}{\ordm} -- \DeclareUnicodeCharacter{00BB}{\guillemetright} -- \DeclareUnicodeCharacter{00BC}{$1\over4$} -- \DeclareUnicodeCharacter{00BD}{$1\over2$} -- \DeclareUnicodeCharacter{00BE}{$3\over4$} -- \DeclareUnicodeCharacter{00BF}{\questiondown} -- -- \DeclareUnicodeCharacter{00C0}{\`A} -- \DeclareUnicodeCharacter{00C1}{\'A} -- \DeclareUnicodeCharacter{00C2}{\^A} -- \DeclareUnicodeCharacter{00C3}{\~A} -- \DeclareUnicodeCharacter{00C4}{\"A} -- \DeclareUnicodeCharacter{00C5}{\AA} -- \DeclareUnicodeCharacter{00C6}{\AE} -- \DeclareUnicodeCharacter{00C7}{\cedilla{C}} -- \DeclareUnicodeCharacter{00C8}{\`E} -- \DeclareUnicodeCharacter{00C9}{\'E} -- \DeclareUnicodeCharacter{00CA}{\^E} -- \DeclareUnicodeCharacter{00CB}{\"E} -- \DeclareUnicodeCharacter{00CC}{\`I} -- \DeclareUnicodeCharacter{00CD}{\'I} -- \DeclareUnicodeCharacter{00CE}{\^I} -- \DeclareUnicodeCharacter{00CF}{\"I} -- -- \DeclareUnicodeCharacter{00D0}{\DH} -- \DeclareUnicodeCharacter{00D1}{\~N} -- \DeclareUnicodeCharacter{00D2}{\`O} -- \DeclareUnicodeCharacter{00D3}{\'O} -- \DeclareUnicodeCharacter{00D4}{\^O} -- \DeclareUnicodeCharacter{00D5}{\~O} -- \DeclareUnicodeCharacter{00D6}{\"O} -- \DeclareUnicodeCharacter{00D7}{\ensuremath\times} -- \DeclareUnicodeCharacter{00D8}{\O} -- \DeclareUnicodeCharacter{00D9}{\`U} -- \DeclareUnicodeCharacter{00DA}{\'U} -- \DeclareUnicodeCharacter{00DB}{\^U} -- \DeclareUnicodeCharacter{00DC}{\"U} -- \DeclareUnicodeCharacter{00DD}{\'Y} -- \DeclareUnicodeCharacter{00DE}{\TH} -- \DeclareUnicodeCharacter{00DF}{\ss} -- -- \DeclareUnicodeCharacter{00E0}{\`a} -- \DeclareUnicodeCharacter{00E1}{\'a} -- \DeclareUnicodeCharacter{00E2}{\^a} -- \DeclareUnicodeCharacter{00E3}{\~a} -- \DeclareUnicodeCharacter{00E4}{\"a} -- \DeclareUnicodeCharacter{00E5}{\aa} -- \DeclareUnicodeCharacter{00E6}{\ae} -- \DeclareUnicodeCharacter{00E7}{\cedilla{c}} -- \DeclareUnicodeCharacter{00E8}{\`e} -- \DeclareUnicodeCharacter{00E9}{\'e} -- \DeclareUnicodeCharacter{00EA}{\^e} -- \DeclareUnicodeCharacter{00EB}{\"e} -- \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}} -- \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}} -- \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}} -- \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}} -- -- \DeclareUnicodeCharacter{00F0}{\dh} -- \DeclareUnicodeCharacter{00F1}{\~n} -- \DeclareUnicodeCharacter{00F2}{\`o} -- \DeclareUnicodeCharacter{00F3}{\'o} -- \DeclareUnicodeCharacter{00F4}{\^o} -- \DeclareUnicodeCharacter{00F5}{\~o} -- \DeclareUnicodeCharacter{00F6}{\"o} -- \DeclareUnicodeCharacter{00F7}{\ensuremath\div} -- \DeclareUnicodeCharacter{00F8}{\o} -- \DeclareUnicodeCharacter{00F9}{\`u} -- \DeclareUnicodeCharacter{00FA}{\'u} -- \DeclareUnicodeCharacter{00FB}{\^u} -- \DeclareUnicodeCharacter{00FC}{\"u} -- \DeclareUnicodeCharacter{00FD}{\'y} -- \DeclareUnicodeCharacter{00FE}{\th} -- \DeclareUnicodeCharacter{00FF}{\"y} -- -- \DeclareUnicodeCharacter{0100}{\=A} -- \DeclareUnicodeCharacter{0101}{\=a} -- \DeclareUnicodeCharacter{0102}{\u{A}} -- \DeclareUnicodeCharacter{0103}{\u{a}} -- \DeclareUnicodeCharacter{0104}{\ogonek{A}} -- \DeclareUnicodeCharacter{0105}{\ogonek{a}} -- \DeclareUnicodeCharacter{0106}{\'C} -- \DeclareUnicodeCharacter{0107}{\'c} -- \DeclareUnicodeCharacter{0108}{\^C} -- \DeclareUnicodeCharacter{0109}{\^c} -- \DeclareUnicodeCharacter{010A}{\dotaccent{C}} -- \DeclareUnicodeCharacter{010B}{\dotaccent{c}} -- \DeclareUnicodeCharacter{010C}{\v{C}} -- \DeclareUnicodeCharacter{010D}{\v{c}} -- \DeclareUnicodeCharacter{010E}{\v{D}} -- \DeclareUnicodeCharacter{010F}{d'} -- -- \DeclareUnicodeCharacter{0110}{\DH} -- \DeclareUnicodeCharacter{0111}{\dh} -- \DeclareUnicodeCharacter{0112}{\=E} -- \DeclareUnicodeCharacter{0113}{\=e} -- \DeclareUnicodeCharacter{0114}{\u{E}} -- \DeclareUnicodeCharacter{0115}{\u{e}} -- \DeclareUnicodeCharacter{0116}{\dotaccent{E}} -- \DeclareUnicodeCharacter{0117}{\dotaccent{e}} -- \DeclareUnicodeCharacter{0118}{\ogonek{E}} -- \DeclareUnicodeCharacter{0119}{\ogonek{e}} -- \DeclareUnicodeCharacter{011A}{\v{E}} -- \DeclareUnicodeCharacter{011B}{\v{e}} -- \DeclareUnicodeCharacter{011C}{\^G} -- \DeclareUnicodeCharacter{011D}{\^g} -- \DeclareUnicodeCharacter{011E}{\u{G}} -- \DeclareUnicodeCharacter{011F}{\u{g}} -- -- \DeclareUnicodeCharacter{0120}{\dotaccent{G}} -- \DeclareUnicodeCharacter{0121}{\dotaccent{g}} -- \DeclareUnicodeCharacter{0122}{\cedilla{G}} -- \DeclareUnicodeCharacter{0123}{\cedilla{g}} -- \DeclareUnicodeCharacter{0124}{\^H} -- \DeclareUnicodeCharacter{0125}{\^h} -- \DeclareUnicodeCharacter{0126}{\missingcharmsg{H WITH STROKE}} -- \DeclareUnicodeCharacter{0127}{\missingcharmsg{h WITH STROKE}} -- \DeclareUnicodeCharacter{0128}{\~I} -- \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}} -- \DeclareUnicodeCharacter{012A}{\=I} -- \DeclareUnicodeCharacter{012B}{\={\dotless{i}}} -- \DeclareUnicodeCharacter{012C}{\u{I}} -- \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}} -- \DeclareUnicodeCharacter{012E}{\ogonek{I}} -- \DeclareUnicodeCharacter{012F}{\ogonek{i}} -- -- \DeclareUnicodeCharacter{0130}{\dotaccent{I}} -- \DeclareUnicodeCharacter{0131}{\dotless{i}} -- \DeclareUnicodeCharacter{0132}{IJ} -- \DeclareUnicodeCharacter{0133}{ij} -- \DeclareUnicodeCharacter{0134}{\^J} -- \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}} -- \DeclareUnicodeCharacter{0136}{\cedilla{K}} -- \DeclareUnicodeCharacter{0137}{\cedilla{k}} -- \DeclareUnicodeCharacter{0138}{\ensuremath\kappa} -- \DeclareUnicodeCharacter{0139}{\'L} -- \DeclareUnicodeCharacter{013A}{\'l} -- \DeclareUnicodeCharacter{013B}{\cedilla{L}} -- \DeclareUnicodeCharacter{013C}{\cedilla{l}} -+\def\unicodechardefs{% -+ \DeclareUnicodeCharacter{00A0}{\tie}% -+ \DeclareUnicodeCharacter{00A1}{\exclamdown}% -+ \DeclareUnicodeCharacter{00A2}{{\tcfont \char162}}% 0242=cent -+ \DeclareUnicodeCharacter{00A3}{\pounds{}}% -+ \DeclareUnicodeCharacter{00A4}{{\tcfont \char164}}% 0244=currency -+ \DeclareUnicodeCharacter{00A5}{{\tcfont \char165}}% 0245=yen -+ \DeclareUnicodeCharacter{00A6}{{\tcfont \char166}}% 0246=brokenbar -+ \DeclareUnicodeCharacter{00A7}{\S}% -+ \DeclareUnicodeCharacter{00A8}{\"{ }}% -+ \DeclareUnicodeCharacter{00A9}{\copyright{}}% -+ \DeclareUnicodeCharacter{00AA}{\ordf}% -+ \DeclareUnicodeCharacter{00AB}{\guillemetleft{}}% -+ \DeclareUnicodeCharacter{00AC}{\ensuremath\lnot}% -+ \DeclareUnicodeCharacter{00AD}{\-}% -+ \DeclareUnicodeCharacter{00AE}{\registeredsymbol{}}% -+ \DeclareUnicodeCharacter{00AF}{\={ }}% -+ % -+ \DeclareUnicodeCharacter{00B0}{\ringaccent{ }}% -+ \DeclareUnicodeCharacter{00B1}{\ensuremath\pm}% -+ \DeclareUnicodeCharacter{00B2}{$^2$}% -+ \DeclareUnicodeCharacter{00B3}{$^3$}% -+ \DeclareUnicodeCharacter{00B4}{\'{ }}% -+ \DeclareUnicodeCharacter{00B5}{$\mu$}% -+ \DeclareUnicodeCharacter{00B6}{\P}% -+ \DeclareUnicodeCharacter{00B7}{\ensuremath\cdot}% -+ \DeclareUnicodeCharacter{00B8}{\cedilla{ }}% -+ \DeclareUnicodeCharacter{00B9}{$^1$}% -+ \DeclareUnicodeCharacter{00BA}{\ordm}% -+ \DeclareUnicodeCharacter{00BB}{\guillemetright{}}% -+ \DeclareUnicodeCharacter{00BC}{$1\over4$}% -+ \DeclareUnicodeCharacter{00BD}{$1\over2$}% -+ \DeclareUnicodeCharacter{00BE}{$3\over4$}% -+ \DeclareUnicodeCharacter{00BF}{\questiondown}% -+ % -+ \DeclareUnicodeCharacter{00C0}{\`A}% -+ \DeclareUnicodeCharacter{00C1}{\'A}% -+ \DeclareUnicodeCharacter{00C2}{\^A}% -+ \DeclareUnicodeCharacter{00C3}{\~A}% -+ \DeclareUnicodeCharacter{00C4}{\"A}% -+ \DeclareUnicodeCharacter{00C5}{\AA}% -+ \DeclareUnicodeCharacter{00C6}{\AE}% -+ \DeclareUnicodeCharacter{00C7}{\cedilla{C}}% -+ \DeclareUnicodeCharacter{00C8}{\`E}% -+ \DeclareUnicodeCharacter{00C9}{\'E}% -+ \DeclareUnicodeCharacter{00CA}{\^E}% -+ \DeclareUnicodeCharacter{00CB}{\"E}% -+ \DeclareUnicodeCharacter{00CC}{\`I}% -+ \DeclareUnicodeCharacter{00CD}{\'I}% -+ \DeclareUnicodeCharacter{00CE}{\^I}% -+ \DeclareUnicodeCharacter{00CF}{\"I}% -+ % -+ \DeclareUnicodeCharacter{00D0}{\DH}% -+ \DeclareUnicodeCharacter{00D1}{\~N}% -+ \DeclareUnicodeCharacter{00D2}{\`O}% -+ \DeclareUnicodeCharacter{00D3}{\'O}% -+ \DeclareUnicodeCharacter{00D4}{\^O}% -+ \DeclareUnicodeCharacter{00D5}{\~O}% -+ \DeclareUnicodeCharacter{00D6}{\"O}% -+ \DeclareUnicodeCharacter{00D7}{\ensuremath\times}% -+ \DeclareUnicodeCharacter{00D8}{\O}% -+ \DeclareUnicodeCharacter{00D9}{\`U}% -+ \DeclareUnicodeCharacter{00DA}{\'U}% -+ \DeclareUnicodeCharacter{00DB}{\^U}% -+ \DeclareUnicodeCharacter{00DC}{\"U}% -+ \DeclareUnicodeCharacter{00DD}{\'Y}% -+ \DeclareUnicodeCharacter{00DE}{\TH}% -+ \DeclareUnicodeCharacter{00DF}{\ss}% -+ % -+ \DeclareUnicodeCharacter{00E0}{\`a}% -+ \DeclareUnicodeCharacter{00E1}{\'a}% -+ \DeclareUnicodeCharacter{00E2}{\^a}% -+ \DeclareUnicodeCharacter{00E3}{\~a}% -+ \DeclareUnicodeCharacter{00E4}{\"a}% -+ \DeclareUnicodeCharacter{00E5}{\aa}% -+ \DeclareUnicodeCharacter{00E6}{\ae}% -+ \DeclareUnicodeCharacter{00E7}{\cedilla{c}}% -+ \DeclareUnicodeCharacter{00E8}{\`e}% -+ \DeclareUnicodeCharacter{00E9}{\'e}% -+ \DeclareUnicodeCharacter{00EA}{\^e}% -+ \DeclareUnicodeCharacter{00EB}{\"e}% -+ \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}}% -+ \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}}% -+ \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}}% -+ \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}}% -+ % -+ \DeclareUnicodeCharacter{00F0}{\dh}% -+ \DeclareUnicodeCharacter{00F1}{\~n}% -+ \DeclareUnicodeCharacter{00F2}{\`o}% -+ \DeclareUnicodeCharacter{00F3}{\'o}% -+ \DeclareUnicodeCharacter{00F4}{\^o}% -+ \DeclareUnicodeCharacter{00F5}{\~o}% -+ \DeclareUnicodeCharacter{00F6}{\"o}% -+ \DeclareUnicodeCharacter{00F7}{\ensuremath\div}% -+ \DeclareUnicodeCharacter{00F8}{\o}% -+ \DeclareUnicodeCharacter{00F9}{\`u}% -+ \DeclareUnicodeCharacter{00FA}{\'u}% -+ \DeclareUnicodeCharacter{00FB}{\^u}% -+ \DeclareUnicodeCharacter{00FC}{\"u}% -+ \DeclareUnicodeCharacter{00FD}{\'y}% -+ \DeclareUnicodeCharacter{00FE}{\th}% -+ \DeclareUnicodeCharacter{00FF}{\"y}% -+ % -+ \DeclareUnicodeCharacter{0100}{\=A}% -+ \DeclareUnicodeCharacter{0101}{\=a}% -+ \DeclareUnicodeCharacter{0102}{\u{A}}% -+ \DeclareUnicodeCharacter{0103}{\u{a}}% -+ \DeclareUnicodeCharacter{0104}{\ogonek{A}}% -+ \DeclareUnicodeCharacter{0105}{\ogonek{a}}% -+ \DeclareUnicodeCharacter{0106}{\'C}% -+ \DeclareUnicodeCharacter{0107}{\'c}% -+ \DeclareUnicodeCharacter{0108}{\^C}% -+ \DeclareUnicodeCharacter{0109}{\^c}% -+ \DeclareUnicodeCharacter{010A}{\dotaccent{C}}% -+ \DeclareUnicodeCharacter{010B}{\dotaccent{c}}% -+ \DeclareUnicodeCharacter{010C}{\v{C}}% -+ \DeclareUnicodeCharacter{010D}{\v{c}}% -+ \DeclareUnicodeCharacter{010E}{\v{D}}% -+ \DeclareUnicodeCharacter{010F}{d'}% -+ % -+ \DeclareUnicodeCharacter{0110}{\DH}% -+ \DeclareUnicodeCharacter{0111}{\dh}% -+ \DeclareUnicodeCharacter{0112}{\=E}% -+ \DeclareUnicodeCharacter{0113}{\=e}% -+ \DeclareUnicodeCharacter{0114}{\u{E}}% -+ \DeclareUnicodeCharacter{0115}{\u{e}}% -+ \DeclareUnicodeCharacter{0116}{\dotaccent{E}}% -+ \DeclareUnicodeCharacter{0117}{\dotaccent{e}}% -+ \DeclareUnicodeCharacter{0118}{\ogonek{E}}% -+ \DeclareUnicodeCharacter{0119}{\ogonek{e}}% -+ \DeclareUnicodeCharacter{011A}{\v{E}}% -+ \DeclareUnicodeCharacter{011B}{\v{e}}% -+ \DeclareUnicodeCharacter{011C}{\^G}% -+ \DeclareUnicodeCharacter{011D}{\^g}% -+ \DeclareUnicodeCharacter{011E}{\u{G}}% -+ \DeclareUnicodeCharacter{011F}{\u{g}}% -+ % -+ \DeclareUnicodeCharacter{0120}{\dotaccent{G}}% -+ \DeclareUnicodeCharacter{0121}{\dotaccent{g}}% -+ \DeclareUnicodeCharacter{0122}{\cedilla{G}}% -+ \DeclareUnicodeCharacter{0123}{\cedilla{g}}% -+ \DeclareUnicodeCharacter{0124}{\^H}% -+ \DeclareUnicodeCharacter{0125}{\^h}% -+ \DeclareUnicodeCharacter{0126}{\missingcharmsg{H WITH STROKE}}% -+ \DeclareUnicodeCharacter{0127}{\missingcharmsg{h WITH STROKE}}% -+ \DeclareUnicodeCharacter{0128}{\~I}% -+ \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}}% -+ \DeclareUnicodeCharacter{012A}{\=I}% -+ \DeclareUnicodeCharacter{012B}{\={\dotless{i}}}% -+ \DeclareUnicodeCharacter{012C}{\u{I}}% -+ \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}}% -+ \DeclareUnicodeCharacter{012E}{\ogonek{I}}% -+ \DeclareUnicodeCharacter{012F}{\ogonek{i}}% -+ % -+ \DeclareUnicodeCharacter{0130}{\dotaccent{I}}% -+ \DeclareUnicodeCharacter{0131}{\dotless{i}}% -+ \DeclareUnicodeCharacter{0132}{IJ}% -+ \DeclareUnicodeCharacter{0133}{ij}% -+ \DeclareUnicodeCharacter{0134}{\^J}% -+ \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}}% -+ \DeclareUnicodeCharacter{0136}{\cedilla{K}}% -+ \DeclareUnicodeCharacter{0137}{\cedilla{k}}% -+ \DeclareUnicodeCharacter{0138}{\ensuremath\kappa}% -+ \DeclareUnicodeCharacter{0139}{\'L}% -+ \DeclareUnicodeCharacter{013A}{\'l}% -+ \DeclareUnicodeCharacter{013B}{\cedilla{L}}% -+ \DeclareUnicodeCharacter{013C}{\cedilla{l}}% - \DeclareUnicodeCharacter{013D}{L'}% should kern - \DeclareUnicodeCharacter{013E}{l'}% should kern -- \DeclareUnicodeCharacter{013F}{L\U{00B7}} -- -- \DeclareUnicodeCharacter{0140}{l\U{00B7}} -- \DeclareUnicodeCharacter{0141}{\L} -- \DeclareUnicodeCharacter{0142}{\l} -- \DeclareUnicodeCharacter{0143}{\'N} -- \DeclareUnicodeCharacter{0144}{\'n} -- \DeclareUnicodeCharacter{0145}{\cedilla{N}} -- \DeclareUnicodeCharacter{0146}{\cedilla{n}} -- \DeclareUnicodeCharacter{0147}{\v{N}} -- \DeclareUnicodeCharacter{0148}{\v{n}} -- \DeclareUnicodeCharacter{0149}{'n} -- \DeclareUnicodeCharacter{014A}{\missingcharmsg{ENG}} -- \DeclareUnicodeCharacter{014B}{\missingcharmsg{eng}} -- \DeclareUnicodeCharacter{014C}{\=O} -- \DeclareUnicodeCharacter{014D}{\=o} -- \DeclareUnicodeCharacter{014E}{\u{O}} -- \DeclareUnicodeCharacter{014F}{\u{o}} -- -- \DeclareUnicodeCharacter{0150}{\H{O}} -- \DeclareUnicodeCharacter{0151}{\H{o}} -- \DeclareUnicodeCharacter{0152}{\OE} -- \DeclareUnicodeCharacter{0153}{\oe} -- \DeclareUnicodeCharacter{0154}{\'R} -- \DeclareUnicodeCharacter{0155}{\'r} -- \DeclareUnicodeCharacter{0156}{\cedilla{R}} -- \DeclareUnicodeCharacter{0157}{\cedilla{r}} -- \DeclareUnicodeCharacter{0158}{\v{R}} -- \DeclareUnicodeCharacter{0159}{\v{r}} -- \DeclareUnicodeCharacter{015A}{\'S} -- \DeclareUnicodeCharacter{015B}{\'s} -- \DeclareUnicodeCharacter{015C}{\^S} -- \DeclareUnicodeCharacter{015D}{\^s} -- \DeclareUnicodeCharacter{015E}{\cedilla{S}} -- \DeclareUnicodeCharacter{015F}{\cedilla{s}} -- -- \DeclareUnicodeCharacter{0160}{\v{S}} -- \DeclareUnicodeCharacter{0161}{\v{s}} -- \DeclareUnicodeCharacter{0162}{\cedilla{T}} -- \DeclareUnicodeCharacter{0163}{\cedilla{t}} -- \DeclareUnicodeCharacter{0164}{\v{T}} -- \DeclareUnicodeCharacter{0165}{\v{t}} -- \DeclareUnicodeCharacter{0166}{\missingcharmsg{H WITH STROKE}} -- \DeclareUnicodeCharacter{0167}{\missingcharmsg{h WITH STROKE}} -- \DeclareUnicodeCharacter{0168}{\~U} -- \DeclareUnicodeCharacter{0169}{\~u} -- \DeclareUnicodeCharacter{016A}{\=U} -- \DeclareUnicodeCharacter{016B}{\=u} -- \DeclareUnicodeCharacter{016C}{\u{U}} -- \DeclareUnicodeCharacter{016D}{\u{u}} -- \DeclareUnicodeCharacter{016E}{\ringaccent{U}} -- \DeclareUnicodeCharacter{016F}{\ringaccent{u}} -- -- \DeclareUnicodeCharacter{0170}{\H{U}} -- \DeclareUnicodeCharacter{0171}{\H{u}} -- \DeclareUnicodeCharacter{0172}{\ogonek{U}} -- \DeclareUnicodeCharacter{0173}{\ogonek{u}} -- \DeclareUnicodeCharacter{0174}{\^W} -- \DeclareUnicodeCharacter{0175}{\^w} -- \DeclareUnicodeCharacter{0176}{\^Y} -- \DeclareUnicodeCharacter{0177}{\^y} -- \DeclareUnicodeCharacter{0178}{\"Y} -- \DeclareUnicodeCharacter{0179}{\'Z} -- \DeclareUnicodeCharacter{017A}{\'z} -- \DeclareUnicodeCharacter{017B}{\dotaccent{Z}} -- \DeclareUnicodeCharacter{017C}{\dotaccent{z}} -- \DeclareUnicodeCharacter{017D}{\v{Z}} -- \DeclareUnicodeCharacter{017E}{\v{z}} -- \DeclareUnicodeCharacter{017F}{\missingcharmsg{LONG S}} -- -- \DeclareUnicodeCharacter{01C4}{D\v{Z}} -- \DeclareUnicodeCharacter{01C5}{D\v{z}} -- \DeclareUnicodeCharacter{01C6}{d\v{z}} -- \DeclareUnicodeCharacter{01C7}{LJ} -- \DeclareUnicodeCharacter{01C8}{Lj} -- \DeclareUnicodeCharacter{01C9}{lj} -- \DeclareUnicodeCharacter{01CA}{NJ} -- \DeclareUnicodeCharacter{01CB}{Nj} -- \DeclareUnicodeCharacter{01CC}{nj} -- \DeclareUnicodeCharacter{01CD}{\v{A}} -- \DeclareUnicodeCharacter{01CE}{\v{a}} -- \DeclareUnicodeCharacter{01CF}{\v{I}} -- -- \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}} -- \DeclareUnicodeCharacter{01D1}{\v{O}} -- \DeclareUnicodeCharacter{01D2}{\v{o}} -- \DeclareUnicodeCharacter{01D3}{\v{U}} -- \DeclareUnicodeCharacter{01D4}{\v{u}} -- -- \DeclareUnicodeCharacter{01E2}{\={\AE}} -- \DeclareUnicodeCharacter{01E3}{\={\ae}} -- \DeclareUnicodeCharacter{01E6}{\v{G}} -- \DeclareUnicodeCharacter{01E7}{\v{g}} -- \DeclareUnicodeCharacter{01E8}{\v{K}} -- \DeclareUnicodeCharacter{01E9}{\v{k}} -- -- \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}} -- \DeclareUnicodeCharacter{01F1}{DZ} -- \DeclareUnicodeCharacter{01F2}{Dz} -- \DeclareUnicodeCharacter{01F3}{dz} -- \DeclareUnicodeCharacter{01F4}{\'G} -- \DeclareUnicodeCharacter{01F5}{\'g} -- \DeclareUnicodeCharacter{01F8}{\`N} -- \DeclareUnicodeCharacter{01F9}{\`n} -- \DeclareUnicodeCharacter{01FC}{\'{\AE}} -- \DeclareUnicodeCharacter{01FD}{\'{\ae}} -- \DeclareUnicodeCharacter{01FE}{\'{\O}} -- \DeclareUnicodeCharacter{01FF}{\'{\o}} -- -- \DeclareUnicodeCharacter{021E}{\v{H}} -- \DeclareUnicodeCharacter{021F}{\v{h}} -- -- \DeclareUnicodeCharacter{0226}{\dotaccent{A}} -- \DeclareUnicodeCharacter{0227}{\dotaccent{a}} -- \DeclareUnicodeCharacter{0228}{\cedilla{E}} -- \DeclareUnicodeCharacter{0229}{\cedilla{e}} -- \DeclareUnicodeCharacter{022E}{\dotaccent{O}} -- \DeclareUnicodeCharacter{022F}{\dotaccent{o}} -- -- \DeclareUnicodeCharacter{0232}{\=Y} -- \DeclareUnicodeCharacter{0233}{\=y} -- \DeclareUnicodeCharacter{0237}{\dotless{j}} -- -- \DeclareUnicodeCharacter{02DB}{\ogonek{ }} -- -- \DeclareUnicodeCharacter{1E02}{\dotaccent{B}} -- \DeclareUnicodeCharacter{1E03}{\dotaccent{b}} -- \DeclareUnicodeCharacter{1E04}{\udotaccent{B}} -- \DeclareUnicodeCharacter{1E05}{\udotaccent{b}} -- \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}} -- \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}} -- \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}} -- \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}} -- \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}} -- \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}} -- \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}} -- \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}} -- -- \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}} -- \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}} -- -- \DeclareUnicodeCharacter{1E20}{\=G} -- \DeclareUnicodeCharacter{1E21}{\=g} -- \DeclareUnicodeCharacter{1E22}{\dotaccent{H}} -- \DeclareUnicodeCharacter{1E23}{\dotaccent{h}} -- \DeclareUnicodeCharacter{1E24}{\udotaccent{H}} -- \DeclareUnicodeCharacter{1E25}{\udotaccent{h}} -- \DeclareUnicodeCharacter{1E26}{\"H} -- \DeclareUnicodeCharacter{1E27}{\"h} -- -- \DeclareUnicodeCharacter{1E30}{\'K} -- \DeclareUnicodeCharacter{1E31}{\'k} -- \DeclareUnicodeCharacter{1E32}{\udotaccent{K}} -- \DeclareUnicodeCharacter{1E33}{\udotaccent{k}} -- \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}} -- \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}} -- \DeclareUnicodeCharacter{1E36}{\udotaccent{L}} -- \DeclareUnicodeCharacter{1E37}{\udotaccent{l}} -- \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}} -- \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}} -- \DeclareUnicodeCharacter{1E3E}{\'M} -- \DeclareUnicodeCharacter{1E3F}{\'m} -- -- \DeclareUnicodeCharacter{1E40}{\dotaccent{M}} -- \DeclareUnicodeCharacter{1E41}{\dotaccent{m}} -- \DeclareUnicodeCharacter{1E42}{\udotaccent{M}} -- \DeclareUnicodeCharacter{1E43}{\udotaccent{m}} -- \DeclareUnicodeCharacter{1E44}{\dotaccent{N}} -- \DeclareUnicodeCharacter{1E45}{\dotaccent{n}} -- \DeclareUnicodeCharacter{1E46}{\udotaccent{N}} -- \DeclareUnicodeCharacter{1E47}{\udotaccent{n}} -- \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}} -- \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}} -- -- \DeclareUnicodeCharacter{1E54}{\'P} -- \DeclareUnicodeCharacter{1E55}{\'p} -- \DeclareUnicodeCharacter{1E56}{\dotaccent{P}} -- \DeclareUnicodeCharacter{1E57}{\dotaccent{p}} -- \DeclareUnicodeCharacter{1E58}{\dotaccent{R}} -- \DeclareUnicodeCharacter{1E59}{\dotaccent{r}} -- \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}} -- \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}} -- \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}} -- \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}} -- -- \DeclareUnicodeCharacter{1E60}{\dotaccent{S}} -- \DeclareUnicodeCharacter{1E61}{\dotaccent{s}} -- \DeclareUnicodeCharacter{1E62}{\udotaccent{S}} -- \DeclareUnicodeCharacter{1E63}{\udotaccent{s}} -- \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}} -- \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}} -- \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}} -- \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}} -- \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}} -- \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}} -- -- \DeclareUnicodeCharacter{1E7C}{\~V} -- \DeclareUnicodeCharacter{1E7D}{\~v} -- \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}} -- \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}} -- -- \DeclareUnicodeCharacter{1E80}{\`W} -- \DeclareUnicodeCharacter{1E81}{\`w} -- \DeclareUnicodeCharacter{1E82}{\'W} -- \DeclareUnicodeCharacter{1E83}{\'w} -- \DeclareUnicodeCharacter{1E84}{\"W} -- \DeclareUnicodeCharacter{1E85}{\"w} -- \DeclareUnicodeCharacter{1E86}{\dotaccent{W}} -- \DeclareUnicodeCharacter{1E87}{\dotaccent{w}} -- \DeclareUnicodeCharacter{1E88}{\udotaccent{W}} -- \DeclareUnicodeCharacter{1E89}{\udotaccent{w}} -- \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}} -- \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}} -- \DeclareUnicodeCharacter{1E8C}{\"X} -- \DeclareUnicodeCharacter{1E8D}{\"x} -- \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}} -- \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}} -- -- \DeclareUnicodeCharacter{1E90}{\^Z} -- \DeclareUnicodeCharacter{1E91}{\^z} -- \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}} -- \DeclareUnicodeCharacter{1E93}{\udotaccent{z}} -- \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}} -- \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}} -- \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}} -- \DeclareUnicodeCharacter{1E97}{\"t} -- \DeclareUnicodeCharacter{1E98}{\ringaccent{w}} -- \DeclareUnicodeCharacter{1E99}{\ringaccent{y}} -- -- \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}} -- \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}} -- -- \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}} -- \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}} -- \DeclareUnicodeCharacter{1EBC}{\~E} -- \DeclareUnicodeCharacter{1EBD}{\~e} -- -- \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}} -- \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}} -- \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}} -- \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}} -+ \DeclareUnicodeCharacter{013F}{L\U{00B7}}% -+ % -+ \DeclareUnicodeCharacter{0140}{l\U{00B7}}% -+ \DeclareUnicodeCharacter{0141}{\L}% -+ \DeclareUnicodeCharacter{0142}{\l}% -+ \DeclareUnicodeCharacter{0143}{\'N}% -+ \DeclareUnicodeCharacter{0144}{\'n}% -+ \DeclareUnicodeCharacter{0145}{\cedilla{N}}% -+ \DeclareUnicodeCharacter{0146}{\cedilla{n}}% -+ \DeclareUnicodeCharacter{0147}{\v{N}}% -+ \DeclareUnicodeCharacter{0148}{\v{n}}% -+ \DeclareUnicodeCharacter{0149}{'n}% -+ \DeclareUnicodeCharacter{014A}{\missingcharmsg{ENG}}% -+ \DeclareUnicodeCharacter{014B}{\missingcharmsg{eng}}% -+ \DeclareUnicodeCharacter{014C}{\=O}% -+ \DeclareUnicodeCharacter{014D}{\=o}% -+ \DeclareUnicodeCharacter{014E}{\u{O}}% -+ \DeclareUnicodeCharacter{014F}{\u{o}}% -+ % -+ \DeclareUnicodeCharacter{0150}{\H{O}}% -+ \DeclareUnicodeCharacter{0151}{\H{o}}% -+ \DeclareUnicodeCharacter{0152}{\OE}% -+ \DeclareUnicodeCharacter{0153}{\oe}% -+ \DeclareUnicodeCharacter{0154}{\'R}% -+ \DeclareUnicodeCharacter{0155}{\'r}% -+ \DeclareUnicodeCharacter{0156}{\cedilla{R}}% -+ \DeclareUnicodeCharacter{0157}{\cedilla{r}}% -+ \DeclareUnicodeCharacter{0158}{\v{R}}% -+ \DeclareUnicodeCharacter{0159}{\v{r}}% -+ \DeclareUnicodeCharacter{015A}{\'S}% -+ \DeclareUnicodeCharacter{015B}{\'s}% -+ \DeclareUnicodeCharacter{015C}{\^S}% -+ \DeclareUnicodeCharacter{015D}{\^s}% -+ \DeclareUnicodeCharacter{015E}{\cedilla{S}}% -+ \DeclareUnicodeCharacter{015F}{\cedilla{s}}% -+ % -+ \DeclareUnicodeCharacter{0160}{\v{S}}% -+ \DeclareUnicodeCharacter{0161}{\v{s}}% -+ \DeclareUnicodeCharacter{0162}{\cedilla{T}}% -+ \DeclareUnicodeCharacter{0163}{\cedilla{t}}% -+ \DeclareUnicodeCharacter{0164}{\v{T}}% -+ \DeclareUnicodeCharacter{0165}{\v{t}}% -+ \DeclareUnicodeCharacter{0166}{\missingcharmsg{H WITH STROKE}}% -+ \DeclareUnicodeCharacter{0167}{\missingcharmsg{h WITH STROKE}}% -+ \DeclareUnicodeCharacter{0168}{\~U}% -+ \DeclareUnicodeCharacter{0169}{\~u}% -+ \DeclareUnicodeCharacter{016A}{\=U}% -+ \DeclareUnicodeCharacter{016B}{\=u}% -+ \DeclareUnicodeCharacter{016C}{\u{U}}% -+ \DeclareUnicodeCharacter{016D}{\u{u}}% -+ \DeclareUnicodeCharacter{016E}{\ringaccent{U}}% -+ \DeclareUnicodeCharacter{016F}{\ringaccent{u}}% -+ % -+ \DeclareUnicodeCharacter{0170}{\H{U}}% -+ \DeclareUnicodeCharacter{0171}{\H{u}}% -+ \DeclareUnicodeCharacter{0172}{\ogonek{U}}% -+ \DeclareUnicodeCharacter{0173}{\ogonek{u}}% -+ \DeclareUnicodeCharacter{0174}{\^W}% -+ \DeclareUnicodeCharacter{0175}{\^w}% -+ \DeclareUnicodeCharacter{0176}{\^Y}% -+ \DeclareUnicodeCharacter{0177}{\^y}% -+ \DeclareUnicodeCharacter{0178}{\"Y}% -+ \DeclareUnicodeCharacter{0179}{\'Z}% -+ \DeclareUnicodeCharacter{017A}{\'z}% -+ \DeclareUnicodeCharacter{017B}{\dotaccent{Z}}% -+ \DeclareUnicodeCharacter{017C}{\dotaccent{z}}% -+ \DeclareUnicodeCharacter{017D}{\v{Z}}% -+ \DeclareUnicodeCharacter{017E}{\v{z}}% -+ \DeclareUnicodeCharacter{017F}{\missingcharmsg{LONG S}}% -+ % -+ \DeclareUnicodeCharacter{01C4}{D\v{Z}}% -+ \DeclareUnicodeCharacter{01C5}{D\v{z}}% -+ \DeclareUnicodeCharacter{01C6}{d\v{z}}% -+ \DeclareUnicodeCharacter{01C7}{LJ}% -+ \DeclareUnicodeCharacter{01C8}{Lj}% -+ \DeclareUnicodeCharacter{01C9}{lj}% -+ \DeclareUnicodeCharacter{01CA}{NJ}% -+ \DeclareUnicodeCharacter{01CB}{Nj}% -+ \DeclareUnicodeCharacter{01CC}{nj}% -+ \DeclareUnicodeCharacter{01CD}{\v{A}}% -+ \DeclareUnicodeCharacter{01CE}{\v{a}}% -+ \DeclareUnicodeCharacter{01CF}{\v{I}}% -+ % -+ \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}}% -+ \DeclareUnicodeCharacter{01D1}{\v{O}}% -+ \DeclareUnicodeCharacter{01D2}{\v{o}}% -+ \DeclareUnicodeCharacter{01D3}{\v{U}}% -+ \DeclareUnicodeCharacter{01D4}{\v{u}}% -+ % -+ \DeclareUnicodeCharacter{01E2}{\={\AE}}% -+ \DeclareUnicodeCharacter{01E3}{\={\ae}}% -+ \DeclareUnicodeCharacter{01E6}{\v{G}}% -+ \DeclareUnicodeCharacter{01E7}{\v{g}}% -+ \DeclareUnicodeCharacter{01E8}{\v{K}}% -+ \DeclareUnicodeCharacter{01E9}{\v{k}}% -+ % -+ \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}}% -+ \DeclareUnicodeCharacter{01F1}{DZ}% -+ \DeclareUnicodeCharacter{01F2}{Dz}% -+ \DeclareUnicodeCharacter{01F3}{dz}% -+ \DeclareUnicodeCharacter{01F4}{\'G}% -+ \DeclareUnicodeCharacter{01F5}{\'g}% -+ \DeclareUnicodeCharacter{01F8}{\`N}% -+ \DeclareUnicodeCharacter{01F9}{\`n}% -+ \DeclareUnicodeCharacter{01FC}{\'{\AE}}% -+ \DeclareUnicodeCharacter{01FD}{\'{\ae}}% -+ \DeclareUnicodeCharacter{01FE}{\'{\O}}% -+ \DeclareUnicodeCharacter{01FF}{\'{\o}}% -+ % -+ \DeclareUnicodeCharacter{021E}{\v{H}}% -+ \DeclareUnicodeCharacter{021F}{\v{h}}% -+ % -+ \DeclareUnicodeCharacter{0226}{\dotaccent{A}}% -+ \DeclareUnicodeCharacter{0227}{\dotaccent{a}}% -+ \DeclareUnicodeCharacter{0228}{\cedilla{E}}% -+ \DeclareUnicodeCharacter{0229}{\cedilla{e}}% -+ \DeclareUnicodeCharacter{022E}{\dotaccent{O}}% -+ \DeclareUnicodeCharacter{022F}{\dotaccent{o}}% -+ % -+ \DeclareUnicodeCharacter{0232}{\=Y}% -+ \DeclareUnicodeCharacter{0233}{\=y}% -+ \DeclareUnicodeCharacter{0237}{\dotless{j}}% -+ % -+ \DeclareUnicodeCharacter{02DB}{\ogonek{ }}% -+ % -+ % Greek letters upper case -+ \DeclareUnicodeCharacter{0391}{{\it A}}% -+ \DeclareUnicodeCharacter{0392}{{\it B}}% -+ \DeclareUnicodeCharacter{0393}{\ensuremath{\mit\Gamma}}% -+ \DeclareUnicodeCharacter{0394}{\ensuremath{\mit\Delta}}% -+ \DeclareUnicodeCharacter{0395}{{\it E}}% -+ \DeclareUnicodeCharacter{0396}{{\it Z}}% -+ \DeclareUnicodeCharacter{0397}{{\it H}}% -+ \DeclareUnicodeCharacter{0398}{\ensuremath{\mit\Theta}}% -+ \DeclareUnicodeCharacter{0399}{{\it I}}% -+ \DeclareUnicodeCharacter{039A}{{\it K}}% -+ \DeclareUnicodeCharacter{039B}{\ensuremath{\mit\Lambda}}% -+ \DeclareUnicodeCharacter{039C}{{\it M}}% -+ \DeclareUnicodeCharacter{039D}{{\it N}}% -+ \DeclareUnicodeCharacter{039E}{\ensuremath{\mit\Xi}}% -+ \DeclareUnicodeCharacter{039F}{{\it O}}% -+ \DeclareUnicodeCharacter{03A0}{\ensuremath{\mit\Pi}}% -+ \DeclareUnicodeCharacter{03A1}{{\it P}}% -+ %\DeclareUnicodeCharacter{03A2}{} % none - corresponds to final sigma -+ \DeclareUnicodeCharacter{03A3}{\ensuremath{\mit\Sigma}}% -+ \DeclareUnicodeCharacter{03A4}{{\it T}}% -+ \DeclareUnicodeCharacter{03A5}{\ensuremath{\mit\Upsilon}}% -+ \DeclareUnicodeCharacter{03A6}{\ensuremath{\mit\Phi}}% -+ \DeclareUnicodeCharacter{03A7}{{\it X}}% -+ \DeclareUnicodeCharacter{03A8}{\ensuremath{\mit\Psi}}% -+ \DeclareUnicodeCharacter{03A9}{\ensuremath{\mit\Omega}}% -+ % -+ % Vowels with accents -+ \DeclareUnicodeCharacter{0390}{\ensuremath{\ddot{\acute\iota}}}% -+ \DeclareUnicodeCharacter{03AC}{\ensuremath{\acute\alpha}}% -+ \DeclareUnicodeCharacter{03AD}{\ensuremath{\acute\epsilon}}% -+ \DeclareUnicodeCharacter{03AE}{\ensuremath{\acute\eta}}% -+ \DeclareUnicodeCharacter{03AF}{\ensuremath{\acute\iota}}% -+ \DeclareUnicodeCharacter{03B0}{\ensuremath{\acute{\ddot\upsilon}}}% -+ % -+ % Standalone accent -+ \DeclareUnicodeCharacter{0384}{\ensuremath{\acute{\ }}}% -+ % -+ % Greek letters lower case -+ \DeclareUnicodeCharacter{03B1}{\ensuremath\alpha}% -+ \DeclareUnicodeCharacter{03B2}{\ensuremath\beta}% -+ \DeclareUnicodeCharacter{03B3}{\ensuremath\gamma}% -+ \DeclareUnicodeCharacter{03B4}{\ensuremath\delta}% -+ \DeclareUnicodeCharacter{03B5}{\ensuremath\epsilon}% -+ \DeclareUnicodeCharacter{03B6}{\ensuremath\zeta}% -+ \DeclareUnicodeCharacter{03B7}{\ensuremath\eta}% -+ \DeclareUnicodeCharacter{03B8}{\ensuremath\theta}% -+ \DeclareUnicodeCharacter{03B9}{\ensuremath\iota}% -+ \DeclareUnicodeCharacter{03BA}{\ensuremath\kappa}% -+ \DeclareUnicodeCharacter{03BB}{\ensuremath\lambda}% -+ \DeclareUnicodeCharacter{03BC}{\ensuremath\mu}% -+ \DeclareUnicodeCharacter{03BD}{\ensuremath\nu}% -+ \DeclareUnicodeCharacter{03BE}{\ensuremath\xi}% -+ \DeclareUnicodeCharacter{03BF}{{\it o}}% omicron -+ \DeclareUnicodeCharacter{03C0}{\ensuremath\pi}% -+ \DeclareUnicodeCharacter{03C1}{\ensuremath\rho}% -+ \DeclareUnicodeCharacter{03C2}{\ensuremath\varsigma}% -+ \DeclareUnicodeCharacter{03C3}{\ensuremath\sigma}% -+ \DeclareUnicodeCharacter{03C4}{\ensuremath\tau}% -+ \DeclareUnicodeCharacter{03C5}{\ensuremath\upsilon}% -+ \DeclareUnicodeCharacter{03C6}{\ensuremath\phi}% -+ \DeclareUnicodeCharacter{03C7}{\ensuremath\chi}% -+ \DeclareUnicodeCharacter{03C8}{\ensuremath\psi}% -+ \DeclareUnicodeCharacter{03C9}{\ensuremath\omega}% -+ % -+ % More Greek vowels with accents -+ \DeclareUnicodeCharacter{03CA}{\ensuremath{\ddot\iota}}% -+ \DeclareUnicodeCharacter{03CB}{\ensuremath{\ddot\upsilon}}% -+ \DeclareUnicodeCharacter{03CC}{\ensuremath{\acute o}}% -+ \DeclareUnicodeCharacter{03CD}{\ensuremath{\acute\upsilon}}% -+ \DeclareUnicodeCharacter{03CE}{\ensuremath{\acute\omega}}% -+ % -+ % Variant Greek letters -+ \DeclareUnicodeCharacter{03D1}{\ensuremath\vartheta}% -+ \DeclareUnicodeCharacter{03D6}{\ensuremath\varpi}% -+ \DeclareUnicodeCharacter{03F1}{\ensuremath\varrho}% -+ % -+ \DeclareUnicodeCharacter{1E02}{\dotaccent{B}}% -+ \DeclareUnicodeCharacter{1E03}{\dotaccent{b}}% -+ \DeclareUnicodeCharacter{1E04}{\udotaccent{B}}% -+ \DeclareUnicodeCharacter{1E05}{\udotaccent{b}}% -+ \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}}% -+ \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}}% -+ \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}}% -+ \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}}% -+ \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}}% -+ \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}}% -+ \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}}% -+ \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}}% -+ % -+ \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}}% -+ \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}}% -+ % -+ \DeclareUnicodeCharacter{1E20}{\=G}% -+ \DeclareUnicodeCharacter{1E21}{\=g}% -+ \DeclareUnicodeCharacter{1E22}{\dotaccent{H}}% -+ \DeclareUnicodeCharacter{1E23}{\dotaccent{h}}% -+ \DeclareUnicodeCharacter{1E24}{\udotaccent{H}}% -+ \DeclareUnicodeCharacter{1E25}{\udotaccent{h}}% -+ \DeclareUnicodeCharacter{1E26}{\"H}% -+ \DeclareUnicodeCharacter{1E27}{\"h}% -+ % -+ \DeclareUnicodeCharacter{1E30}{\'K}% -+ \DeclareUnicodeCharacter{1E31}{\'k}% -+ \DeclareUnicodeCharacter{1E32}{\udotaccent{K}}% -+ \DeclareUnicodeCharacter{1E33}{\udotaccent{k}}% -+ \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}}% -+ \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}}% -+ \DeclareUnicodeCharacter{1E36}{\udotaccent{L}}% -+ \DeclareUnicodeCharacter{1E37}{\udotaccent{l}}% -+ \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}}% -+ \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}}% -+ \DeclareUnicodeCharacter{1E3E}{\'M}% -+ \DeclareUnicodeCharacter{1E3F}{\'m}% -+ % -+ \DeclareUnicodeCharacter{1E40}{\dotaccent{M}}% -+ \DeclareUnicodeCharacter{1E41}{\dotaccent{m}}% -+ \DeclareUnicodeCharacter{1E42}{\udotaccent{M}}% -+ \DeclareUnicodeCharacter{1E43}{\udotaccent{m}}% -+ \DeclareUnicodeCharacter{1E44}{\dotaccent{N}}% -+ \DeclareUnicodeCharacter{1E45}{\dotaccent{n}}% -+ \DeclareUnicodeCharacter{1E46}{\udotaccent{N}}% -+ \DeclareUnicodeCharacter{1E47}{\udotaccent{n}}% -+ \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}}% -+ \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}}% -+ % -+ \DeclareUnicodeCharacter{1E54}{\'P}% -+ \DeclareUnicodeCharacter{1E55}{\'p}% -+ \DeclareUnicodeCharacter{1E56}{\dotaccent{P}}% -+ \DeclareUnicodeCharacter{1E57}{\dotaccent{p}}% -+ \DeclareUnicodeCharacter{1E58}{\dotaccent{R}}% -+ \DeclareUnicodeCharacter{1E59}{\dotaccent{r}}% -+ \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}}% -+ \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}}% -+ \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}}% -+ \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}}% -+ % -+ \DeclareUnicodeCharacter{1E60}{\dotaccent{S}}% -+ \DeclareUnicodeCharacter{1E61}{\dotaccent{s}}% -+ \DeclareUnicodeCharacter{1E62}{\udotaccent{S}}% -+ \DeclareUnicodeCharacter{1E63}{\udotaccent{s}}% -+ \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}}% -+ \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}}% -+ \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}}% -+ \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}}% -+ \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}}% -+ \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}}% -+ % -+ \DeclareUnicodeCharacter{1E7C}{\~V}% -+ \DeclareUnicodeCharacter{1E7D}{\~v}% -+ \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}}% -+ \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}}% -+ % -+ \DeclareUnicodeCharacter{1E80}{\`W}% -+ \DeclareUnicodeCharacter{1E81}{\`w}% -+ \DeclareUnicodeCharacter{1E82}{\'W}% -+ \DeclareUnicodeCharacter{1E83}{\'w}% -+ \DeclareUnicodeCharacter{1E84}{\"W}% -+ \DeclareUnicodeCharacter{1E85}{\"w}% -+ \DeclareUnicodeCharacter{1E86}{\dotaccent{W}}% -+ \DeclareUnicodeCharacter{1E87}{\dotaccent{w}}% -+ \DeclareUnicodeCharacter{1E88}{\udotaccent{W}}% -+ \DeclareUnicodeCharacter{1E89}{\udotaccent{w}}% -+ \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}}% -+ \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}}% -+ \DeclareUnicodeCharacter{1E8C}{\"X}% -+ \DeclareUnicodeCharacter{1E8D}{\"x}% -+ \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}}% -+ \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}}% -+ % -+ \DeclareUnicodeCharacter{1E90}{\^Z}% -+ \DeclareUnicodeCharacter{1E91}{\^z}% -+ \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}}% -+ \DeclareUnicodeCharacter{1E93}{\udotaccent{z}}% -+ \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}}% -+ \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}}% -+ \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}}% -+ \DeclareUnicodeCharacter{1E97}{\"t}% -+ \DeclareUnicodeCharacter{1E98}{\ringaccent{w}}% -+ \DeclareUnicodeCharacter{1E99}{\ringaccent{y}}% -+ % -+ \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}}% -+ \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}}% -+ % -+ \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}}% -+ \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}}% -+ \DeclareUnicodeCharacter{1EBC}{\~E}% -+ \DeclareUnicodeCharacter{1EBD}{\~e}% -+ % -+ \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}}% -+ \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}}% -+ \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}}% -+ \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}}% -+ % -+ \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}}% -+ \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}}% -+ % -+ \DeclareUnicodeCharacter{1EF2}{\`Y}% -+ \DeclareUnicodeCharacter{1EF3}{\`y}% -+ \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}}% -+ % -+ \DeclareUnicodeCharacter{1EF8}{\~Y}% -+ \DeclareUnicodeCharacter{1EF9}{\~y}% -+ % -+ % Punctuation -+ \DeclareUnicodeCharacter{2013}{--}% -+ \DeclareUnicodeCharacter{2014}{---}% -+ \DeclareUnicodeCharacter{2018}{\quoteleft{}}% -+ \DeclareUnicodeCharacter{2019}{\quoteright{}}% -+ \DeclareUnicodeCharacter{201A}{\quotesinglbase{}}% -+ \DeclareUnicodeCharacter{201C}{\quotedblleft{}}% -+ \DeclareUnicodeCharacter{201D}{\quotedblright{}}% -+ \DeclareUnicodeCharacter{201E}{\quotedblbase{}}% -+ \DeclareUnicodeCharacter{2020}{\ensuremath\dagger}% -+ \DeclareUnicodeCharacter{2021}{\ensuremath\ddagger}% -+ \DeclareUnicodeCharacter{2022}{\bullet{}}% -+ \DeclareUnicodeCharacter{202F}{\thinspace}% -+ \DeclareUnicodeCharacter{2026}{\dots{}}% -+ \DeclareUnicodeCharacter{2039}{\guilsinglleft{}}% -+ \DeclareUnicodeCharacter{203A}{\guilsinglright{}}% -+ % -+ \DeclareUnicodeCharacter{20AC}{\euro{}}% -+ % -+ \DeclareUnicodeCharacter{2192}{\expansion{}}% -+ \DeclareUnicodeCharacter{21D2}{\result{}}% -+ % -+ % Mathematical symbols -+ \DeclareUnicodeCharacter{2200}{\ensuremath\forall}% -+ \DeclareUnicodeCharacter{2203}{\ensuremath\exists}% -+ \DeclareUnicodeCharacter{2208}{\ensuremath\in}% -+ \DeclareUnicodeCharacter{2212}{\minus{}}% -+ \DeclareUnicodeCharacter{2217}{\ast}% -+ \DeclareUnicodeCharacter{221E}{\ensuremath\infty}% -+ \DeclareUnicodeCharacter{2225}{\ensuremath\parallel}% -+ \DeclareUnicodeCharacter{2227}{\ensuremath\wedge}% -+ \DeclareUnicodeCharacter{2229}{\ensuremath\cap}% -+ \DeclareUnicodeCharacter{2261}{\equiv{}}% -+ \DeclareUnicodeCharacter{2264}{\ensuremath\leq}% -+ \DeclareUnicodeCharacter{2265}{\ensuremath\geq}% -+ \DeclareUnicodeCharacter{2282}{\ensuremath\subset}% -+ \DeclareUnicodeCharacter{2287}{\ensuremath\supseteq}% -+ % -+ \DeclareUnicodeCharacter{2016}{\ensuremath\Vert}% -+ \DeclareUnicodeCharacter{2032}{\ensuremath\prime}% -+ \DeclareUnicodeCharacter{210F}{\ensuremath\hbar}% -+ \DeclareUnicodeCharacter{2111}{\ensuremath\Im}% -+ \DeclareUnicodeCharacter{2113}{\ensuremath\ell}% -+ \DeclareUnicodeCharacter{2118}{\ensuremath\wp}% -+ \DeclareUnicodeCharacter{211C}{\ensuremath\Re}% -+ \DeclareUnicodeCharacter{2127}{\ensuremath\mho}% -+ \DeclareUnicodeCharacter{2135}{\ensuremath\aleph}% -+ \DeclareUnicodeCharacter{2190}{\ensuremath\leftarrow}% -+ \DeclareUnicodeCharacter{2191}{\ensuremath\uparrow}% -+ \DeclareUnicodeCharacter{2193}{\ensuremath\downarrow}% -+ \DeclareUnicodeCharacter{2194}{\ensuremath\leftrightarrow}% -+ \DeclareUnicodeCharacter{2195}{\ensuremath\updownarrow}% -+ \DeclareUnicodeCharacter{2196}{\ensuremath\nwarrow}% -+ \DeclareUnicodeCharacter{2197}{\ensuremath\nearrow}% -+ \DeclareUnicodeCharacter{2198}{\ensuremath\searrow}% -+ \DeclareUnicodeCharacter{2199}{\ensuremath\swarrow}% -+ \DeclareUnicodeCharacter{21A6}{\ensuremath\mapsto}% -+ \DeclareUnicodeCharacter{21A9}{\ensuremath\hookleftarrow}% -+ \DeclareUnicodeCharacter{21AA}{\ensuremath\hookrightarrow}% -+ \DeclareUnicodeCharacter{21BC}{\ensuremath\leftharpoonup}% -+ \DeclareUnicodeCharacter{21BD}{\ensuremath\leftharpoondown}% -+ \DeclareUnicodeCharacter{21BE}{\ensuremath\upharpoonright}% -+ \DeclareUnicodeCharacter{21C0}{\ensuremath\rightharpoonup}% -+ \DeclareUnicodeCharacter{21C1}{\ensuremath\rightharpoondown}% -+ \DeclareUnicodeCharacter{21CC}{\ensuremath\rightleftharpoons}% -+ \DeclareUnicodeCharacter{21D0}{\ensuremath\Leftarrow}% -+ \DeclareUnicodeCharacter{21D1}{\ensuremath\Uparrow}% -+ \DeclareUnicodeCharacter{21D3}{\ensuremath\Downarrow}% -+ \DeclareUnicodeCharacter{21D4}{\ensuremath\Leftrightarrow}% -+ \DeclareUnicodeCharacter{21D5}{\ensuremath\Updownarrow}% -+ \DeclareUnicodeCharacter{21DD}{\ensuremath\leadsto}% -+ \DeclareUnicodeCharacter{2201}{\ensuremath\complement}% -+ \DeclareUnicodeCharacter{2202}{\ensuremath\partial}% -+ \DeclareUnicodeCharacter{2205}{\ensuremath\emptyset}% -+ \DeclareUnicodeCharacter{2207}{\ensuremath\nabla}% -+ \DeclareUnicodeCharacter{2209}{\ensuremath\notin}% -+ \DeclareUnicodeCharacter{220B}{\ensuremath\owns}% -+ \DeclareUnicodeCharacter{220F}{\ensuremath\prod}% -+ \DeclareUnicodeCharacter{2210}{\ensuremath\coprod}% -+ \DeclareUnicodeCharacter{2211}{\ensuremath\sum}% -+ \DeclareUnicodeCharacter{2213}{\ensuremath\mp}% -+ \DeclareUnicodeCharacter{2218}{\ensuremath\circ}% -+ \DeclareUnicodeCharacter{221A}{\ensuremath\surd}% -+ \DeclareUnicodeCharacter{221D}{\ensuremath\propto}% -+ \DeclareUnicodeCharacter{2220}{\ensuremath\angle}% -+ \DeclareUnicodeCharacter{2223}{\ensuremath\mid}% -+ \DeclareUnicodeCharacter{2228}{\ensuremath\vee}% -+ \DeclareUnicodeCharacter{222A}{\ensuremath\cup}% -+ \DeclareUnicodeCharacter{222B}{\ensuremath\smallint}% -+ \DeclareUnicodeCharacter{222E}{\ensuremath\oint}% -+ \DeclareUnicodeCharacter{223C}{\ensuremath\sim}% -+ \DeclareUnicodeCharacter{2240}{\ensuremath\wr}% -+ \DeclareUnicodeCharacter{2243}{\ensuremath\simeq}% -+ \DeclareUnicodeCharacter{2245}{\ensuremath\cong}% -+ \DeclareUnicodeCharacter{2248}{\ensuremath\approx}% -+ \DeclareUnicodeCharacter{224D}{\ensuremath\asymp}% -+ \DeclareUnicodeCharacter{2250}{\ensuremath\doteq}% -+ \DeclareUnicodeCharacter{2260}{\ensuremath\neq}% -+ \DeclareUnicodeCharacter{226A}{\ensuremath\ll}% -+ \DeclareUnicodeCharacter{226B}{\ensuremath\gg}% -+ \DeclareUnicodeCharacter{227A}{\ensuremath\prec}% -+ \DeclareUnicodeCharacter{227B}{\ensuremath\succ}% -+ \DeclareUnicodeCharacter{2283}{\ensuremath\supset}% -+ \DeclareUnicodeCharacter{2286}{\ensuremath\subseteq}% -+ \DeclareUnicodeCharacter{228E}{\ensuremath\uplus}% -+ \DeclareUnicodeCharacter{228F}{\ensuremath\sqsubset}% -+ \DeclareUnicodeCharacter{2290}{\ensuremath\sqsupset}% -+ \DeclareUnicodeCharacter{2291}{\ensuremath\sqsubseteq}% -+ \DeclareUnicodeCharacter{2292}{\ensuremath\sqsupseteq}% -+ \DeclareUnicodeCharacter{2293}{\ensuremath\sqcap}% -+ \DeclareUnicodeCharacter{2294}{\ensuremath\sqcup}% -+ \DeclareUnicodeCharacter{2295}{\ensuremath\oplus}% -+ \DeclareUnicodeCharacter{2296}{\ensuremath\ominus}% -+ \DeclareUnicodeCharacter{2297}{\ensuremath\otimes}% -+ \DeclareUnicodeCharacter{2298}{\ensuremath\oslash}% -+ \DeclareUnicodeCharacter{2299}{\ensuremath\odot}% -+ \DeclareUnicodeCharacter{22A2}{\ensuremath\vdash}% -+ \DeclareUnicodeCharacter{22A3}{\ensuremath\dashv}% -+ \DeclareUnicodeCharacter{22A4}{\ensuremath\ptextop}% -+ \DeclareUnicodeCharacter{22A5}{\ensuremath\bot}% -+ \DeclareUnicodeCharacter{22A8}{\ensuremath\models}% -+ \DeclareUnicodeCharacter{22B4}{\ensuremath\unlhd}% -+ \DeclareUnicodeCharacter{22B5}{\ensuremath\unrhd}% -+ \DeclareUnicodeCharacter{22C0}{\ensuremath\bigwedge}% -+ \DeclareUnicodeCharacter{22C1}{\ensuremath\bigvee}% -+ \DeclareUnicodeCharacter{22C2}{\ensuremath\bigcap}% -+ \DeclareUnicodeCharacter{22C3}{\ensuremath\bigcup}% -+ \DeclareUnicodeCharacter{22C4}{\ensuremath\diamond}% -+ \DeclareUnicodeCharacter{22C5}{\ensuremath\cdot}% -+ \DeclareUnicodeCharacter{22C6}{\ensuremath\star}% -+ \DeclareUnicodeCharacter{22C8}{\ensuremath\bowtie}% -+ \DeclareUnicodeCharacter{2308}{\ensuremath\lceil}% -+ \DeclareUnicodeCharacter{2309}{\ensuremath\rceil}% -+ \DeclareUnicodeCharacter{230A}{\ensuremath\lfloor}% -+ \DeclareUnicodeCharacter{230B}{\ensuremath\rfloor}% -+ \DeclareUnicodeCharacter{2322}{\ensuremath\frown}% -+ \DeclareUnicodeCharacter{2323}{\ensuremath\smile}% -+ % -+ \DeclareUnicodeCharacter{25A1}{\ensuremath\Box}% -+ \DeclareUnicodeCharacter{25B3}{\ensuremath\triangle}% -+ \DeclareUnicodeCharacter{25B7}{\ensuremath\triangleright}% -+ \DeclareUnicodeCharacter{25BD}{\ensuremath\bigtriangledown}% -+ \DeclareUnicodeCharacter{25C1}{\ensuremath\triangleleft}% -+ \DeclareUnicodeCharacter{25C7}{\ensuremath\Diamond}% -+ \DeclareUnicodeCharacter{2660}{\ensuremath\spadesuit}% -+ \DeclareUnicodeCharacter{2661}{\ensuremath\heartsuit}% -+ \DeclareUnicodeCharacter{2662}{\ensuremath\diamondsuit}% -+ \DeclareUnicodeCharacter{2663}{\ensuremath\clubsuit}% -+ \DeclareUnicodeCharacter{266D}{\ensuremath\flat}% -+ \DeclareUnicodeCharacter{266E}{\ensuremath\natural}% -+ \DeclareUnicodeCharacter{266F}{\ensuremath\sharp}% -+ \DeclareUnicodeCharacter{26AA}{\ensuremath\bigcirc}% -+ \DeclareUnicodeCharacter{27B9}{\ensuremath\rangle}% -+ \DeclareUnicodeCharacter{27C2}{\ensuremath\perp}% -+ \DeclareUnicodeCharacter{27E8}{\ensuremath\langle}% -+ \DeclareUnicodeCharacter{27F5}{\ensuremath\longleftarrow}% -+ \DeclareUnicodeCharacter{27F6}{\ensuremath\longrightarrow}% -+ \DeclareUnicodeCharacter{27F7}{\ensuremath\longleftrightarrow}% -+ \DeclareUnicodeCharacter{27FC}{\ensuremath\longmapsto}% -+ \DeclareUnicodeCharacter{29F5}{\ensuremath\setminus}% -+ \DeclareUnicodeCharacter{2A00}{\ensuremath\bigodot}% -+ \DeclareUnicodeCharacter{2A01}{\ensuremath\bigoplus}% -+ \DeclareUnicodeCharacter{2A02}{\ensuremath\bigotimes}% -+ \DeclareUnicodeCharacter{2A04}{\ensuremath\biguplus}% -+ \DeclareUnicodeCharacter{2A06}{\ensuremath\bigsqcup}% -+ \DeclareUnicodeCharacter{2A1D}{\ensuremath\Join}% -+ \DeclareUnicodeCharacter{2A3F}{\ensuremath\amalg}% -+ \DeclareUnicodeCharacter{2AAF}{\ensuremath\preceq}% -+ \DeclareUnicodeCharacter{2AB0}{\ensuremath\succeq}% -+ % -+ \global\mathchardef\checkmark="1370% actually the square root sign -+ \DeclareUnicodeCharacter{2713}{\ensuremath\checkmark}% -+}% end of \unicodechardefs - -- \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}} -- \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}} -+% UTF-8 byte sequence (pdfTeX) definitions (replacing and @U command) -+% It makes the setting that replace UTF-8 byte sequence. -+\def\utfeightchardefs{% -+ \let\DeclareUnicodeCharacter\DeclareUnicodeCharacterUTFviii -+ \unicodechardefs -+} - -- \DeclareUnicodeCharacter{1EF2}{\`Y} -- \DeclareUnicodeCharacter{1EF3}{\`y} -- \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}} -+% Whether the active definitions of non-ASCII characters expand to -+% non-active tokens with the same character code. This is used to -+% write characters literally, instead of using active definitions for -+% printing the correct glyphs. -+\newif\ifpassthroughchars -+\passthroughcharsfalse - -- \DeclareUnicodeCharacter{1EF8}{\~Y} -- \DeclareUnicodeCharacter{1EF9}{\~y} -+% For native Unicode handling (XeTeX and LuaTeX), -+% provide a definition macro to replace/pass-through a Unicode character -+% -+\def\DeclareUnicodeCharacterNative#1#2{% -+ \catcode"#1=\active -+ \def\dodeclareunicodecharacternative##1##2##3{% -+ \begingroup -+ \uccode`\~="##2\relax -+ \uppercase{\gdef~}{% -+ \ifpassthroughchars -+ ##1% -+ \else -+ ##3% -+ \fi -+ } -+ \endgroup -+ } -+ \begingroup -+ \uccode`\.="#1\relax -+ \uppercase{\def\UTFNativeTmp{.}}% -+ \expandafter\dodeclareunicodecharacternative\UTFNativeTmp{#1}{#2}% -+ \endgroup -+} - -- \DeclareUnicodeCharacter{2013}{--} -- \DeclareUnicodeCharacter{2014}{---} -- \DeclareUnicodeCharacter{2018}{\quoteleft} -- \DeclareUnicodeCharacter{2019}{\quoteright} -- \DeclareUnicodeCharacter{201A}{\quotesinglbase} -- \DeclareUnicodeCharacter{201C}{\quotedblleft} -- \DeclareUnicodeCharacter{201D}{\quotedblright} -- \DeclareUnicodeCharacter{201E}{\quotedblbase} -- \DeclareUnicodeCharacter{2020}{\ensuremath\dagger} -- \DeclareUnicodeCharacter{2021}{\ensuremath\ddagger} -- \DeclareUnicodeCharacter{2022}{\bullet} -- \DeclareUnicodeCharacter{2026}{\dots} -- \DeclareUnicodeCharacter{2039}{\guilsinglleft} -- \DeclareUnicodeCharacter{203A}{\guilsinglright} -- \DeclareUnicodeCharacter{20AC}{\euro} -+% Native Unicode handling (XeTeX and LuaTeX) character replacing definition. -+% It activates the setting that replaces Unicode characters. -+\def\nativeunicodechardefs{% -+ \let\DeclareUnicodeCharacter\DeclareUnicodeCharacterNative -+ \unicodechardefs -+} - -- \DeclareUnicodeCharacter{2192}{\expansion} -- \DeclareUnicodeCharacter{21D2}{\result} -+% For native Unicode handling (XeTeX and LuaTeX), -+% make the character token expand -+% to the sequences given in \unicodechardefs for printing. -+\def\DeclareUnicodeCharacterNativeAtU#1#2{% -+ \def\UTFAtUTmp{#2} -+ \expandafter\globallet\csname uni:#1\endcsname \UTFAtUTmp -+} - -- \DeclareUnicodeCharacter{2212}{\minus} -- \DeclareUnicodeCharacter{2217}{\point} -- \DeclareUnicodeCharacter{2225}{\ensuremath\parallel} -- \DeclareUnicodeCharacter{2261}{\equiv} --}% end of \utfeightchardefs -+% @U command definitions for native Unicode handling (XeTeX and LuaTeX). -+\def\nativeunicodechardefsatu{% -+ \let\DeclareUnicodeCharacter\DeclareUnicodeCharacterNativeAtU -+ \unicodechardefs -+} - - % US-ASCII character definitions. - \def\asciichardefs{% nothing need be done - \relax - } - --% Latin1 (ISO-8859-1) character definitions. --\def\nonasciistringdefs{% -- \setnonasciicharscatcode\active -- \def\defstringchar##1{\def##1{\string##1}}% -- % -- \defstringchar^^80\defstringchar^^81\defstringchar^^82\defstringchar^^83% -- \defstringchar^^84\defstringchar^^85\defstringchar^^86\defstringchar^^87% -- \defstringchar^^88\defstringchar^^89\defstringchar^^8a\defstringchar^^8b% -- \defstringchar^^8c\defstringchar^^8d\defstringchar^^8e\defstringchar^^8f% -- % -- \defstringchar^^90\defstringchar^^91\defstringchar^^92\defstringchar^^93% -- \defstringchar^^94\defstringchar^^95\defstringchar^^96\defstringchar^^97% -- \defstringchar^^98\defstringchar^^99\defstringchar^^9a\defstringchar^^9b% -- \defstringchar^^9c\defstringchar^^9d\defstringchar^^9e\defstringchar^^9f% -- % -- \defstringchar^^a0\defstringchar^^a1\defstringchar^^a2\defstringchar^^a3% -- \defstringchar^^a4\defstringchar^^a5\defstringchar^^a6\defstringchar^^a7% -- \defstringchar^^a8\defstringchar^^a9\defstringchar^^aa\defstringchar^^ab% -- \defstringchar^^ac\defstringchar^^ad\defstringchar^^ae\defstringchar^^af% -- % -- \defstringchar^^b0\defstringchar^^b1\defstringchar^^b2\defstringchar^^b3% -- \defstringchar^^b4\defstringchar^^b5\defstringchar^^b6\defstringchar^^b7% -- \defstringchar^^b8\defstringchar^^b9\defstringchar^^ba\defstringchar^^bb% -- \defstringchar^^bc\defstringchar^^bd\defstringchar^^be\defstringchar^^bf% -- % -- \defstringchar^^c0\defstringchar^^c1\defstringchar^^c2\defstringchar^^c3% -- \defstringchar^^c4\defstringchar^^c5\defstringchar^^c6\defstringchar^^c7% -- \defstringchar^^c8\defstringchar^^c9\defstringchar^^ca\defstringchar^^cb% -- \defstringchar^^cc\defstringchar^^cd\defstringchar^^ce\defstringchar^^cf% -- % -- \defstringchar^^d0\defstringchar^^d1\defstringchar^^d2\defstringchar^^d3% -- \defstringchar^^d4\defstringchar^^d5\defstringchar^^d6\defstringchar^^d7% -- \defstringchar^^d8\defstringchar^^d9\defstringchar^^da\defstringchar^^db% -- \defstringchar^^dc\defstringchar^^dd\defstringchar^^de\defstringchar^^df% -- % -- \defstringchar^^e0\defstringchar^^e1\defstringchar^^e2\defstringchar^^e3% -- \defstringchar^^e4\defstringchar^^e5\defstringchar^^e6\defstringchar^^e7% -- \defstringchar^^e8\defstringchar^^e9\defstringchar^^ea\defstringchar^^eb% -- \defstringchar^^ec\defstringchar^^ed\defstringchar^^ee\defstringchar^^ef% -- % -- \defstringchar^^f0\defstringchar^^f1\defstringchar^^f2\defstringchar^^f3% -- \defstringchar^^f4\defstringchar^^f5\defstringchar^^f6\defstringchar^^f7% -- \defstringchar^^f8\defstringchar^^f9\defstringchar^^fa\defstringchar^^fb% -- \defstringchar^^fc\defstringchar^^fd\defstringchar^^fe\defstringchar^^ff% --} -- -- --% define all the unicode characters we know about, for the sake of @U. --\utfeightchardefs -+% define all Unicode characters we know about, for the sake of @U. -+\iftxinativeunicodecapable -+ \nativeunicodechardefsatu -+\else -+ \utfeightchardefs -+\fi - - - % Make non-ASCII characters printable again for compatibility with -@@ -9946,12 +11255,12 @@ - \advance\vsize by \topskip - \outervsize = \vsize - \advance\outervsize by 2\topandbottommargin -- \pageheight = \vsize -+ \txipageheight = \vsize - % - \hsize = #2\relax - \outerhsize = \hsize - \advance\outerhsize by 0.5in -- \pagewidth = \hsize -+ \txipagewidth = \hsize - % - \normaloffset = #4\relax - \bindingoffset = #5\relax -@@ -9963,6 +11272,14 @@ - % whatever layout pdftex was dumped with. - \pdfhorigin = 1 true in - \pdfvorigin = 1 true in -+ \else -+ \ifx\XeTeXrevision\thisisundefined -+ \special{papersize=#8,#7}% -+ \else -+ \pdfpageheight #7\relax -+ \pdfpagewidth #8\relax -+ % XeTeX does not have \pdfhorigin and \pdfvorigin. -+ \fi - \fi - % - \setleading{\textleading} -@@ -9995,7 +11312,6 @@ - % - \lispnarrowing = 0.3in - \tolerance = 700 -- \hfuzz = 1pt - \contentsrightmargin = 0pt - \defbodyindent = .5cm - }} -@@ -10013,7 +11329,6 @@ - % - \lispnarrowing = 0.25in - \tolerance = 700 -- \hfuzz = 1pt - \contentsrightmargin = 0pt - \defbodyindent = .4cm - }} -@@ -10039,7 +11354,6 @@ - {297mm}{210mm}% - % - \tolerance = 700 -- \hfuzz = 1pt - \contentsrightmargin = 0pt - \defbodyindent = 5mm - }} -@@ -10058,7 +11372,6 @@ - % - \lispnarrowing = 0.2in - \tolerance = 800 -- \hfuzz = 1.2pt - \contentsrightmargin = 0pt - \defbodyindent = 2mm - \tableindent = 12mm -@@ -10114,6 +11427,9 @@ - % - \letterpaper - -+% Default value of \hfuzz, for suppressing warnings about overfull hboxes. -+\hfuzz = 1pt -+ - - \message{and turning on texinfo input format.} - -@@ -10150,26 +11466,25 @@ - % this is not a problem. - \def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi} - --% Turn off all special characters except @ --% (and those which the user can use as if they were ordinary). -+% Set catcodes for Texinfo file -+ -+% Active characters for printing the wanted glyph. - % Most of these we simply print from the \tt font, but for some, we can - % use math or other variants that look better in normal text. -- -+% - \catcode`\"=\active - \def\activedoublequote{{\tt\char34}} - \let"=\activedoublequote - \catcode`\~=\active \def\activetilde{{\tt\char126}} \let~ = \activetilde --\chardef\hat=`\^ --\catcode`\^=\active \def\activehat{{\tt \hat}} \let^ = \activehat -+\chardef\hatchar=`\^ -+\catcode`\^=\active \def\activehat{{\tt \hatchar}} \let^ = \activehat - - \catcode`\_=\active - \def_{\ifusingtt\normalunderscore\_} --\let\realunder=_ --% Subroutine for the previous macro. - \def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em } -+\let\realunder=_ - --\catcode`\|=\active --\def|{{\tt\char124}} -+\catcode`\|=\active \def|{{\tt\char124}} - - \chardef \less=`\< - \catcode`\<=\active \def\activeless{{\tt \less}}\let< = \activeless -@@ -10177,6 +11492,8 @@ - \catcode`\>=\active \def\activegtr{{\tt \gtr}}\let> = \activegtr - \catcode`\+=\active \def+{{\tt \char 43}} - \catcode`\$=\active \def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix -+\catcode`\-=\active \let-=\normaldash -+ - - % used for headline/footline in the output routine, in case the page - % breaks in the middle of an @tex block. -@@ -10191,12 +11508,6 @@ - % in principle, all other definitions in \tex have to be undone too. - } - --% If a .fmt file is being used, characters that might appear in a file --% name cannot be active until we have parsed the command line. --% So turn them off again, and have \everyjob (or @setfilename) turn them on. --% \otherifyactive is called near the end of this file. --\def\otherifyactive{\catcode`+=\other \catcode`\_=\other} -- - % Used sometimes to turn off (effectively) the active characters even after - % parsing them. - \def\turnoffactive{% -@@ -10215,23 +11526,22 @@ - % \doublebackslash is two of them (for the pdf outlines). - {\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}} - --% In texinfo, backslash is an active character; it prints the backslash -+% In Texinfo, backslash is an active character; it prints the backslash - % in fixed width font. - \catcode`\\=\active % @ for escape char from now on. - --% The story here is that in math mode, the \char of \backslashcurfont --% ends up printing the roman \ from the math symbol font (because \char --% in math mode uses the \mathcode, and plain.tex sets --% \mathcode`\\="026E). It seems better for @backslashchar{} to always --% print a typewriter backslash, hence we use an explicit \mathchar, -+% Print a typewriter backslash. For math mode, we can't simply use -+% \backslashcurfont: the story here is that in math mode, the \char -+% of \backslashcurfont ends up printing the roman \ from the math symbol -+% font (because \char in math mode uses the \mathcode, and plain.tex -+% sets \mathcode`\\="026E). Hence we use an explicit \mathchar, - % which is the decimal equivalent of "715c (class 7, e.g., use \fam; - % ignored family value; char position "5C). We can't use " for the - % usual hex value because it has already been made active. --@def@normalbackslash{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi}} --@let@backslashchar = @normalbackslash % @backslashchar{} is for user documents. - --% On startup, @fixbackslash assigns: --% @let \ = @normalbackslash -+@def@ttbackslash{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi}} -+@let@backslashchar = @ttbackslash % @backslashchar{} is for user documents. -+ - % \rawbackslash defines an active \ to do \backslashcurfont. - % \otherbackslash defines an active \ to be a literal `\' character with - % catcode other. We switch back and forth between these. -@@ -10239,52 +11549,93 @@ - @gdef@otherbackslash{@let\=@realbackslash} - - % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of --% the literal character `\'. Also revert - to its normal character, in --% case the active - from code has slipped in. -+% the literal character `\'. - % - {@catcode`- = @active - @gdef@normalturnoffactive{% -- @nonasciistringdefs -+ @passthroughcharstrue - @let-=@normaldash - @let"=@normaldoublequote - @let$=@normaldollar %$ font-lock fix - @let+=@normalplus - @let<=@normalless - @let>=@normalgreater -- @let\=@normalbackslash - @let^=@normalcaret - @let_=@normalunderscore - @let|=@normalverticalbar - @let~=@normaltilde -+ @let\=@ttbackslash - @markupsetuplqdefault - @markupsetuprqdefault - @unsepspaces - } - } - --% Make _ and + \other characters, temporarily. --% This is canceled by @fixbackslash. --@otherifyactive -+% If a .fmt file is being used, characters that might appear in a file -+% name cannot be active until we have parsed the command line. -+% So turn them off again, and have @fixbackslash turn them back on. -+@catcode`+=@other @catcode`@_=@other - -+% \enablebackslashhack - allow file to begin `\input texinfo' -+% - % If a .fmt file is being used, we don't want the `\input texinfo' to show up. - % That is what \eatinput is for; after that, the `\' should revert to printing - % a backslash. --% --@gdef@eatinput input texinfo{@fixbackslash} --@global@let\ = @eatinput -+% If the file did not have a `\input texinfo', then it is turned off after -+% the first line; otherwise the first `\' in the file would cause an error. -+% This is used on the very last line of this file, texinfo.tex. -+% We also use @c to call @fixbackslash, in case ends of lines are hidden. -+{ -+@catcode`@^=7 -+@catcode`@^^M=13@gdef@enablebackslashhack{% -+ @global@let\ = @eatinput% -+ @catcode`@^^M=13% -+ @def@c{@fixbackslash@c}% -+ % Definition for the newline at the end of this file. -+ @def ^^M{@let^^M@secondlinenl}% -+ % Definition for a newline in the main Texinfo file. -+ @gdef @secondlinenl{@fixbackslash}% -+ % In case the first line has a whole-line command on it -+ @let@originalparsearg@parsearg -+ @def@parsearg{@fixbackslash@originalparsearg} -+}} -+ -+{@catcode`@^=7 @catcode`@^^M=13% -+@gdef@eatinput input texinfo#1^^M{@fixbackslash}} -+ -+% Emergency active definition of newline, in case an active newline token -+% appears by mistake. -+{@catcode`@^=7 @catcode13=13% -+@gdef@enableemergencynewline{% -+ @gdef^^M{% -+ @par% -+ %@par% -+}}} -+ - --% On the other hand, perhaps the file did not have a `\input texinfo'. Then --% the first `\' in the file would cause an error. This macro tries to fix --% that, assuming it is called before the first `\' could plausibly occur. --% Also turn back on active characters that might appear in the input --% file name, in case not using a pre-dumped format. --% - @gdef@fixbackslash{% -- @ifx\@eatinput @let\ = @normalbackslash @fi -+ @ifx\@eatinput @let\ = @ttbackslash @fi -+ @catcode13=5 % regular end of line -+ @enableemergencynewline -+ @let@c=@texinfoc -+ @let@parsearg@originalparsearg -+ % Also turn back on active characters that might appear in the input -+ % file name, in case not using a pre-dumped format. - @catcode`+=@active - @catcode`@_=@active -+ % -+ % If texinfo.cnf is present on the system, read it. -+ % Useful for site-wide @afourpaper, etc. This macro, @fixbackslash, gets -+ % called at the beginning of every Texinfo file. Not opening texinfo.cnf -+ % directly in this file, texinfo.tex, makes it possible to make a format -+ % file for Texinfo. -+ % -+ @openin 1 texinfo.cnf -+ @ifeof 1 @else @input texinfo.cnf @fi -+ @closein 1 - } - -+ - % Say @foo, not \foo, in error messages. - @escapechar = `@@ - -@@ -10321,6 +11672,4 @@ - - @c vim:sw=2: - --@ignore -- arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115 --@end ignore -+@enablebackslashhack -diff -durN inetutils-1.9.4.orig/build-aux/update-copyright inetutils-1.9.4/build-aux/update-copyright ---- inetutils-1.9.4.orig/build-aux/update-copyright 2015-03-31 15:08:14.000000000 +0800 -+++ inetutils-1.9.4/build-aux/update-copyright 2017-05-15 17:50:56.609375000 +0800 -@@ -1,11 +1,11 @@ --eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0" ${1+"$@"}' -+eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0" "$@"' - & eval 'exec perl -wS -0777 -pi "$0" $argv:q' - if 0; - # Update an FSF copyright year list to include the current year. - --my $VERSION = '2015-01-15.20:53'; # UTC -+my $VERSION = '2016-01-12.23:13'; # UTC - --# Copyright (C) 2009-2015 Free Software Foundation, Inc. -+# Copyright (C) 2009-2017 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 -@@ -124,7 +124,7 @@ - use warnings; - - my $copyright_re = 'Copyright'; --my $circle_c_re = '(?:\([cC]\)|@copyright{}|\\\\\(co|©)'; -+my $circle_c_re = '(?:\([cC]\)|@copyright\{}|\\\\\(co|©)'; - my $holder = $ENV{UPDATE_COPYRIGHT_HOLDER}; - $holder ||= 'Free Software Foundation, Inc.'; - my $prefix_max = 5; -@@ -269,6 +269,6 @@ - # eval: (add-hook 'write-file-hooks 'time-stamp) - # time-stamp-start: "my $VERSION = '" - # time-stamp-format: "%:y-%02m-%02d.%02H:%02M" --# time-stamp-time-zone: "UTC" -+# time-stamp-time-zone: "UTC0" - # time-stamp-end: "'; # UTC" - # End: -diff -durN inetutils-1.9.4.orig/build-aux/useless-if-before-free inetutils-1.9.4/build-aux/useless-if-before-free ---- inetutils-1.9.4.orig/build-aux/useless-if-before-free 2015-03-31 15:08:14.000000000 +0800 -+++ inetutils-1.9.4/build-aux/useless-if-before-free 2017-05-15 17:50:56.765625000 +0800 -@@ -1,16 +1,16 @@ --eval '(exit $?0)' && eval 'exec perl -wST "$0" ${1+"$@"}' -+eval '(exit $?0)' && eval 'exec perl -wST "$0" "$@"' - & eval 'exec perl -wST "$0" $argv:q' - if 0; - # Detect instances of "if (p) free (p);". - # Likewise "if (p != 0)", "if (0 != p)", or with NULL; and with braces. - --my $VERSION = '2012-01-06 07:23'; # UTC -+my $VERSION = '2016-08-01 17:47'; # UTC - # The definition above must lie within the first 8 lines in order - # for the Emacs time-stamp write hook (at end) to update it. - # If you change this file with Emacs, please let the write hook - # do its job. Otherwise, update this string manually. - --# Copyright (C) 2008-2015 Free Software Foundation, Inc. -+# Copyright (C) 2008-2017 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 -@@ -129,6 +129,9 @@ - $err = EXIT_ERROR, next; - while (defined (my $line = )) - { -+ # Skip non-matching lines early to save time -+ $line =~ /\bif\b/ -+ or next; - while ($line =~ - /\b(if\s*\(\s*([^)]+?)(?:\s*!=\s*([^)]+?))?\s*\) - # 1 2 3 -@@ -202,6 +205,6 @@ - ## eval: (add-hook 'write-file-hooks 'time-stamp) - ## time-stamp-start: "my $VERSION = '" - ## time-stamp-format: "%:y-%02m-%02d %02H:%02M" --## time-stamp-time-zone: "UTC" -+## time-stamp-time-zone: "UTC0" - ## time-stamp-end: "'; # UTC" - ## End: -diff -durN inetutils-1.9.4.orig/build-aux/vc-list-files inetutils-1.9.4/build-aux/vc-list-files ---- inetutils-1.9.4.orig/build-aux/vc-list-files 2015-03-31 15:08:14.000000000 +0800 -+++ inetutils-1.9.4/build-aux/vc-list-files 2017-05-15 17:50:56.906250000 +0800 -@@ -2,9 +2,9 @@ - # List version-controlled file names. - - # Print a version string. --scriptversion=2011-05-16.22; # UTC -+scriptversion=2016-01-11.22; # UTC - --# Copyright (C) 2006-2015 Free Software Foundation, Inc. -+# Copyright (C) 2006-2017 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 -@@ -108,6 +108,6 @@ - # eval: (add-hook 'write-file-hooks '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 -durN inetutils-1.9.4.orig/config.hin inetutils-1.9.4/config.hin ---- inetutils-1.9.4.orig/config.hin 2015-06-09 15:49:01.000000000 +0800 -+++ inetutils-1.9.4/config.hin 2017-05-15 17:58:04.000000000 +0800 -@@ -32,6 +32,9 @@ - /* Define to 1 if using `alloca.c'. */ - #undef C_ALLOCA - -+/* Define to 1 if the C locale may have encoding errors. */ -+#undef C_LOCALE_MAYBE_EILSEQ -+ - /* Define as the bit index in the word where to find bit 0 of the exponent of - 'double'. */ - #undef DBL_EXPBIT0_BIT -@@ -67,6 +70,15 @@ - /* Define this to 1 if F_DUPFD behavior does not match POSIX */ - #undef FCNTL_DUPFD_BUGGY - -+/* Define to nothing if C supports flexible array members, and to 1 if it does -+ not. That way, with a declaration like 'struct s { int n; double -+ d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99 -+ compilers. When computing the size of such an object, don't use 'sizeof -+ (struct s)' as it overestimates the size. Use 'offsetof (struct s, d)' -+ instead. Don't use 'offsetof (struct s, d[0])', as this doesn't work with -+ MSVC and with C++ compilers. */ -+#undef FLEXIBLE_ARRAY_MEMBER -+ - /* Define to 1 if fopen() fails to recognize a trailing slash. */ - #undef FOPEN_TRAILING_SLASH_BUG - -@@ -116,6 +128,10 @@ - #undef GNULIB_MALLOC_GNU - - /* Define to a C preprocessor expression that evaluates to 1 or 0, depending -+ whether the gnulib module msvc-nothrow shall be considered present. */ -+#undef GNULIB_MSVC_NOTHROW -+ -+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module openat shall be considered present. */ - #undef GNULIB_OPENAT - -@@ -234,9 +250,6 @@ - /* Define to 1 when the gnulib module getlogin_r should be tested. */ - #undef GNULIB_TEST_GETLOGIN_R - --/* Define to 1 when the gnulib module getopt-gnu should be tested. */ --#undef GNULIB_TEST_GETOPT_GNU -- - /* Define to 1 when the gnulib module gettimeofday should be tested. */ - #undef GNULIB_TEST_GETTIMEOFDAY - -@@ -395,7 +408,7 @@ - /* Define to 1 if you have the header file. */ - #undef HAVE_BP_SYM_H - --/* Define to 1 if you have the 'btowc' function. */ -+/* Define to 1 if you have the `btowc' function. */ - #undef HAVE_BTOWC - - /* Define to 1 if you have the `cfsetspeed' function. */ -@@ -413,9 +426,15 @@ - /* Define to 1 if enctype_names[] must be const char. */ - #undef HAVE_CONST_CHAR_ENCTYPE_NAMES - -+/* Define to 1 if you have the header file. */ -+#undef HAVE_CRTDEFS_H -+ - /* Define to 1 if you have the `crypt' function. */ - #undef HAVE_CRYPT - -+/* Define to 1 if you have the header file. */ -+#undef HAVE_CRYPT_H -+ - /* Define to 1 if tgetent() exists in . */ - #undef HAVE_CURSES_TGETENT - -@@ -547,10 +566,6 @@ - don't. */ - #undef HAVE_DECL_GETDTABLESIZE - --/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't. -- */ --#undef HAVE_DECL_GETENV -- - /* Define to 1 if you have the declaration of `getgrnam', and to 0 if you - don't. */ - #undef HAVE_DECL_GETGRNAM -@@ -723,6 +738,10 @@ - don't. */ - #undef HAVE_DECL__SNPRINTF - -+/* Define to 1 if you have the declaration of `__argv', and to 0 if you don't. -+ */ -+#undef HAVE_DECL___ARGV -+ - /* Define to 1 if you have the declaration of `__fsetlocking', and to 0 if you - don't. */ - #undef HAVE_DECL___FSETLOCKING -@@ -758,13 +777,13 @@ - /* Define to 1 if you have the `fchdir' function. */ - #undef HAVE_FCHDIR - --/* Define to 1 if you have the 'fcntl' function. */ -+/* Define to 1 if you have the `fcntl' function. */ - #undef HAVE_FCNTL - - /* Define to 1 if you have the header file. */ - #undef HAVE_FCNTL_H - --/* Define to 1 if you have the 'fdopendir' function. */ -+/* Define to 1 if you have the `fdopendir' function. */ - #undef HAVE_FDOPENDIR - - /* Define to 1 if FD_SET_MACROS exists */ -@@ -794,7 +813,7 @@ - /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ - #undef HAVE_FSEEKO - --/* Define to 1 if you have the 'fstatat' function. */ -+/* Define to 1 if you have the `fstatat' function. */ - #undef HAVE_FSTATAT - - /* Define to 1 if you have the `ftruncate' function. */ -@@ -810,16 +829,28 @@ - tested with the replacement. */ - #undef HAVE_GETCWD_SHORTER - --/* Define to 1 if you have the 'getdelim' function. */ -+/* Define to 1 if you have the `getdelim' function. */ - #undef HAVE_GETDELIM - - /* Define if the getdomainname() function is present and can be used. */ - #undef HAVE_GETDOMAINNAME - --/* Define to 1 if you have the 'getdtablesize' function. */ -+/* Define to 1 if you have the `getdtablesize' function. */ - #undef HAVE_GETDTABLESIZE - --/* Define to 1 if you have the 'getgrouplist' function. */ -+/* Define to 1 if you have the `getegid' function. */ -+#undef HAVE_GETEGID -+ -+/* Define to 1 if you have the `geteuid' function. */ -+#undef HAVE_GETEUID -+ -+/* Define to 1 if you have the `getexecname' function. */ -+#undef HAVE_GETEXECNAME -+ -+/* Define to 1 if you have the `getgid' function. */ -+#undef HAVE_GETGID -+ -+/* Define to 1 if you have the `getgrouplist' function. */ - #undef HAVE_GETGROUPLIST - - /* Define to 1 if your system has a working `getgroups' function. */ -@@ -831,7 +862,7 @@ - /* Define to 1 if you have the `gethostname' function. */ - #undef HAVE_GETHOSTNAME - --/* Define to 1 if you have the 'getlogin_r' function. */ -+/* Define to 1 if you have the `getlogin_r' function. */ - #undef HAVE_GETLOGIN_R - - /* Define to 1 if you have the `getmsg' function. */ -@@ -849,7 +880,10 @@ - /* Define to 1 if you have the `getpass' function. */ - #undef HAVE_GETPASS - --/* Define to 1 if you have the 'getpwnam_r' function. */ -+/* Define to 1 if you have the `getprogname' function. */ -+#undef HAVE_GETPROGNAME -+ -+/* Define to 1 if you have the `getpwnam_r' function. */ - #undef HAVE_GETPWNAM_R - - /* Define to 1 if you have the `getpwuid_r' function. */ -@@ -861,9 +895,12 @@ - /* Define to 1 if you have the `getspnam' function. */ - #undef HAVE_GETSPNAM - --/* Define to 1 if you have the 'gettimeofday' function. */ -+/* Define to 1 if you have the `gettimeofday' function. */ - #undef HAVE_GETTIMEOFDAY - -+/* Define to 1 if you have the `getuid' function. */ -+#undef HAVE_GETUID -+ - /* Define to 1 if you have the `getusershell' function. */ - #undef HAVE_GETUSERSHELL - -@@ -922,16 +959,16 @@ - /* Define to 1 if IPV6_V6ONLY exists */ - #undef HAVE_IPV6_V6ONLY - --/* Define to 1 if you have the 'isblank' function. */ -+/* Define to 1 if you have the `isblank' function. */ - #undef HAVE_ISBLANK - - /* Define to 1 if you have the `issetugid' function. */ - #undef HAVE_ISSETUGID - --/* Define to 1 if you have the 'iswcntrl' function. */ -+/* Define to 1 if you have the `iswcntrl' function. */ - #undef HAVE_ISWCNTRL - --/* Define to 1 if you have the 'iswctype' function. */ -+/* Define to 1 if you have the `iswctype' function. */ - #undef HAVE_ISWCTYPE - - /* Define to 1 if you have the header file. */ -@@ -985,6 +1022,9 @@ - /* Define to 1 if you have the header file. */ - #undef HAVE_LIBUTIL_H - -+/* Define to 1 if you have the header file. */ -+#undef HAVE_LIMITS_H -+ - /* Define to 1 if you have the header file. */ - #undef HAVE_LINEWRAP_H - -@@ -1015,7 +1055,7 @@ - /* Define to 1 if the system has the type 'long long int'. */ - #undef HAVE_LONG_LONG_INT - --/* Define to 1 if you have the 'lstat' function. */ -+/* Define to 1 if you have the `lstat' function. */ - #undef HAVE_LSTAT - - /* Define to 1 if your system has a GNU libc compatible 'malloc' function, and -@@ -1035,10 +1075,10 @@ - /* Define to 1 if you have the `mbrtowc' function. */ - #undef HAVE_MBRTOWC - --/* Define to 1 if you have the 'mbsinit' function. */ -+/* Define to 1 if you have the `mbsinit' function. */ - #undef HAVE_MBSINIT - --/* Define to 1 if you have the 'mbsrtowcs' function. */ -+/* Define to 1 if you have the `mbsrtowcs' function. */ - #undef HAVE_MBSRTOWCS - - /* Define to 1 if declares mbstate_t. */ -@@ -1075,13 +1115,13 @@ - /* Define to 1 if defines the MIN and MAX macros. */ - #undef HAVE_MINMAX_IN_SYS_PARAM_H - --/* Define to 1 if you have the 'mkstemp' function. */ -+/* Define to 1 if you have the `mkstemp' function. */ - #undef HAVE_MKSTEMP - - /* Define to 1 if you have a working `mmap' system call. */ - #undef HAVE_MMAP - --/* Define to 1 if you have the 'mprotect' function. */ -+/* Define to 1 if you have the `mprotect' function. */ - #undef HAVE_MPROTECT - - /* Define to 1 on MSVC platforms that have the "invalid parameter handler" -@@ -1112,13 +1152,13 @@ - /* Define to 1 if you have the header file. */ - #undef HAVE_NETINET_IP_VAR_H - --/* Define to 1 if you have the 'nl_langinfo' function. */ -+/* Define to 1 if you have the `nl_langinfo' function. */ - #undef HAVE_NL_LANGINFO - - /* Define to 1 if the system has obstacks that work with any size object. */ - #undef HAVE_OBSTACK - --/* Define to 1 if you have the 'openat' function. */ -+/* Define to 1 if you have the `openat' function. */ - #undef HAVE_OPENAT - - /* Define to 1 if you have the `opendir' function. */ -@@ -1134,7 +1174,7 @@ - /* Define if you have the header file */ - #undef HAVE_PATHS_H - --/* Define to 1 if you have the 'pipe' function. */ -+/* Define to 1 if you have the `pipe' function. */ - #undef HAVE_PIPE - - /* Define to 1 if you have the `poll' function. */ -@@ -1143,7 +1183,7 @@ - /* Define to 1 if you have the header file. */ - #undef HAVE_POLL_H - --/* Define to 1 if you have the 'posix_openpt' function. */ -+/* Define to 1 if you have the `posix_openpt' function. */ - #undef HAVE_POSIX_OPENPT - - /* Define if you have weak "pragma" references */ -@@ -1161,6 +1201,10 @@ - /* Define if the POSIX multithreading library has read/write locks. */ - #undef HAVE_PTHREAD_RWLOCK - -+/* Define if the 'pthread_rwlock_rdlock' function prefers a writer to a -+ reader. */ -+#undef HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER -+ - /* Define to 1 if you have the `ptsname' function. */ - #undef HAVE_PTSNAME - -@@ -1510,6 +1554,9 @@ - /* Define to 1 if pwrite is declared even after undefining macros. */ - #undef HAVE_RAW_DECL_PWRITE - -+/* Define to 1 if qsort_r is declared even after undefining macros. */ -+#undef HAVE_RAW_DECL_QSORT_R -+ - /* Define to 1 if random is declared even after undefining macros. */ - #undef HAVE_RAW_DECL_RANDOM - -@@ -1702,6 +1749,9 @@ - /* Define to 1 if towctrans is declared even after undefining macros. */ - #undef HAVE_RAW_DECL_TOWCTRANS - -+/* Define to 1 if truncate is declared even after undefining macros. */ -+#undef HAVE_RAW_DECL_TRUNCATE -+ - /* Define to 1 if ttyname_r is declared even after undefining macros. */ - #undef HAVE_RAW_DECL_TTYNAME_R - -@@ -1762,6 +1812,9 @@ - /* Define to 1 if wcsdup is declared even after undefining macros. */ - #undef HAVE_RAW_DECL_WCSDUP - -+/* Define to 1 if wcsftime is declared even after undefining macros. */ -+#undef HAVE_RAW_DECL_WCSFTIME -+ - /* Define to 1 if wcslen is declared even after undefining macros. */ - #undef HAVE_RAW_DECL_WCSLEN - -@@ -1865,7 +1918,7 @@ - /* Define to 1 if you have the header file. */ - #undef HAVE_SEARCH_H - --/* Define to 1 if you have the 'secure_getenv' function. */ -+/* Define to 1 if you have the `secure_getenv' function. */ - #undef HAVE_SECURE_GETENV - - /* Define to 1 if you have the header file. */ -@@ -1877,7 +1930,7 @@ - /* Define to 1 if you have the `setegid' function. */ - #undef HAVE_SETEGID - --/* Define to 1 if you have the 'setenv' function. */ -+/* Define to 1 if you have the `setenv' function. */ - #undef HAVE_SETENV - - /* Define to 1 if you have the `seteuid' function. */ -@@ -1940,7 +1993,7 @@ - /* Define to 1 if you have the `sigvec' function. */ - #undef HAVE_SIGVEC - --/* Define to 1 if you have the 'sleep' function. */ -+/* Define to 1 if you have the `sleep' function. */ - #undef HAVE_SLEEP - - /* Define to one if you have snprintf */ -@@ -1964,6 +2017,9 @@ - /* Define to 1 if you have the header file. */ - #undef HAVE_STDIO_EXT_H - -+/* Define to 1 if you have the header file. */ -+#undef HAVE_STDIO_H -+ - /* Define to 1 if you have the header file. */ - #undef HAVE_STDLIB_H - -@@ -1998,7 +2054,7 @@ - /* Define to 1 if you have the `strncasecmp' function. */ - #undef HAVE_STRNCASECMP - --/* Define to 1 if you have the 'strndup' function. */ -+/* Define to 1 if you have the `strndup' function. */ - #undef HAVE_STRNDUP - - /* Define to 1 if you have the `strnlen' function. */ -@@ -2047,6 +2103,9 @@ - /* Define to 1 if `decimal_point' is a member of `struct lconv'. */ - #undef HAVE_STRUCT_LCONV_DECIMAL_POINT - -+/* Define to one if you have struct osockaddr. */ -+#undef HAVE_STRUCT_OSOCKADDR -+ - /* Define to 1 if `pw_change' is member of `struct passwd'. */ - #undef HAVE_STRUCT_PASSWD_PW_CHANGE - -@@ -2197,7 +2256,7 @@ - /* Define if struct stat has an st_dm_mode member. */ - #undef HAVE_ST_DM_MODE - --/* Define to 1 if you have the 'symlink' function. */ -+/* Define to 1 if you have the `symlink' function. */ - #undef HAVE_SYMLINK - - /* Define to 1 if you have the header file. */ -@@ -2283,9 +2342,6 @@ - /* Define to 1 if you have the header file. */ - #undef HAVE_SYS_SYSTEMINFO_H - --/* Define to 1 if you have the header file. */ --#undef HAVE_SYS_TIMEB_H -- - /* Define to 1 if you have the header file. */ - #undef HAVE_SYS_TIME_H - -@@ -2310,7 +2366,7 @@ - /* Define to 1 if you have the header file. */ - #undef HAVE_TCPD_H - --/* Define to 1 if you have the 'tcsetattr' function. */ -+/* Define to 1 if you have the `tcsetattr' function. */ - #undef HAVE_TCSETATTR - - /* Define to 1 if tgetent() exists in . */ -@@ -2325,6 +2381,9 @@ - /* Define to 1 if tgetent() exists. */ - #undef HAVE_TGETENT - -+/* Define to 1 if TIOCNOTTY exists */ -+#undef HAVE_TIOCNOTTY -+ - /* Define to 1 if you have the `towlower' function. */ - #undef HAVE_TOWLOWER - -@@ -2358,10 +2417,10 @@ - /* Define to 1 if you have the `utimes' function. */ - #undef HAVE_UTIMES - --/* Define to 1 if you have the 'utmpname' function. */ -+/* Define to 1 if you have the `utmpname' function. */ - #undef HAVE_UTMPNAME - --/* Define to 1 if you have the 'utmpxname' function. */ -+/* Define to 1 if you have the `utmpxname' function. */ - #undef HAVE_UTMPXNAME - - /* Define to 1 if you have the header file. */ -@@ -2370,7 +2429,10 @@ - /* Define to 1 if you have the header file. */ - #undef HAVE_UTMP_H - --/* Define to 1 if you have the 'vasnprintf' function. */ -+/* Define if you have a global __progname variable */ -+#undef HAVE_VAR___PROGNAME -+ -+/* Define to 1 if you have the `vasnprintf' function. */ - #undef HAVE_VASNPRINTF - - /* Define to 1 if you have the `vasprintf' function. */ -@@ -2403,7 +2465,7 @@ - /* Define if you have the 'wchar_t' type. */ - #undef HAVE_WCHAR_T - --/* Define to 1 if you have the 'wcrtomb' function. */ -+/* Define to 1 if you have the `wcrtomb' function. */ - #undef HAVE_WCRTOMB - - /* Define to 1 if you have the `wcslen' function. */ -@@ -2424,13 +2486,13 @@ - /* Define if you have the 'wint_t' type. */ - #undef HAVE_WINT_T - --/* Define to 1 if you have the 'wmemchr' function. */ -+/* Define to 1 if you have the `wmemchr' function. */ - #undef HAVE_WMEMCHR - --/* Define to 1 if you have the 'wmemcpy' function. */ -+/* Define to 1 if you have the `wmemcpy' function. */ - #undef HAVE_WMEMCPY - --/* Define to 1 if you have the 'wmempcpy' function. */ -+/* Define to 1 if you have the `wmempcpy' function. */ - #undef HAVE_WMEMPCPY - - /* Define to 1 if `fork' works. */ -@@ -2464,19 +2526,26 @@ - /* Define to 1 if you have the `_ftelli64' function. */ - #undef HAVE__FTELLI64 - --/* Define to 1 if you have the `_ftime' function. */ --#undef HAVE__FTIME -- - /* Define to 1 if you have the `_getpty' function. */ - #undef HAVE__GETPTY - --/* Define to 1 if you have the '_set_invalid_parameter_handler' function. */ -+/* Define to 1 if you have the `_set_invalid_parameter_handler' function. */ - #undef HAVE__SET_INVALID_PARAMETER_HANDLER - -+/* Define to 1 if the compiler supports __builtin_expect, -+ and to 2 if does. */ -+#undef HAVE___BUILTIN_EXPECT -+#ifndef HAVE___BUILTIN_EXPECT -+# define __builtin_expect(e, c) (e) -+#elif HAVE___BUILTIN_EXPECT == 2 -+# include -+#endif -+ -+ - /* Define to 1 if you have the `__check_rhosts_file' function. */ - #undef HAVE___CHECK_RHOSTS_FILE - --/* Define to 1 if you have the '__fsetlocking' function. */ -+/* Define to 1 if you have the `__fsetlocking' function. */ - #undef HAVE___FSETLOCKING - - /* Define to 1 if you have the `__opendir2' function. */ -@@ -2541,6 +2610,12 @@ - /* Define if the mbrtowc function returns a wrong return value. */ - #undef MBRTOWC_RETVAL_BUG - -+/* Use GNU style printf and scanf. */ -+#ifndef __USE_MINGW_ANSI_STDIO -+# undef __USE_MINGW_ANSI_STDIO -+#endif -+ -+ - /* Define to 1 if open() fails to recognize a trailing slash. */ - #undef OPEN_TRAILING_SLASH_BUG - -@@ -2585,13 +2660,12 @@ - 'ptrdiff_t'. */ - #undef PTRDIFF_T_SUFFIX - -+/* Define to 1 if gnulib's dirfd() replacement is used. */ -+#undef REPLACE_DIRFD -+ - /* Define to 1 if gnulib's fchdir() replacement is used. */ - #undef REPLACE_FCHDIR - --/* Define to 1 if stat needs help when passed a directory name with a trailing -- slash */ --#undef REPLACE_FUNC_STAT_DIR -- - /* Define to 1 if stat needs help when passed a file name with a trailing - slash */ - #undef REPLACE_FUNC_STAT_FILE -@@ -2698,7 +2772,7 @@ - #ifndef _ALL_SOURCE - # undef _ALL_SOURCE - #endif --/* Enable general extensions on OS X. */ -+/* Enable general extensions on macOS. */ - #ifndef _DARWIN_C_SOURCE - # undef _DARWIN_C_SOURCE - #endif -@@ -2706,14 +2780,38 @@ - #ifndef _GNU_SOURCE - # undef _GNU_SOURCE - #endif --/* Use GNU style printf and scanf. */ --#ifndef __USE_MINGW_ANSI_STDIO --# undef __USE_MINGW_ANSI_STDIO --#endif - /* Enable threading extensions on Solaris. */ - #ifndef _POSIX_PTHREAD_SEMANTICS - # undef _POSIX_PTHREAD_SEMANTICS - #endif -+/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ -+#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ -+# undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ -+#endif -+/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ -+#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ -+# undef __STDC_WANT_IEC_60559_BFP_EXT__ -+#endif -+/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ -+#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ -+# undef __STDC_WANT_IEC_60559_DFP_EXT__ -+#endif -+/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ -+#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ -+# undef __STDC_WANT_IEC_60559_FUNCS_EXT__ -+#endif -+/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ -+#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ -+# undef __STDC_WANT_IEC_60559_TYPES_EXT__ -+#endif -+/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ -+#ifndef __STDC_WANT_LIB_EXT2__ -+# undef __STDC_WANT_LIB_EXT2__ -+#endif -+/* Enable extensions specified by ISO/IEC 24747:2009. */ -+#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ -+# undef __STDC_WANT_MATH_SPEC_FUNCS__ -+#endif - /* Enable extensions on HP NonStop. */ - #ifndef _TANDEM_SOURCE - # undef _TANDEM_SOURCE -@@ -2733,6 +2831,9 @@ - /* Define if the native Windows multithreading API can be used. */ - #undef USE_WINDOWS_THREADS - -+/* FIXME */ -+#undef UTMPX -+ - /* Version number of package */ - #undef VERSION - -@@ -2804,10 +2905,6 @@ - /* Number of bits in a file offset, on hosts where this is settable. */ - #undef _FILE_OFFSET_BITS - --/* Define to 1 if Gnulib overrides 'struct stat' on Windows so that struct -- stat.st_size becomes 64-bit. */ --#undef _GL_WINDOWS_64_BIT_ST_SIZE -- - /* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ - #undef _LARGEFILE_SOURCE - -@@ -2859,6 +2956,12 @@ - used. */ - #undef __GETOPT_PREFIX - -+/* Define to 1 if the system predates C++11. */ -+#undef __STDC_CONSTANT_MACROS -+ -+/* Define to 1 if the system predates C++11. */ -+#undef __STDC_LIMIT_MACROS -+ - /* Define to empty if `const' does not conform to ANSI C. */ - #undef const - -@@ -2908,6 +3011,7 @@ - ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ - : (199901L <= __STDC_VERSION__ \ - && !defined __HP_cc \ -+ && !defined __PGI \ - && !(defined __SUNPRO_C && __STDC__))) \ - && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) - # define _GL_INLINE inline -diff -durN inetutils-1.9.4.orig/configure inetutils-1.9.4/configure ---- inetutils-1.9.4.orig/configure 2015-06-09 15:53:47.000000000 +0800 -+++ inetutils-1.9.4/configure 2017-05-15 17:57:58.015625000 +0800 -@@ -623,11 +623,10 @@ - #endif" - - gl_use_threads_default= --gl_func_list= --gl_header_list= -+ac_func_list= -+ac_header_list= - gl_fnmatch_required=POSIX - gl_getopt_required=POSIX --gl_getopt_required=POSIX - ac_subst_vars='gltests_LTLIBOBJS - gltests_LIBOBJS - gl_LTLIBOBJS -@@ -684,6 +683,7 @@ - GNULIB_ISWCTYPE - GNULIB_WCTYPE - GNULIB_ISWBLANK -+HAVE_CRTDEFS_H - HAVE_WINT_T - NEXT_AS_FIRST_DIRECTIVE_WCHAR_H - NEXT_WCHAR_H -@@ -696,21 +696,6 @@ - TIME_H_DEFINES_STRUCT_TIMESPEC - NEXT_AS_FIRST_DIRECTIVE_TIME_H - NEXT_TIME_H --REPLACE_LOCALTIME --REPLACE_GMTIME --REPLACE_TIMEGM --REPLACE_NANOSLEEP --REPLACE_MKTIME --REPLACE_LOCALTIME_R --HAVE_TIMEGM --HAVE_STRPTIME --HAVE_NANOSLEEP --HAVE_DECL_LOCALTIME_R --GNULIB_TIME_R --GNULIB_TIMEGM --GNULIB_STRPTIME --GNULIB_NANOSLEEP --GNULIB_MKTIME - NEXT_AS_FIRST_DIRECTIVE_TERMIOS_H - NEXT_TERMIOS_H - HAVE_TERMIOS_H -@@ -744,6 +729,9 @@ - GL_GENERATE_STDINT_H_FALSE - GL_GENERATE_STDINT_H_TRUE - STDINT_H -+HAVE_SYS_INTTYPES_H -+HAVE_SYS_BITYPES_H -+HAVE_C99_STDINT_H - WINT_T_SUFFIX - WCHAR_T_SUFFIX - SIG_ATOMIC_T_SUFFIX -@@ -757,8 +745,6 @@ - BITSIZEOF_SIG_ATOMIC_T - BITSIZEOF_SIZE_T - BITSIZEOF_PTRDIFF_T --HAVE_SYS_BITYPES_H --HAVE_SYS_INTTYPES_H - HAVE_STDINT_H - NEXT_AS_FIRST_DIRECTIVE_STDINT_H - NEXT_STDINT_H -@@ -767,6 +753,7 @@ - HAVE_WCHAR_H - HAVE_UNSIGNED_LONG_LONG_INT - HAVE_LONG_LONG_INT -+GNULIB_OVERRIDES_WINT_T - HAVE__BOOL - GL_GENERATE_STDBOOL_H_FALSE - GL_GENERATE_STDBOOL_H_TRUE -@@ -928,6 +915,7 @@ - HAVE_RANDOM_R - HAVE_RANDOM_H - HAVE_RANDOM -+HAVE_QSORT_R - HAVE_PTSNAME_R - HAVE_PTSNAME - HAVE_POSIX_OPENPT -@@ -1003,6 +991,11 @@ - GNULIB_LOCALECONV - LOCALCHARSET_TESTS_ENVIRONMENT - GLIBC21 -+GL_GENERATE_LIMITS_H_FALSE -+GL_GENERATE_LIMITS_H_TRUE -+LIMITS_H -+NEXT_AS_FIRST_DIRECTIVE_LIMITS_H -+NEXT_LIMITS_H - HAVE_LANGINFO_YESEXPR - HAVE_LANGINFO_ERA - HAVE_LANGINFO_T_FMT_AMPM -@@ -1013,10 +1006,34 @@ - REPLACE_NL_LANGINFO - HAVE_NL_LANGINFO - GNULIB_NL_LANGINFO --HAVE_SYS_CDEFS_H - GL_GENERATE_GLOB_H_FALSE - GL_GENERATE_GLOB_H_TRUE - GLOB_H -+REPLACE_LOCALTIME -+REPLACE_GMTIME -+REPLACE_TZSET -+REPLACE_TIMEGM -+REPLACE_STRFTIME -+REPLACE_NANOSLEEP -+REPLACE_MKTIME -+REPLACE_LOCALTIME_R -+REPLACE_CTIME -+HAVE_TIMEZONE_T -+HAVE_TZSET -+HAVE_TIMEGM -+HAVE_STRPTIME -+HAVE_NANOSLEEP -+HAVE_DECL_LOCALTIME_R -+GNULIB_TZSET -+GNULIB_TIME_RZ -+GNULIB_TIME_R -+GNULIB_TIMEGM -+GNULIB_STRPTIME -+GNULIB_STRFTIME -+GNULIB_NANOSLEEP -+GNULIB_LOCALTIME -+GNULIB_MKTIME -+GNULIB_CTIME - NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H - NEXT_SYS_TIME_H - REPLACE_STRUCT_TIMEVAL -@@ -1028,10 +1045,13 @@ - LTLIBINTL - LIBINTL - GNULIB_GL_UNISTD_H_GETOPT -+GETOPT_CDEFS_H - GETOPT_H -+HAVE_SYS_CDEFS_H - HAVE_GETOPT_H - NEXT_AS_FIRST_DIRECTIVE_GETOPT_H - NEXT_GETOPT_H -+LIB_GETLOGIN - GETHOSTNAME_LIB - GETADDRINFO_LIB - INET_NTOP_LIB -@@ -1071,6 +1091,7 @@ - GNULIB_CONNECT - GNULIB_SOCKET - WINDOWS_64_BIT_ST_SIZE -+WINDOWS_STAT_TIMESPEC - NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H - NEXT_SYS_STAT_H - REPLACE_UTIMENSAT -@@ -1093,6 +1114,7 @@ - HAVE_FUTIMENS - HAVE_FSTATAT - HAVE_FCHMODAT -+GNULIB_OVERRIDES_STRUCT_STAT - GNULIB_UTIMENSAT - GNULIB_STAT - GNULIB_MKNODAT -@@ -1106,6 +1128,7 @@ - GNULIB_FSTATAT - GNULIB_FSTAT - GNULIB_FCHMODAT -+WINDOWS_STAT_INODES - WINDOWS_64_BIT_OFF_T - NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H - NEXT_SYS_TYPES_H -@@ -1293,6 +1316,7 @@ - REPLACE_UNLINKAT - REPLACE_UNLINK - REPLACE_TTYNAME_R -+REPLACE_TRUNCATE - REPLACE_SYMLINKAT - REPLACE_SYMLINK - REPLACE_SLEEP -@@ -1326,12 +1350,14 @@ - HAVE_DECL_GETUSERSHELL - HAVE_DECL_GETPAGESIZE - HAVE_DECL_GETLOGIN_R -+HAVE_DECL_GETLOGIN - HAVE_DECL_GETDOMAINNAME - HAVE_DECL_FDATASYNC - HAVE_DECL_FCHDIR - HAVE_DECL_ENVIRON - HAVE_USLEEP - HAVE_UNLINKAT -+HAVE_TRUNCATE - HAVE_SYMLINKAT - HAVE_SYMLINK - HAVE_SLEEP -@@ -1368,6 +1394,7 @@ - GNULIB_UNISTD_H_SIGPIPE - GNULIB_UNISTD_H_NONBLOCKING - GNULIB_TTYNAME_R -+GNULIB_TRUNCATE - GNULIB_SYMLINKAT - GNULIB_SYMLINK - GNULIB_SLEEP -@@ -1410,6 +1437,7 @@ - GNULIB_CHOWN - GNULIB_CHDIR - LOCALE_FR -+REPLACE_WCSFTIME - REPLACE_WCSWIDTH - REPLACE_WCWIDTH - REPLACE_WCSNRTOMBS -@@ -1425,6 +1453,7 @@ - REPLACE_MBSTATE_T - HAVE_DECL_WCWIDTH - HAVE_DECL_WCTOB -+HAVE_WCSFTIME - HAVE_WCSWIDTH - HAVE_WCSTOK - HAVE_WCSSTR -@@ -1462,6 +1491,7 @@ - HAVE_MBRTOWC - HAVE_MBSINIT - HAVE_BTOWC -+GNULIB_WCSFTIME - GNULIB_WCSWIDTH - GNULIB_WCSTOK - GNULIB_WCSSTR -@@ -1532,9 +1562,9 @@ - NETSTAT - MKTEMP - DD --ac_ct_AR - RANLIB - ARFLAGS -+ac_ct_AR - AR - EGREP - GREP -@@ -3644,87 +3674,95 @@ - >$cache_file - fi - --gl_func_list="$gl_func_list flockfile" --gl_func_list="$gl_func_list funlockfile" --gl_header_list="$gl_header_list features.h" --gl_header_list="$gl_header_list linewrap.h" --gl_header_list="$gl_header_list arpa/inet.h" --gl_func_list="$gl_func_list btowc" --gl_header_list="$gl_header_list unistd.h" --gl_header_list="$gl_header_list sys/param.h" --gl_func_list="$gl_func_list _set_invalid_parameter_handler" --gl_header_list="$gl_header_list sys/socket.h" --gl_func_list="$gl_func_list fchdir" --gl_header_list="$gl_header_list dirent.h" --gl_func_list="$gl_func_list fcntl" --gl_func_list="$gl_func_list symlink" --gl_func_list="$gl_func_list fdopendir" --gl_func_list="$gl_func_list mempcpy" --gl_func_list="$gl_func_list isblank" --gl_func_list="$gl_func_list iswctype" --gl_func_list="$gl_func_list mbsrtowcs" --gl_func_list="$gl_func_list wmemchr" --gl_func_list="$gl_func_list wmemcpy" --gl_func_list="$gl_func_list wmempcpy" --gl_header_list="$gl_header_list wctype.h" --gl_header_list="$gl_header_list pty.h" --gl_header_list="$gl_header_list sys/stat.h" --gl_func_list="$gl_func_list fstatat" --gl_header_list="$gl_header_list netdb.h" --gl_header_list="$gl_header_list netinet/in.h" --gl_func_list="$gl_func_list getdelim" --gl_func_list="$gl_func_list getdtablesize" --gl_func_list="$gl_func_list getlogin_r" -+as_fn_append ac_func_list " flockfile" -+as_fn_append ac_func_list " funlockfile" -+as_fn_append ac_header_list " features.h" -+as_fn_append ac_header_list " linewrap.h" -+as_fn_append ac_header_list " arpa/inet.h" -+as_fn_append ac_func_list " btowc" -+as_fn_append ac_header_list " unistd.h" -+as_fn_append ac_header_list " sys/param.h" -+as_fn_append ac_func_list " _set_invalid_parameter_handler" -+as_fn_append ac_header_list " sys/socket.h" -+as_fn_append ac_func_list " fchdir" -+as_fn_append ac_header_list " dirent.h" -+as_fn_append ac_func_list " fcntl" -+as_fn_append ac_func_list " symlink" -+as_fn_append ac_func_list " fdopendir" -+as_fn_append ac_func_list " mempcpy" -+as_fn_append ac_func_list " isblank" -+as_fn_append ac_func_list " iswctype" -+as_fn_append ac_func_list " mbsrtowcs" -+as_fn_append ac_func_list " wmemchr" -+as_fn_append ac_func_list " wmemcpy" -+as_fn_append ac_func_list " wmempcpy" -+as_fn_append ac_header_list " wctype.h" -+as_fn_append ac_header_list " pty.h" -+as_fn_append ac_header_list " sys/stat.h" -+as_fn_append ac_func_list " fstatat" -+as_fn_append ac_header_list " netdb.h" -+as_fn_append ac_header_list " netinet/in.h" -+as_fn_append ac_func_list " getdelim" -+as_fn_append ac_func_list " getdtablesize" -+as_fn_append ac_func_list " getlogin_r" - gl_getopt_required=GNU --gl_header_list="$gl_header_list getopt.h" --gl_header_list="$gl_header_list stdio_ext.h" --gl_header_list="$gl_header_list termios.h" --gl_func_list="$gl_func_list __fsetlocking" --gl_func_list="$gl_func_list tcgetattr" --gl_func_list="$gl_func_list tcsetattr" --gl_header_list="$gl_header_list sys/time.h" --gl_func_list="$gl_func_list gettimeofday" --gl_header_list="$gl_header_list grp.h" --gl_func_list="$gl_func_list getusershell" --gl_header_list="$gl_header_list sys/cdefs.h" --gl_func_list="$gl_func_list getpwnam_r" --gl_header_list="$gl_header_list langinfo.h" --gl_header_list="$gl_header_list xlocale.h" --gl_func_list="$gl_func_list lstat" --gl_func_list="$gl_func_list mbsinit" --gl_func_list="$gl_func_list mbrtowc" --gl_header_list="$gl_header_list sys/mman.h" --gl_func_list="$gl_func_list mprotect" --gl_func_list="$gl_func_list getgrouplist" --gl_func_list="$gl_func_list mkstemp" --gl_func_list="$gl_func_list nl_langinfo" --gl_func_list="$gl_func_list openat" --gl_header_list="$gl_header_list poll.h" --gl_header_list="$gl_header_list sys/ioctl.h" --gl_header_list="$gl_header_list sys/filio.h" --gl_func_list="$gl_func_list posix_openpt" --gl_header_list="$gl_header_list utmp.h" --gl_header_list="$gl_header_list utmpx.h" --gl_func_list="$gl_func_list utmpname" --gl_func_list="$gl_func_list utmpxname" --gl_header_list="$gl_header_list malloc.h" --gl_func_list="$gl_func_list secure_getenv" --gl_header_list="$gl_header_list sys/select.h" --gl_func_list="$gl_func_list setenv" --gl_func_list="$gl_func_list sleep" --gl_func_list="$gl_func_list snprintf" --gl_header_list="$gl_header_list wchar.h" --gl_header_list="$gl_header_list stdint.h" --gl_func_list="$gl_func_list strdup" --gl_header_list="$gl_header_list strings.h" --gl_func_list="$gl_func_list strndup" --gl_header_list="$gl_header_list sys/uio.h" --gl_header_list="$gl_header_list sysexits.h" --gl_func_list="$gl_func_list pipe" --gl_func_list="$gl_func_list vasnprintf" --gl_func_list="$gl_func_list wcrtomb" --gl_func_list="$gl_func_list iswcntrl" --gl_header_list="$gl_header_list stdlib.h" -+as_fn_append ac_header_list " getopt.h" -+as_fn_append ac_header_list " sys/cdefs.h" -+as_fn_append ac_header_list " stdio_ext.h" -+as_fn_append ac_header_list " termios.h" -+as_fn_append ac_func_list " __fsetlocking" -+as_fn_append ac_func_list " tcgetattr" -+as_fn_append ac_func_list " tcsetattr" -+as_fn_append ac_func_list " getprogname" -+as_fn_append ac_func_list " getexecname" -+as_fn_append ac_header_list " sys/time.h" -+as_fn_append ac_func_list " gettimeofday" -+as_fn_append ac_header_list " grp.h" -+as_fn_append ac_func_list " getusershell" -+as_fn_append ac_func_list " getpwnam_r" -+as_fn_append ac_header_list " langinfo.h" -+as_fn_append ac_header_list " limits.h" -+as_fn_append ac_header_list " xlocale.h" -+as_fn_append ac_func_list " lstat" -+as_fn_append ac_func_list " mbsinit" -+as_fn_append ac_func_list " mbrtowc" -+as_fn_append ac_header_list " sys/mman.h" -+as_fn_append ac_func_list " mprotect" -+as_fn_append ac_func_list " getgrouplist" -+as_fn_append ac_func_list " mkstemp" -+as_fn_append ac_func_list " nl_langinfo" -+as_fn_append ac_func_list " openat" -+as_fn_append ac_header_list " poll.h" -+as_fn_append ac_header_list " sys/ioctl.h" -+as_fn_append ac_header_list " sys/filio.h" -+as_fn_append ac_func_list " posix_openpt" -+as_fn_append ac_header_list " utmp.h" -+as_fn_append ac_header_list " utmpx.h" -+as_fn_append ac_func_list " utmpname" -+as_fn_append ac_func_list " utmpxname" -+as_fn_append ac_header_list " malloc.h" -+as_fn_append ac_func_list " secure_getenv" -+as_fn_append ac_func_list " getuid" -+as_fn_append ac_func_list " geteuid" -+as_fn_append ac_func_list " getgid" -+as_fn_append ac_func_list " getegid" -+as_fn_append ac_header_list " sys/select.h" -+as_fn_append ac_func_list " setenv" -+as_fn_append ac_func_list " sleep" -+as_fn_append ac_func_list " snprintf" -+as_fn_append ac_header_list " wchar.h" -+as_fn_append ac_header_list " stdint.h" -+as_fn_append ac_func_list " strdup" -+as_fn_append ac_header_list " strings.h" -+as_fn_append ac_func_list " strndup" -+as_fn_append ac_header_list " sys/uio.h" -+as_fn_append ac_header_list " sysexits.h" -+as_fn_append ac_func_list " pipe" -+as_fn_append ac_func_list " vasnprintf" -+as_fn_append ac_header_list " crtdefs.h" -+as_fn_append ac_func_list " wcrtomb" -+as_fn_append ac_func_list " iswcntrl" -+as_fn_append ac_header_list " stdlib.h" - # Check that the precious variables saved in the cache have kept the same - # value. - ac_cache_corrupted=false -@@ -4583,7 +4621,7 @@ - fi - - if test "$enable_ftpd" = yes; then -- ftpd_BUILD=ftpd -+ ftpd_BUILD=ftpd\$\(EXEEXT\) - ftpd_INSTALL_HOOK="install-ftpd-hook" - else - ftpd_BUILD='' -@@ -4610,7 +4648,7 @@ - fi - - if test "$enable_inetd" = yes; then -- inetd_BUILD=inetd -+ inetd_BUILD=inetd\$\(EXEEXT\) - inetd_INSTALL_HOOK="install-inetd-hook" - else - inetd_BUILD='' -@@ -4637,7 +4675,7 @@ - fi - - if test "$enable_rexecd" = yes; then -- rexecd_BUILD=rexecd -+ rexecd_BUILD=rexecd\$\(EXEEXT\) - rexecd_INSTALL_HOOK="install-rexecd-hook" - else - rexecd_BUILD='' -@@ -4664,7 +4702,7 @@ - fi - - if test "$enable_rlogind" = yes; then -- rlogind_BUILD=rlogind -+ rlogind_BUILD=rlogind\$\(EXEEXT\) - rlogind_INSTALL_HOOK="install-rlogind-hook" - else - rlogind_BUILD='' -@@ -4691,7 +4729,7 @@ - fi - - if test "$enable_rshd" = yes; then -- rshd_BUILD=rshd -+ rshd_BUILD=rshd\$\(EXEEXT\) - rshd_INSTALL_HOOK="install-rshd-hook" - else - rshd_BUILD='' -@@ -4718,7 +4756,7 @@ - fi - - if test "$enable_syslogd" = yes; then -- syslogd_BUILD=syslogd -+ syslogd_BUILD=syslogd\$\(EXEEXT\) - syslogd_INSTALL_HOOK="install-syslogd-hook" - else - syslogd_BUILD='' -@@ -4745,7 +4783,7 @@ - fi - - if test "$enable_talkd" = yes; then -- talkd_BUILD=talkd -+ talkd_BUILD=talkd\$\(EXEEXT\) - talkd_INSTALL_HOOK="install-talkd-hook" - else - talkd_BUILD='' -@@ -4772,7 +4810,7 @@ - fi - - if test "$enable_telnetd" = yes; then -- telnetd_BUILD=telnetd -+ telnetd_BUILD=telnetd\$\(EXEEXT\) - telnetd_INSTALL_HOOK="install-telnetd-hook" - else - telnetd_BUILD='' -@@ -4799,7 +4837,7 @@ - fi - - if test "$enable_tftpd" = yes; then -- tftpd_BUILD=tftpd -+ tftpd_BUILD=tftpd\$\(EXEEXT\) - tftpd_INSTALL_HOOK="install-tftpd-hook" - else - tftpd_BUILD='' -@@ -4826,7 +4864,7 @@ - fi - - if test "$enable_uucpd" = yes; then -- uucpd_BUILD=uucpd -+ uucpd_BUILD=uucpd\$\(EXEEXT\) - uucpd_INSTALL_HOOK="install-uucpd-hook" - else - uucpd_BUILD='' -@@ -4854,7 +4892,7 @@ - fi - - if test "$enable_ftp" = yes; then -- ftp_BUILD=ftp -+ ftp_BUILD=ftp\$\(EXEEXT\) - ftp_INSTALL_HOOK="install-ftp-hook" - else - ftp_BUILD='' -@@ -4881,7 +4919,7 @@ - fi - - if test "$enable_dnsdomainname" = yes; then -- dnsdomainname_BUILD=dnsdomainname -+ dnsdomainname_BUILD=dnsdomainname\$\(EXEEXT\) - dnsdomainname_INSTALL_HOOK="install-dnsdomainname-hook" - else - dnsdomainname_BUILD='' -@@ -4908,7 +4946,7 @@ - fi - - if test "$enable_hostname" = yes; then -- hostname_BUILD=hostname -+ hostname_BUILD=hostname\$\(EXEEXT\) - hostname_INSTALL_HOOK="install-hostname-hook" - else - hostname_BUILD='' -@@ -4935,7 +4973,7 @@ - fi - - if test "$enable_ping" = yes; then -- ping_BUILD=ping -+ ping_BUILD=ping\$\(EXEEXT\) - ping_INSTALL_HOOK="install-ping-hook" - else - ping_BUILD='' -@@ -4962,7 +5000,7 @@ - fi - - if test "$enable_ping6" = yes; then -- ping6_BUILD=ping6 -+ ping6_BUILD=ping6\$\(EXEEXT\) - ping6_INSTALL_HOOK="install-ping6-hook" - else - ping6_BUILD='' -@@ -4989,7 +5027,7 @@ - fi - - if test "$enable_rcp" = yes; then -- rcp_BUILD=rcp -+ rcp_BUILD=rcp\$\(EXEEXT\) - rcp_INSTALL_HOOK="install-rcp-hook" - else - rcp_BUILD='' -@@ -5016,7 +5054,7 @@ - fi - - if test "$enable_rexec" = yes; then -- rexec_BUILD=rexec -+ rexec_BUILD=rexec\$\(EXEEXT\) - rexec_INSTALL_HOOK="install-rexec-hook" - else - rexec_BUILD='' -@@ -5043,7 +5081,7 @@ - fi - - if test "$enable_rlogin" = yes; then -- rlogin_BUILD=rlogin -+ rlogin_BUILD=rlogin\$\(EXEEXT\) - rlogin_INSTALL_HOOK="install-rlogin-hook" - else - rlogin_BUILD='' -@@ -5070,7 +5108,7 @@ - fi - - if test "$enable_rsh" = yes; then -- rsh_BUILD=rsh -+ rsh_BUILD=rsh\$\(EXEEXT\) - rsh_INSTALL_HOOK="install-rsh-hook" - else - rsh_BUILD='' -@@ -5097,7 +5135,7 @@ - fi - - if test "$enable_logger" = yes; then -- logger_BUILD=logger -+ logger_BUILD=logger\$\(EXEEXT\) - logger_INSTALL_HOOK="install-logger-hook" - else - logger_BUILD='' -@@ -5124,7 +5162,7 @@ - fi - - if test "$enable_talk" = yes; then -- talk_BUILD=talk -+ talk_BUILD=talk\$\(EXEEXT\) - talk_INSTALL_HOOK="install-talk-hook" - else - talk_BUILD='' -@@ -5151,7 +5189,7 @@ - fi - - if test "$enable_telnet" = yes; then -- telnet_BUILD=telnet -+ telnet_BUILD=telnet\$\(EXEEXT\) - telnet_INSTALL_HOOK="install-telnet-hook" - else - telnet_BUILD='' -@@ -5178,7 +5216,7 @@ - fi - - if test "$enable_tftp" = yes; then -- tftp_BUILD=tftp -+ tftp_BUILD=tftp\$\(EXEEXT\) - tftp_INSTALL_HOOK="install-tftp-hook" - else - tftp_BUILD='' -@@ -5205,7 +5243,7 @@ - fi - - if test "$enable_whois" = yes; then -- whois_BUILD=whois -+ whois_BUILD=whois\$\(EXEEXT\) - whois_INSTALL_HOOK="install-whois-hook" - else - whois_BUILD='' -@@ -5232,7 +5270,7 @@ - fi - - if test "$enable_ifconfig" = yes; then -- ifconfig_BUILD=ifconfig -+ ifconfig_BUILD=ifconfig\$\(EXEEXT\) - ifconfig_INSTALL_HOOK="install-ifconfig-hook" - else - ifconfig_BUILD='' -@@ -5259,7 +5297,7 @@ - fi - - if test "$enable_traceroute" = yes; then -- traceroute_BUILD=traceroute -+ traceroute_BUILD=traceroute\$\(EXEEXT\) - traceroute_INSTALL_HOOK="install-traceroute-hook" - else - traceroute_BUILD='' -@@ -7411,245 +7449,6 @@ - EGREP="$ac_cv_path_EGREP" - - -- -- -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5 --$as_echo_n "checking for Minix Amsterdam compiler... " >&6; } --if ${gl_cv_c_amsterdam_compiler+:} false; then : -- $as_echo_n "(cached) " >&6 --else -- -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ -- --#ifdef __ACK__ --Amsterdam --#endif -- --_ACEOF --if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -- $EGREP "Amsterdam" >/dev/null 2>&1; then : -- gl_cv_c_amsterdam_compiler=yes --else -- gl_cv_c_amsterdam_compiler=no --fi --rm -f conftest* -- -- --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5 --$as_echo "$gl_cv_c_amsterdam_compiler" >&6; } -- if test -z "$AR"; then -- if test $gl_cv_c_amsterdam_compiler = yes; then -- AR='cc -c.a' -- if test -z "$ARFLAGS"; then -- ARFLAGS='-o' -- fi -- else -- if test -n "$ac_tool_prefix"; then -- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. --set dummy ${ac_tool_prefix}ar; ac_word=$2 --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 --$as_echo_n "checking for $ac_word... " >&6; } --if ${ac_cv_prog_AR+:} false; then : -- $as_echo_n "(cached) " >&6 --else -- if test -n "$AR"; then -- ac_cv_prog_AR="$AR" # Let the user override the test. --else --as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in $PATH --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -- ac_cv_prog_AR="${ac_tool_prefix}ar" -- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -- break 2 -- fi --done -- done --IFS=$as_save_IFS -- --fi --fi --AR=$ac_cv_prog_AR --if test -n "$AR"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 --$as_echo "$AR" >&6; } --else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } --fi -- -- --fi --if test -z "$ac_cv_prog_AR"; then -- ac_ct_AR=$AR -- # Extract the first word of "ar", so it can be a program name with args. --set dummy ar; ac_word=$2 --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 --$as_echo_n "checking for $ac_word... " >&6; } --if ${ac_cv_prog_ac_ct_AR+:} false; then : -- $as_echo_n "(cached) " >&6 --else -- if test -n "$ac_ct_AR"; then -- ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. --else --as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in $PATH --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -- ac_cv_prog_ac_ct_AR="ar" -- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -- break 2 -- fi --done -- done --IFS=$as_save_IFS -- --fi --fi --ac_ct_AR=$ac_cv_prog_ac_ct_AR --if test -n "$ac_ct_AR"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 --$as_echo "$ac_ct_AR" >&6; } --else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } --fi -- -- if test "x$ac_ct_AR" = x; then -- AR="ar" -- else -- case $cross_compiling:$ac_tool_warned in --yes:) --{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 --$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} --ac_tool_warned=yes ;; --esac -- AR=$ac_ct_AR -- fi --else -- AR="$ac_cv_prog_AR" --fi -- -- if test -z "$ARFLAGS"; then -- ARFLAGS='cru' -- fi -- fi -- else -- if test -z "$ARFLAGS"; then -- ARFLAGS='cru' -- fi -- fi -- -- -- if test -z "$RANLIB"; then -- if test $gl_cv_c_amsterdam_compiler = yes; then -- RANLIB=':' -- else -- if test -n "$ac_tool_prefix"; then -- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. --set dummy ${ac_tool_prefix}ranlib; ac_word=$2 --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 --$as_echo_n "checking for $ac_word... " >&6; } --if ${ac_cv_prog_RANLIB+:} false; then : -- $as_echo_n "(cached) " >&6 --else -- if test -n "$RANLIB"; then -- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. --else --as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in $PATH --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" -- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -- break 2 -- fi --done -- done --IFS=$as_save_IFS -- --fi --fi --RANLIB=$ac_cv_prog_RANLIB --if test -n "$RANLIB"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 --$as_echo "$RANLIB" >&6; } --else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } --fi -- -- --fi --if test -z "$ac_cv_prog_RANLIB"; then -- ac_ct_RANLIB=$RANLIB -- # Extract the first word of "ranlib", so it can be a program name with args. --set dummy ranlib; ac_word=$2 --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 --$as_echo_n "checking for $ac_word... " >&6; } --if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : -- $as_echo_n "(cached) " >&6 --else -- if test -n "$ac_ct_RANLIB"; then -- ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. --else --as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in $PATH --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -- ac_cv_prog_ac_ct_RANLIB="ranlib" -- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -- break 2 -- fi --done -- done --IFS=$as_save_IFS -- --fi --fi --ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB --if test -n "$ac_ct_RANLIB"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 --$as_echo "$ac_ct_RANLIB" >&6; } --else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } --fi -- -- if test "x$ac_ct_RANLIB" = x; then -- RANLIB=":" -- else -- case $cross_compiling:$ac_tool_warned in --yes:) --{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 --$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} --ac_tool_warned=yes ;; --esac -- RANLIB=$ac_ct_RANLIB -- fi --else -- RANLIB="$ac_cv_prog_RANLIB" --fi -- -- fi -- fi -- -- -- - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 - $as_echo_n "checking for ANSI C header files... " >&6; } - if ${ac_cv_header_stdc+:} false; then : -@@ -7840,10 +7639,22 @@ - - $as_echo "#define _GNU_SOURCE 1" >>confdefs.h - -- $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h -- - $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h - -+ $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h -+ -+ $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h -+ -+ $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h -+ -+ $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h -+ -+ $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h -+ -+ $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h -+ -+ $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h -+ - $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5 -@@ -7901,6 +7712,416 @@ - - - -+ -+ -+ -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5 -+$as_echo_n "checking for Minix Amsterdam compiler... " >&6; } -+if ${gl_cv_c_amsterdam_compiler+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+#ifdef __ACK__ -+Amsterdam -+#endif -+ -+_ACEOF -+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -+ $EGREP "Amsterdam" >/dev/null 2>&1; then : -+ gl_cv_c_amsterdam_compiler=yes -+else -+ gl_cv_c_amsterdam_compiler=no -+fi -+rm -f conftest* -+ -+ -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5 -+$as_echo "$gl_cv_c_amsterdam_compiler" >&6; } -+ -+ if test $gl_cv_c_amsterdam_compiler = yes; then -+ if test -z "$AR"; then -+ AR='cc -c.a' -+ fi -+ if test -z "$ARFLAGS"; then -+ ARFLAGS='-o' -+ fi -+ else -+ if test -n "$ac_tool_prefix"; then -+ for ac_prog in ar lib "link -lib" -+ do -+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -+set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if ${ac_cv_prog_AR+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$AR"; then -+ ac_cv_prog_AR="$AR" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ ac_cv_prog_AR="$ac_tool_prefix$ac_prog" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+AR=$ac_cv_prog_AR -+if test -n "$AR"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -+$as_echo "$AR" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ -+ test -n "$AR" && break -+ done -+fi -+if test -z "$AR"; then -+ ac_ct_AR=$AR -+ for ac_prog in ar lib "link -lib" -+do -+ # Extract the first word of "$ac_prog", so it can be a program name with args. -+set dummy $ac_prog; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if ${ac_cv_prog_ac_ct_AR+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$ac_ct_AR"; then -+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ ac_cv_prog_ac_ct_AR="$ac_prog" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+ac_ct_AR=$ac_cv_prog_ac_ct_AR -+if test -n "$ac_ct_AR"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -+$as_echo "$ac_ct_AR" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ -+ test -n "$ac_ct_AR" && break -+done -+ -+ if test "x$ac_ct_AR" = x; then -+ AR="false" -+ else -+ case $cross_compiling:$ac_tool_warned in -+yes:) -+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -+ac_tool_warned=yes ;; -+esac -+ AR=$ac_ct_AR -+ fi -+fi -+ -+: ${AR=ar} -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5 -+$as_echo_n "checking the archiver ($AR) interface... " >&6; } -+if ${am_cv_ar_interface+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ ac_ext=c -+ac_cpp='$CPP $CPPFLAGS' -+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -+ac_compiler_gnu=$ac_cv_c_compiler_gnu -+ -+ am_cv_ar_interface=ar -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+int some_variable = 0; -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5' -+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 -+ (eval $am_ar_try) 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; } -+ if test "$ac_status" -eq 0; then -+ am_cv_ar_interface=ar -+ else -+ am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5' -+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 -+ (eval $am_ar_try) 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; } -+ if test "$ac_status" -eq 0; then -+ am_cv_ar_interface=lib -+ else -+ am_cv_ar_interface=unknown -+ fi -+ fi -+ rm -f conftest.lib libconftest.a -+ -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+ ac_ext=c -+ac_cpp='$CPP $CPPFLAGS' -+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -+ac_compiler_gnu=$ac_cv_c_compiler_gnu -+ -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5 -+$as_echo "$am_cv_ar_interface" >&6; } -+ -+case $am_cv_ar_interface in -+ar) -+ ;; -+lib) -+ # Microsoft lib, so override with the ar-lib wrapper script. -+ # FIXME: It is wrong to rewrite AR. -+ # But if we don't then we get into trouble of one sort or another. -+ # A longer-term fix would be to have automake use am__AR in this case, -+ # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something -+ # similar. -+ AR="$am_aux_dir/ar-lib $AR" -+ ;; -+unknown) -+ as_fn_error $? "could not determine $AR interface" "$LINENO" 5 -+ ;; -+esac -+ -+ fi -+ -+ if test -n "$ac_tool_prefix"; then -+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -+set dummy ${ac_tool_prefix}ar; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if ${ac_cv_prog_AR+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$AR"; then -+ ac_cv_prog_AR="$AR" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ ac_cv_prog_AR="${ac_tool_prefix}ar" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+AR=$ac_cv_prog_AR -+if test -n "$AR"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -+$as_echo "$AR" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ -+fi -+if test -z "$ac_cv_prog_AR"; then -+ ac_ct_AR=$AR -+ # Extract the first word of "ar", so it can be a program name with args. -+set dummy ar; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if ${ac_cv_prog_ac_ct_AR+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$ac_ct_AR"; then -+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ ac_cv_prog_ac_ct_AR="ar" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+ac_ct_AR=$ac_cv_prog_ac_ct_AR -+if test -n "$ac_ct_AR"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -+$as_echo "$ac_ct_AR" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ if test "x$ac_ct_AR" = x; then -+ AR="ar" -+ else -+ case $cross_compiling:$ac_tool_warned in -+yes:) -+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -+ac_tool_warned=yes ;; -+esac -+ AR=$ac_ct_AR -+ fi -+else -+ AR="$ac_cv_prog_AR" -+fi -+ -+ if test -z "$ARFLAGS"; then -+ ARFLAGS='cr' -+ fi -+ -+ -+ -+ if test -z "$RANLIB"; then -+ if test $gl_cv_c_amsterdam_compiler = yes; then -+ RANLIB=':' -+ else -+ if test -n "$ac_tool_prefix"; then -+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -+set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if ${ac_cv_prog_RANLIB+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$RANLIB"; then -+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+RANLIB=$ac_cv_prog_RANLIB -+if test -n "$RANLIB"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -+$as_echo "$RANLIB" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ -+fi -+if test -z "$ac_cv_prog_RANLIB"; then -+ ac_ct_RANLIB=$RANLIB -+ # Extract the first word of "ranlib", so it can be a program name with args. -+set dummy ranlib; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$ac_ct_RANLIB"; then -+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -+ ac_cv_prog_ac_ct_RANLIB="ranlib" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -+if test -n "$ac_ct_RANLIB"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -+$as_echo "$ac_ct_RANLIB" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ if test "x$ac_ct_RANLIB" = x; then -+ RANLIB=":" -+ else -+ case $cross_compiling:$ac_tool_warned in -+yes:) -+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -+ac_tool_warned=yes ;; -+esac -+ RANLIB=$ac_ct_RANLIB -+ fi -+else -+ RANLIB="$ac_cv_prog_RANLIB" -+fi -+ -+ fi -+ fi -+ -+ -+ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 - $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } - if ${ac_cv_sys_largefile_source+:} false; then : -@@ -8513,12 +8734,15 @@ - - - -+ # Pre-early section. -+ -+ -+ - - # Code from module absolute-header: - # Code from module alignof: - # Code from module alloca: - # Code from module alloca-opt: -- # Code from module announce-gen: - # Code from module argp: - # Code from module argp-version-etc: - # Code from module arpa_inet: -@@ -8559,6 +8783,7 @@ - fi - - # Code from module btowc: -+ # Code from module builtin-expect: - # Code from module chdir: - # Code from module chdir-long: - # Code from module cloexec: -@@ -8579,7 +8804,6 @@ - # Code from module error: - # Code from module exitfail: - # Code from module extensions: -- - # Code from module extern-inline: - # Code from module fchdir: - # Code from module fcntl: -@@ -8590,6 +8814,7 @@ - # Code from module filemode: - # Code from module filename: - # Code from module filenamecat-lgpl: -+ # Code from module flexmember: - # Code from module float: - # Code from module fnmatch: - # Code from module fopen: -@@ -8617,6 +8842,7 @@ - # Code from module getopt-gnu: - # Code from module getopt-posix: - # Code from module getpass: -+ # Code from module getprogname: - # Code from module gettext: - # Code from module gettext-h: - # Code from module gettimeofday: -@@ -8626,6 +8852,7 @@ - # Code from module glob: - # Code from module gnumakefile: - # Code from module gnupload: -+ # Code from module hard-locale: - # Code from module havelib: - # Code from module hostent: - # Code from module include_next: -@@ -8636,9 +8863,11 @@ - # Code from module langinfo: - # Code from module largefile: - -+ # Code from module limits-h: - # Code from module localcharset: - # Code from module locale: - # Code from module localeconv: -+ # Code from module localtime-buffer: - # Code from module lock: - # Code from module login_tty: - # Code from module lseek: -@@ -9886,8 +10115,7 @@ - ;; - esac - -- -- ac_fn_c_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default" -+ac_fn_c_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default" - if test "x$ac_cv_have_decl_clearerr_unlocked" = xyes; then : - ac_have_decl=1 - else -@@ -9898,9 +10126,7 @@ - #define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl - _ACEOF - -- -- -- ac_fn_c_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default" -+ac_fn_c_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default" - if test "x$ac_cv_have_decl_feof_unlocked" = xyes; then : - ac_have_decl=1 - else -@@ -9911,9 +10137,7 @@ - #define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl - _ACEOF - -- -- -- ac_fn_c_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default" -+ac_fn_c_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default" - if test "x$ac_cv_have_decl_ferror_unlocked" = xyes; then : - ac_have_decl=1 - else -@@ -9924,9 +10148,7 @@ - #define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl - _ACEOF - -- -- -- ac_fn_c_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default" -+ac_fn_c_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default" - if test "x$ac_cv_have_decl_fflush_unlocked" = xyes; then : - ac_have_decl=1 - else -@@ -9937,9 +10159,7 @@ - #define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl - _ACEOF - -- -- -- ac_fn_c_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default" -+ac_fn_c_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default" - if test "x$ac_cv_have_decl_fgets_unlocked" = xyes; then : - ac_have_decl=1 - else -@@ -9950,9 +10170,7 @@ - #define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl - _ACEOF - -- -- -- ac_fn_c_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default" -+ac_fn_c_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default" - if test "x$ac_cv_have_decl_fputc_unlocked" = xyes; then : - ac_have_decl=1 - else -@@ -9963,9 +10181,7 @@ - #define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl - _ACEOF - -- -- -- ac_fn_c_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default" -+ac_fn_c_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default" - if test "x$ac_cv_have_decl_fputs_unlocked" = xyes; then : - ac_have_decl=1 - else -@@ -9976,9 +10192,7 @@ - #define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl - _ACEOF - -- -- -- ac_fn_c_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default" -+ac_fn_c_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default" - if test "x$ac_cv_have_decl_fread_unlocked" = xyes; then : - ac_have_decl=1 - else -@@ -9989,9 +10203,7 @@ - #define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl - _ACEOF - -- -- -- ac_fn_c_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default" -+ac_fn_c_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default" - if test "x$ac_cv_have_decl_fwrite_unlocked" = xyes; then : - ac_have_decl=1 - else -@@ -10002,9 +10214,7 @@ - #define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl - _ACEOF - -- -- -- ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default" -+ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default" - if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then : - ac_have_decl=1 - else -@@ -10015,9 +10225,7 @@ - #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl - _ACEOF - -- -- -- ac_fn_c_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default" -+ac_fn_c_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default" - if test "x$ac_cv_have_decl_getchar_unlocked" = xyes; then : - ac_have_decl=1 - else -@@ -10028,9 +10236,7 @@ - #define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl - _ACEOF - -- -- -- ac_fn_c_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default" -+ac_fn_c_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default" - if test "x$ac_cv_have_decl_putc_unlocked" = xyes; then : - ac_have_decl=1 - else -@@ -10041,9 +10247,7 @@ - #define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl - _ACEOF - -- -- -- ac_fn_c_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default" -+ac_fn_c_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default" - if test "x$ac_cv_have_decl_putchar_unlocked" = xyes; then : - ac_have_decl=1 - else -@@ -10057,9 +10261,7 @@ - - - -- -- -- for ac_func in $gl_func_list -+ for ac_func in $ac_func_list - 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" -@@ -10078,33 +10280,115 @@ - - - -+ for ac_header in $ac_header_list -+do : -+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -+" -+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : -+ cat >>confdefs.h <<_ACEOF -+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -+_ACEOF - -+fi - -+done - - - - -- for ac_header in $gl_header_list -+ -+ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" -+if test "x$ac_cv_have_decl_strerror_r" = xyes; then : -+ ac_have_decl=1 -+else -+ ac_have_decl=0 -+fi -+ -+cat >>confdefs.h <<_ACEOF -+#define HAVE_DECL_STRERROR_R $ac_have_decl -+_ACEOF -+ -+for ac_func in strerror_r - do : -- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` --ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" --if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : -+ ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r" -+if test "x$ac_cv_func_strerror_r" = xyes; then : - cat >>confdefs.h <<_ACEOF --#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -+#define HAVE_STRERROR_R 1 - _ACEOF - - fi -- - done - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5 -+$as_echo_n "checking whether strerror_r returns char *... " >&6; } -+if ${ac_cv_func_strerror_r_char_p+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else - -+ ac_cv_func_strerror_r_char_p=no -+ if test $ac_cv_have_decl_strerror_r = yes; then -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+$ac_includes_default -+int -+main () -+{ - -+ char buf[100]; -+ char x = *strerror_r (0, buf, sizeof buf); -+ char *p = strerror_r (0, buf, sizeof buf); -+ return !p || x; - -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ ac_cv_func_strerror_r_char_p=yes -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+ else -+ # strerror_r is not declared. Choose between -+ # systems that have relatively inaccessible declarations for the -+ # function. BeOS and DEC UNIX 4.0 fall in this category, but the -+ # former has a strerror_r that returns char*, while the latter -+ # has a strerror_r that returns `int'. -+ # This test should segfault on the DEC system. -+ if test "$cross_compiling" = yes; then : -+ : -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+$ac_includes_default -+ extern char *strerror_r (); -+int -+main () -+{ -+char buf[100]; -+ char x = *strerror_r (0, buf, sizeof buf); -+ return ! isalpha (x); -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_run "$LINENO"; then : -+ ac_cv_func_strerror_r_char_p=yes -+fi -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -+ conftest.$ac_objext conftest.beam conftest.$ac_ext -+fi - -+ fi - -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5 -+$as_echo "$ac_cv_func_strerror_r_char_p" >&6; } -+if test $ac_cv_func_strerror_r_char_p = yes; then - -+$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h - -- -+fi - - - XGETTEXT_EXTRA_OPTIONS= -@@ -10121,9 +10405,6 @@ - - - -- -- -- - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 - $as_echo_n "checking whether the preprocessor supports include_next... " >&6; } - if ${gl_cv_have_include_next+:} false; then : -@@ -10238,12 +10519,6 @@ - - - -- : -- -- -- -- -- - if test $ac_cv_header_features_h = yes; then - HAVE_FEATURES_H=1 - else -@@ -10291,6 +10566,7 @@ - GNULIB_WCSSTR=0; - GNULIB_WCSTOK=0; - GNULIB_WCSWIDTH=0; -+ GNULIB_WCSFTIME=0; - HAVE_BTOWC=1; - HAVE_MBSINIT=1; - HAVE_MBRTOWC=1; -@@ -10328,6 +10604,7 @@ - HAVE_WCSSTR=1; - HAVE_WCSTOK=1; - HAVE_WCSWIDTH=1; -+ HAVE_WCSFTIME=1; - HAVE_DECL_WCTOB=1; - HAVE_DECL_WCWIDTH=1; - REPLACE_MBSTATE_T=0; -@@ -10343,6 +10620,7 @@ - REPLACE_WCSNRTOMBS=0; - REPLACE_WCWIDTH=0; - REPLACE_WCSWIDTH=0; -+ REPLACE_WCSFTIME=0; - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether uses 'inline' correctly" >&5 -@@ -10367,12 +10645,13 @@ - int main () { return zero(); } - - _ACEOF -+ save_ac_compile="$ac_compile" -+ ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/` - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then -- mv conftest.$ac_objext conftest1.$ac_objext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - -@@ -10388,12 +10667,12 @@ - int zero (void) { return 0; } - - _ACEOF -+ ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/` - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then -- mv conftest.$ac_objext conftest2.$ac_objext - if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then - : - else -@@ -10401,6 +10680,7 @@ - fi - fi - fi -+ ac_compile="$save_ac_compile" - rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext - - fi -@@ -10421,9 +10701,6 @@ - - - -- -- -- - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 - $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } - if ${am_cv_langinfo_codeset+:} false; then : -@@ -10634,6 +10911,7 @@ - GNULIB_SLEEP=0; - GNULIB_SYMLINK=0; - GNULIB_SYMLINKAT=0; -+ GNULIB_TRUNCATE=0; - GNULIB_TTYNAME_R=0; - GNULIB_UNISTD_H_NONBLOCKING=0; - GNULIB_UNISTD_H_SIGPIPE=0; -@@ -10670,12 +10948,14 @@ - HAVE_SLEEP=1; - HAVE_SYMLINK=1; - HAVE_SYMLINKAT=1; -+ HAVE_TRUNCATE=1; - HAVE_UNLINKAT=1; - HAVE_USLEEP=1; - HAVE_DECL_ENVIRON=1; - HAVE_DECL_FCHDIR=1; - HAVE_DECL_FDATASYNC=1; - HAVE_DECL_GETDOMAINNAME=1; -+ HAVE_DECL_GETLOGIN=1; - HAVE_DECL_GETLOGIN_R=1; - HAVE_DECL_GETPAGESIZE=1; - HAVE_DECL_GETUSERSHELL=1; -@@ -10709,6 +10989,7 @@ - REPLACE_SLEEP=0; - REPLACE_SYMLINK=0; - REPLACE_SYMLINKAT=0; -+ REPLACE_TRUNCATE=0; - REPLACE_TTYNAME_R=0; - REPLACE_UNLINK=0; - REPLACE_UNLINKAT=0; -@@ -10729,30 +11010,6 @@ - - - -- -- : -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- : -- -- -- -- -- - if test $ac_cv_func__set_invalid_parameter_handler = yes; then - HAVE_MSVC_INVALID_PARAMETER_HANDLER=1 - -@@ -10775,12 +11032,6 @@ - - - -- -- -- -- -- -- - GNULIB_OPENDIR=0; - GNULIB_READDIR=0; - GNULIB_REWINDDIR=0; -@@ -10807,9 +11058,6 @@ - - - -- -- -- - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5 - $as_echo_n "checking whether // is distinct from /... " >&6; } - if ${gl_cv_double_slash_root+:} false; then : -@@ -10852,12 +11100,6 @@ - - - -- : -- -- -- -- -- - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5 -@@ -11280,103 +11522,10 @@ - fi - - --ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" --if test "x$ac_cv_have_decl_strerror_r" = xyes; then : -- ac_have_decl=1 --else -- ac_have_decl=0 --fi - --cat >>confdefs.h <<_ACEOF --#define HAVE_DECL_STRERROR_R $ac_have_decl --_ACEOF - --for ac_func in strerror_r --do : -- ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r" --if test "x$ac_cv_func_strerror_r" = xyes; then : -- cat >>confdefs.h <<_ACEOF --#define HAVE_STRERROR_R 1 --_ACEOF - --fi --done -- --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5 --$as_echo_n "checking whether strerror_r returns char *... " >&6; } --if ${ac_cv_func_strerror_r_char_p+:} false; then : -- $as_echo_n "(cached) " >&6 --else -- -- ac_cv_func_strerror_r_char_p=no -- if test $ac_cv_have_decl_strerror_r = yes; then -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --$ac_includes_default --int --main () --{ -- -- char buf[100]; -- char x = *strerror_r (0, buf, sizeof buf); -- char *p = strerror_r (0, buf, sizeof buf); -- return !p || x; -- -- ; -- return 0; --} --_ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -- ac_cv_func_strerror_r_char_p=yes --fi --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -- else -- # strerror_r is not declared. Choose between -- # systems that have relatively inaccessible declarations for the -- # function. BeOS and DEC UNIX 4.0 fall in this category, but the -- # former has a strerror_r that returns char*, while the latter -- # has a strerror_r that returns `int'. -- # This test should segfault on the DEC system. -- if test "$cross_compiling" = yes; then : -- : --else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --$ac_includes_default -- extern char *strerror_r (); --int --main () --{ --char buf[100]; -- char x = *strerror_r (0, buf, sizeof buf); -- return ! isalpha (x); -- ; -- return 0; --} --_ACEOF --if ac_fn_c_try_run "$LINENO"; then : -- ac_cv_func_strerror_r_char_p=yes --fi --rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -- conftest.$ac_objext conftest.beam conftest.$ac_ext --fi -- -- fi -- --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5 --$as_echo "$ac_cv_func_strerror_r_char_p" >&6; } --if test $ac_cv_func_strerror_r_char_p = yes; then -- --$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h -- --fi -- -- -- -- -- -- ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default" -+ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default" - if test "x$ac_cv_have_decl_fchdir" = xyes; then : - ac_have_decl=1 - else -@@ -11388,7 +11537,6 @@ - _ACEOF - - -- - GNULIB_FCNTL=0; - GNULIB_NONBLOCKING=0; - GNULIB_OPEN=0; -@@ -11408,24 +11556,6 @@ - - - -- -- -- -- -- -- : -- -- -- -- -- -- -- : -- -- -- -- -- - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5 - $as_echo_n "checking for working fcntl.h... " >&6; } - if ${gl_cv_header_working_fcntl_h+:} false; then : -@@ -11591,9 +11721,6 @@ - - - -- -- -- - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5 - $as_echo_n "checking for st_dm_mode in struct stat... " >&6; } - if ${ac_cv_struct_st_dm_mode+:} false; then : -@@ -11629,8 +11756,7 @@ - fi - - -- -- ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default" -+ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default" - if test "x$ac_cv_have_decl_strmode" = xyes; then : - ac_have_decl=1 - else -@@ -11645,10 +11771,6 @@ - - - -- -- -- -- - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5 - $as_echo_n "checking for mbstate_t... " >&6; } - if ${ac_cv_type_mbstate_t+:} false; then : -@@ -11707,27 +11829,6 @@ - - - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - GNULIB_DPRINTF=0; - GNULIB_FCLOSE=0; - GNULIB_FDOPEN=0; -@@ -11910,17 +12011,8 @@ - - - -- -- -- - # Make sure that pty.h provides forkpty, or setup the replacement. - -- : -- -- -- -- -- - if test $ac_cv_header_pty_h != yes; then - HAVE_PTY_H=0 - for ac_header in util.h libutil.h -@@ -11952,12 +12044,6 @@ - - - -- : -- -- -- -- -- - - - -@@ -12158,7 +12244,40 @@ - else - WINDOWS_64_BIT_OFF_T=0 - fi -- WINDOWS_64_BIT_ST_SIZE=1 -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit st_size" >&5 -+$as_echo_n "checking for 64-bit st_size... " >&6; } -+if ${gl_cv_member_st_size_64+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+#include -+ struct stat buf; -+ int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1]; -+ -+int -+main () -+{ -+ -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ gl_cv_member_st_size_64=yes -+else -+ gl_cv_member_st_size_64=no -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+ -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5 -+$as_echo "$gl_cv_member_st_size_64" >&6; } -+ if test $gl_cv_member_st_size_64 = no; then -+ WINDOWS_64_BIT_ST_SIZE=1 -+ else -+ WINDOWS_64_BIT_ST_SIZE=0 -+ fi - ;; - *) - WINDOWS_64_BIT_OFF_T=0 -@@ -12253,7 +12372,11 @@ - - - -- ac_fn_c_check_decl "$LINENO" "fseeko" "ac_cv_have_decl_fseeko" "$ac_includes_default" -+ WINDOWS_STAT_INODES=0 -+ -+ -+ -+ac_fn_c_check_decl "$LINENO" "fseeko" "ac_cv_have_decl_fseeko" "$ac_includes_default" - if test "x$ac_cv_have_decl_fseeko" = xyes; then : - ac_have_decl=1 - else -@@ -12272,7 +12395,6 @@ - - - -- - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5 - $as_echo_n "checking for fseeko... " >&6; } - if ${gl_cv_func_fseeko+:} false; then : -@@ -12304,12 +12426,6 @@ - $as_echo "$gl_cv_func_fseeko" >&6; } - - -- : -- -- -- -- -- - if test $ac_cv_have_decl_fseeko = no; then - HAVE_DECL_FSEEKO=0 - fi -@@ -12340,6 +12456,7 @@ - GNULIB_MKNODAT=0; - GNULIB_STAT=0; - GNULIB_UTIMENSAT=0; -+ GNULIB_OVERRIDES_STRUCT_STAT=0; - HAVE_FCHMODAT=1; - HAVE_FSTATAT=1; - HAVE_FUTIMENS=1; -@@ -12419,15 +12536,6 @@ - - - -- : -- -- -- -- -- -- -- -- - if test $gl_cv_have_include_next = yes; then - gl_cv_next_sys_stat_h='<'sys/stat.h'>' - else -@@ -12501,14 +12609,14 @@ - - - -+ WINDOWS_STAT_TIMESPEC=0 -+ -+ - - - -- if test $WINDOWS_64_BIT_ST_SIZE = 1; then - --$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h - -- fi - - ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include - #include -@@ -12626,11 +12734,7 @@ - - - -- -- -- -- -- ac_fn_c_check_decl "$LINENO" "ftello" "ac_cv_have_decl_ftello" "$ac_includes_default" -+ac_fn_c_check_decl "$LINENO" "ftello" "ac_cv_have_decl_ftello" "$ac_includes_default" - if test "x$ac_cv_have_decl_ftello" = xyes; then : - ac_have_decl=1 - else -@@ -12650,13 +12754,6 @@ - - - -- -- : -- -- -- -- -- - if test $ac_cv_have_decl_ftello = no; then - HAVE_DECL_FTELLO=0 - fi -@@ -12824,12 +12921,6 @@ - HAVE_ACCEPT4=1; - - -- : -- -- -- -- -- - if test $ac_cv_header_sys_socket_h = no; then - for ac_header in ws2tcpip.h - do : -@@ -12938,12 +13029,6 @@ - - - -- : -- -- -- -- -- - - - -@@ -13109,12 +13194,6 @@ - - - -- : -- -- -- -- -- - if test $ac_cv_header_sys_socket_h != yes; then - for ac_header in winsock2.h - do : -@@ -13205,15 +13284,6 @@ - - - -- : -- -- -- -- -- -- -- -- - if test $gl_cv_have_include_next = yes; then - gl_cv_next_netdb_h='<'netdb.h'>' - else -@@ -13577,12 +13647,6 @@ - - - -- : -- -- -- -- -- - if test $ac_cv_header_sys_socket_h != yes; then - for ac_header in winsock2.h - do : -@@ -13708,12 +13772,6 @@ - fi - - -- : -- -- -- -- -- - ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include - #if HAVE_NETDB_H - # include -@@ -13742,15 +13800,6 @@ - - - -- -- -- : -- -- -- -- -- -- - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5 - $as_echo_n "checking for IPv4 sockets... " >&6; } - if ${gl_cv_socket_ipv4+:} false; then : -@@ -13840,12 +13889,6 @@ - - - -- : -- -- -- -- -- - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5 - $as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; } - if ${gl_cv_func_getcwd_null+:} false; then : -@@ -13865,6 +13908,7 @@ - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - -+# include - # if HAVE_UNISTD_H - # include - # else /* on Windows with MSVC */ -@@ -13893,6 +13937,7 @@ - return 3; - if (f[1] != '\0') - return 4; -+ free (f); - return 0; - } - #endif -@@ -13948,8 +13993,7 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5 - $as_echo "$gl_cv_func_getcwd_posix_signature" >&6; } - -- -- ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default" -+ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default" - if test "x$ac_cv_have_decl_getcwd" = xyes; then : - ac_have_decl=1 - else -@@ -13960,9 +14004,7 @@ - #define HAVE_DECL_GETCWD $ac_have_decl - _ACEOF - -- -- -- ac_fn_c_check_decl "$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "$ac_includes_default" -+ac_fn_c_check_decl "$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "$ac_includes_default" - if test "x$ac_cv_have_decl_getdelim" = xyes; then : - ac_have_decl=1 - else -@@ -13977,15 +14019,7 @@ - - - -- -- -- -- -- -- -- -- -- ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default" -+ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default" - if test "x$ac_cv_have_decl_getdtablesize" = xyes; then : - ac_have_decl=1 - else -@@ -13996,7 +14030,6 @@ - #define HAVE_DECL_GETDTABLESIZE $ac_have_decl - _ACEOF - -- - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 - $as_echo_n "checking for uid_t in sys/types.h... " >&6; } - if ${ac_cv_type_uid_t+:} false; then : -@@ -14094,8 +14127,7 @@ - _ACEOF - - -- -- ac_fn_c_check_decl "$LINENO" "getline" "ac_cv_have_decl_getline" "$ac_includes_default" -+ac_fn_c_check_decl "$LINENO" "getline" "ac_cv_have_decl_getline" "$ac_includes_default" - if test "x$ac_cv_have_decl_getline" = xyes; then : - ac_have_decl=1 - else -@@ -14106,9 +14138,7 @@ - #define HAVE_DECL_GETLINE $ac_have_decl - _ACEOF - -- -- -- ac_fn_c_check_decl "$LINENO" "getlogin_r" "ac_cv_have_decl_getlogin_r" "$ac_includes_default" -+ac_fn_c_check_decl "$LINENO" "getlogin_r" "ac_cv_have_decl_getlogin_r" "$ac_includes_default" - if test "x$ac_cv_have_decl_getlogin_r" = xyes; then : - ac_have_decl=1 - else -@@ -14121,12 +14151,7 @@ - - - -- -- -- -- -- -- ac_fn_c_check_decl "$LINENO" "getlogin" "ac_cv_have_decl_getlogin" "$ac_includes_default" -+ac_fn_c_check_decl "$LINENO" "getlogin" "ac_cv_have_decl_getlogin" "$ac_includes_default" - if test "x$ac_cv_have_decl_getlogin" = xyes; then : - ac_have_decl=1 - else -@@ -14139,6 +14164,12 @@ - - - -+ case $host_os in -+ mingw*) -+ LIB_GETLOGIN='-ladvapi32' ;; -+ *) -+ LIB_GETLOGIN= ;; -+ esac - - - -@@ -14153,12 +14184,6 @@ - - - -- : -- -- -- -- -- - - - -@@ -14566,11 +14591,12 @@ - #else - /* Avoid a crash on POSIX systems. */ - #include -+#include - /* A POSIX signal handler. */ - static void - exception_handler (int sig) - { -- exit (1); -+ _exit (1); - } - static void - nocrash_init (void) -@@ -14752,36 +14778,7 @@ - - - -- -- -- -- REPLACE_GETOPT=1 -- -- if test $REPLACE_GETOPT = 1; then -- -- GETOPT_H=getopt.h -- --$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h -- -- -- -- fi -- -- -- ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default" --if test "x$ac_cv_have_decl_getenv" = xyes; then : -- ac_have_decl=1 --else -- ac_have_decl=0 --fi -- --cat >>confdefs.h <<_ACEOF --#define HAVE_DECL_GETENV $ac_have_decl --_ACEOF -- -- -- -- ac_fn_c_check_decl "$LINENO" "getpass" "ac_cv_have_decl_getpass" "$ac_includes_default" -+ac_fn_c_check_decl "$LINENO" "getpass" "ac_cv_have_decl_getpass" "$ac_includes_default" - if test "x$ac_cv_have_decl_getpass" = xyes; then : - ac_have_decl=1 - else -@@ -14802,24 +14799,7 @@ - - - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ac_fn_c_check_decl "$LINENO" "flockfile" "ac_cv_have_decl_flockfile" "$ac_includes_default" -+ac_fn_c_check_decl "$LINENO" "flockfile" "ac_cv_have_decl_flockfile" "$ac_includes_default" - if test "x$ac_cv_have_decl_flockfile" = xyes; then : - ac_have_decl=1 - else -@@ -14830,9 +14810,7 @@ - #define HAVE_DECL_FLOCKFILE $ac_have_decl - _ACEOF - -- -- -- ac_fn_c_check_decl "$LINENO" "funlockfile" "ac_cv_have_decl_funlockfile" "$ac_includes_default" -+ac_fn_c_check_decl "$LINENO" "funlockfile" "ac_cv_have_decl_funlockfile" "$ac_includes_default" - if test "x$ac_cv_have_decl_funlockfile" = xyes; then : - ac_have_decl=1 - else -@@ -14845,6 +14823,9 @@ - - - -+ -+ -+ - GNULIB_GETTIMEOFDAY=0; - HAVE_GETTIMEOFDAY=1; - HAVE_STRUCT_TIMEVAL=1; -@@ -14861,21 +14842,6 @@ - - - -- : -- -- -- -- -- -- -- -- -- -- -- -- : -- -- - - - -@@ -14960,12 +14926,6 @@ - - - -- : -- -- -- -- -- - if test $ac_cv_header_sys_socket_h != yes; then - for ac_header in winsock2.h - do : -@@ -15118,9 +15078,36 @@ - - - -+ NEED_LOCALTIME_BUFFER=0 - - -+ GNULIB_CTIME=0; -+ GNULIB_MKTIME=0; -+ GNULIB_LOCALTIME=0; -+ GNULIB_NANOSLEEP=0; -+ GNULIB_STRFTIME=0; -+ GNULIB_STRPTIME=0; -+ GNULIB_TIMEGM=0; -+ GNULIB_TIME_R=0; -+ GNULIB_TIME_RZ=0; -+ GNULIB_TZSET=0; -+ HAVE_DECL_LOCALTIME_R=1; -+ HAVE_NANOSLEEP=1; -+ HAVE_STRPTIME=1; -+ HAVE_TIMEGM=1; -+ HAVE_TZSET=1; -+ HAVE_TIMEZONE_T=0; -+ REPLACE_CTIME=GNULIB_PORTCHECK; -+ REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; -+ REPLACE_MKTIME=GNULIB_PORTCHECK; -+ REPLACE_NANOSLEEP=GNULIB_PORTCHECK; -+ REPLACE_STRFTIME=GNULIB_PORTCHECK; -+ REPLACE_TIMEGM=GNULIB_PORTCHECK; -+ REPLACE_TZSET=GNULIB_PORTCHECK; - -+ : ${GNULIB_GETTIMEOFDAY=0}; -+ REPLACE_GMTIME=0; -+ REPLACE_LOCALTIME=0; - - - -@@ -15128,10 +15115,21 @@ - - - -+ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" -+if test "x$ac_cv_type_off_t" = xyes; then : - -+else - -+cat >>confdefs.h <<_ACEOF -+#define off_t long int -+_ACEOF -+ -+fi - - -+ GNULIB_NL_LANGINFO=0; -+ HAVE_NL_LANGINFO=1; -+ REPLACE_NL_LANGINFO=0; - - - -@@ -15140,25 +15138,125 @@ - - - --ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" --if test "x$ac_cv_type_off_t" = xyes; then : - -+ -+ -+ -+ -+ -+ -+ if test $gl_cv_have_include_next = yes; then -+ gl_cv_next_limits_h='<'limits.h'>' -+ else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -+$as_echo_n "checking absolute name of ... " >&6; } -+if ${gl_cv_next_limits_h+:} false; then : -+ $as_echo_n "(cached) " >&6 - else - --cat >>confdefs.h <<_ACEOF --#define off_t long int -+ if test $ac_cv_header_limits_h = yes; then -+ -+ -+ -+ -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+#include - _ACEOF -+ case "$host_os" in -+ aix*) gl_absname_cpp="$ac_cpp -C" ;; -+ *) gl_absname_cpp="$ac_cpp" ;; -+ esac -+ -+ case "$host_os" in -+ mingw*) -+ gl_dirsep_regex='[/\\]' -+ ;; -+ *) -+ gl_dirsep_regex='\/' -+ ;; -+ esac -+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' -+ gl_header_literal_regex=`echo 'limits.h' \ -+ | sed -e "$gl_make_literal_regex_sed"` -+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ -+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ -+ s|^/[^/]|//&| -+ p -+ q -+ }' -+ -+ gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | -+ sed -n "$gl_absolute_header_sed"` -+ -+ gl_header=$gl_cv_absolute_limits_h -+ gl_cv_next_limits_h='"'$gl_header'"' -+ else -+ gl_cv_next_limits_h='<'limits.h'>' -+ fi -+ - - fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5 -+$as_echo "$gl_cv_next_limits_h" >&6; } -+ fi -+ NEXT_LIMITS_H=$gl_cv_next_limits_h - -+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then -+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' -+ gl_next_as_first_directive='<'limits.h'>' -+ else -+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' -+ gl_next_as_first_directive=$gl_cv_next_limits_h -+ fi -+ NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive - -- GNULIB_NL_LANGINFO=0; -- HAVE_NL_LANGINFO=1; -- REPLACE_NL_LANGINFO=0; - - - - -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has ULLONG_WIDTH etc." >&5 -+$as_echo_n "checking whether limits.h has ULLONG_WIDTH etc.... " >&6; } -+if ${gl_cv_header_limits_width+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ -+ #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 -+ #endif -+ #include -+ int ullw = ULLONG_WIDTH; -+int -+main () -+{ -+ -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ gl_cv_header_limits_width=yes -+else -+ gl_cv_header_limits_width=no -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5 -+$as_echo "$gl_cv_header_limits_width" >&6; } -+ if test "$gl_cv_header_limits_width" = yes; then -+ LIMITS_H= -+ else -+ LIMITS_H=limits.h -+ fi -+ -+ if test -n "$LIMITS_H"; then -+ GL_GENERATE_LIMITS_H_TRUE= -+ GL_GENERATE_LIMITS_H_FALSE='#' -+else -+ GL_GENERATE_LIMITS_H_TRUE='#' -+ GL_GENERATE_LIMITS_H_FALSE= -+fi - - - -@@ -15380,9 +15478,6 @@ - - - -- -- -- - if test "X$prefix" = "XNONE"; then - acl_final_prefix="$ac_default_prefix" - else -@@ -15420,38 +15515,12 @@ - } - fi - --ac_prog=ld --if test "$GCC" = yes; then -- # Check if gcc -print-prog-name=ld gives a path. -+if test -n "$LD"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld" >&5 -+$as_echo_n "checking for ld... " >&6; } -+elif test "$GCC" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 - $as_echo_n "checking for ld used by $CC... " >&6; } -- case $host in -- *-*-mingw*) -- # gcc leaves a trailing carriage return which upsets mingw -- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; -- *) -- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; -- esac -- case $ac_prog in -- # Accept absolute paths. -- [\\/]* | ?:[\\/]*) -- re_direlt='/[^/][^/]*/\.\./' -- # Canonicalize the pathname of ld -- ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'` -- while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do -- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` -- done -- test -z "$LD" && LD="$ac_prog" -- ;; -- "") -- # If it fails, then pretend we aren't using GCC. -- ac_prog=ld -- ;; -- *) -- # If it is relative, then search for the first ld in PATH. -- with_gnu_ld=unknown -- ;; -- esac - elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 - $as_echo_n "checking for GNU ld... " >&6; } -@@ -15459,44 +15528,106 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 - $as_echo_n "checking for non-GNU ld... " >&6; } - fi --if ${acl_cv_path_LD+:} false; then : -+if test -n "$LD"; then -+ # Let the user override the test with a path. -+ : -+else -+ if ${acl_cv_path_LD+:} false; then : - $as_echo_n "(cached) " >&6 - else -- if test -z "$LD"; then -- acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -- for ac_dir in $PATH; do -- IFS="$acl_save_ifs" -- test -z "$ac_dir" && ac_dir=. -- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then -- acl_cv_path_LD="$ac_dir/$ac_prog" -- # Check to see if the program is GNU ld. I'd rather use --version, -- # but apparently some variants of GNU ld only accept -v. -- # Break only if it was the GNU/non-GNU ld that we prefer. -- case `"$acl_cv_path_LD" -v 2>&1 &5 | tr -d '\015'` ;; -+ *) -+ acl_output=`($CC -print-prog-name=ld) 2>&5` ;; -+ esac -+ case $acl_output in -+ # Accept absolute paths. -+ [\\/]* | ?:[\\/]*) -+ re_direlt='/[^/][^/]*/\.\./' -+ # Canonicalize the pathname of ld -+ acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'` -+ while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do -+ acl_output=`echo $acl_output | sed "s%$re_direlt%/%"` -+ done -+ # Got the pathname. No search in PATH is needed. -+ acl_cv_path_LD="$acl_output" -+ ac_prog= -+ ;; -+ "") -+ # If it fails, then pretend we aren't using GCC. -+ ;; -+ *) -+ # If it is relative, then search for the first ld in PATH. -+ with_gnu_ld=unknown -+ ;; - esac - fi -- done -- IFS="$acl_save_ifs" --else -- acl_cv_path_LD="$LD" # Let the user override the test with a path. -+ if test -n "$ac_prog"; then -+ # Search for $ac_prog in $PATH. -+ acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -+ for ac_dir in $PATH; do -+ IFS="$acl_save_ifs" -+ test -z "$ac_dir" && ac_dir=. -+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then -+ acl_cv_path_LD="$ac_dir/$ac_prog" -+ # Check to see if the program is GNU ld. I'd rather use --version, -+ # but apparently some variants of GNU ld only accept -v. -+ # Break only if it was the GNU/non-GNU ld that we prefer. -+ case `"$acl_cv_path_LD" -v 2>&1 conftest.$ac_ext -+/* end confdefs.h. */ -+#if defined __powerpc64__ || defined _ARCH_PPC64 -+ yes -+ #endif -+ -+_ACEOF -+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -+ $EGREP "yes" >/dev/null 2>&1; then : -+ # The compiler produces 64-bit code. Add option '-b64' so that the -+ # linker groks 64-bit object files. -+ case "$acl_cv_path_LD " in -+ *" -b64 "*) ;; -+ *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;; -+ esac -+ - fi -+rm -f conftest* -+ -+ ;; -+ esac -+ - fi - --LD="$acl_cv_path_LD" -+ LD="$acl_cv_path_LD" -+fi - if test -n "$LD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 - $as_echo "$LD" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 - $as_echo "no" >&6; } -+ as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 - fi --test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 - $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } - if ${acl_cv_prog_gnu_ld+:} false; then : -@@ -15553,11 +15684,16 @@ - - - -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5 -+$as_echo_n "checking for the common suffixes of directories in the library search path... " >&6; } -+if ${acl_cv_libdirstems+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else - acl_libdirstem=lib -- acl_libdirstem2= -- case "$host_os" in -- solaris*) -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5 -+ acl_libdirstem2= -+ case "$host_os" in -+ solaris*) -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5 - $as_echo_n "checking for 64-bit host... " >&6; } - if ${gl_cv_solaris_64bit+:} false; then : - $as_echo_n "(cached) " >&6 -@@ -15582,37 +15718,51 @@ - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5 - $as_echo "$gl_cv_solaris_64bit" >&6; } -- if test $gl_cv_solaris_64bit = yes; then -- acl_libdirstem=lib/64 -- case "$host_cpu" in -- sparc*) acl_libdirstem2=lib/sparcv9 ;; -- i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; -- esac -- fi -- ;; -- *) -- searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` -- if test -n "$searchpath"; then -- acl_save_IFS="${IFS= }"; IFS=":" -- for searchdir in $searchpath; do -- if test -d "$searchdir"; then -- case "$searchdir" in -- */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; -- */../ | */.. ) -- # Better ignore directories of this form. They are misleading. -- ;; -- *) searchdir=`cd "$searchdir" && pwd` -- case "$searchdir" in -- */lib64 ) acl_libdirstem=lib64 ;; -- esac ;; -- esac -- fi -- done -- IFS="$acl_save_IFS" -- fi -- ;; -- esac -- test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" -+ if test $gl_cv_solaris_64bit = yes; then -+ acl_libdirstem=lib/64 -+ case "$host_cpu" in -+ sparc*) acl_libdirstem2=lib/sparcv9 ;; -+ i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; -+ esac -+ fi -+ ;; -+ *) -+ searchpath=`(if test -f /usr/bin/gcc \ -+ && LC_ALL=C /usr/bin/gcc -print-search-dirs >/dev/null 2>/dev/null; then \ -+ LC_ALL=C /usr/bin/gcc -print-search-dirs; \ -+ else \ -+ LC_ALL=C $CC -print-search-dirs; \ -+ fi) 2>/dev/null \ -+ | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` -+ if test -n "$searchpath"; then -+ acl_save_IFS="${IFS= }"; IFS=":" -+ for searchdir in $searchpath; do -+ if test -d "$searchdir"; then -+ case "$searchdir" in -+ */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; -+ */../ | */.. ) -+ # Better ignore directories of this form. They are misleading. -+ ;; -+ *) searchdir=`cd "$searchdir" && pwd` -+ case "$searchdir" in -+ */lib64 ) acl_libdirstem=lib64 ;; -+ esac ;; -+ esac -+ fi -+ done -+ IFS="$acl_save_IFS" -+ fi -+ ;; -+ esac -+ test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" -+ acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2" -+ -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5 -+$as_echo "$acl_cv_libdirstems" >&6; } -+ # Decompose acl_cv_libdirstems into acl_libdirstem and acl_libdirstem2. -+ acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'` -+ acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e '/,/s/.*,//'` - - - -@@ -15787,8 +15937,10 @@ - # Therefore pthread_in_use() needs to actually try to create a - # thread: pthread_create from libc will fail, whereas - # pthread_create will actually create a thread. -+ # On Solaris 10 or newer, this test is no longer needed, because -+ # libc contains the fully functional pthread functions. - case "$host_os" in -- solaris* | hpux*) -+ solaris | solaris2.1-9 | solaris2.1-9.* | hpux*) - - $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h - -@@ -16538,9 +16690,6 @@ - - - -- -- -- - GNULIB__EXIT=0; - GNULIB_ATOLL=0; - GNULIB_CALLOC_POSIX=0; -@@ -16588,6 +16737,7 @@ - HAVE_POSIX_OPENPT=1; - HAVE_PTSNAME=1; - HAVE_PTSNAME_R=1; -+ HAVE_QSORT_R=1; - HAVE_RANDOM=1; - HAVE_RANDOM_H=1; - HAVE_RANDOM_R=1; -@@ -16693,7 +16843,10 @@ - int - main () - { --return ! malloc (0); -+char *p = malloc (0); -+ int result = !p; -+ free (p); -+ return result; - ; - return 0; - } -@@ -16848,12 +17001,6 @@ - - - -- -- -- -- -- -- - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5 - $as_echo_n "checking for a traditional japanese locale... " >&6; } - if ${gt_cv_locale_ja+:} false; then : -@@ -17256,12 +17403,6 @@ - - - -- -- -- -- -- -- - GNULIB_FFSL=0; - GNULIB_FFSLL=0; - GNULIB_MEMCHR=0; -@@ -17401,18 +17542,6 @@ - fi - - -- : -- -- -- -- -- -- -- : -- -- -- -- - - - -@@ -17505,8 +17634,7 @@ - fi - fi - -- -- ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default" -+ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default" - if test "x$ac_cv_have_decl_memrchr" = xyes; then : - ac_have_decl=1 - else -@@ -17523,10 +17651,6 @@ - - - -- -- -- -- - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether defines MIN and MAX" >&5 - $as_echo_n "checking whether defines MIN and MAX... " >&6; } - if ${gl_cv_minmax_in_limits_h+:} false; then : -@@ -17650,9 +17774,6 @@ - - - -- -- -- - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5 - $as_echo_n "checking for promoted mode_t type... " >&6; } - if ${gl_cv_promoted_mode_t+:} false; then : -@@ -17689,9 +17810,6 @@ - - - -- -- -- - GNULIB_POLL=0; - HAVE_POLL=1; - REPLACE_POLL=0; -@@ -17702,15 +17820,6 @@ - - - -- -- -- -- : -- -- -- -- -- - if test $ac_cv_header_poll_h = yes; then - HAVE_POLL_H=1 - else -@@ -17724,12 +17833,6 @@ - - - -- : -- -- -- -- -- - - - -@@ -17848,12 +17951,6 @@ - - - -- : -- -- -- -- -- - if test $ac_cv_header_sys_socket_h != yes; then - for ac_header in winsock2.h - do : -@@ -18055,29 +18152,7 @@ - - - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default" -+ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default" - if test "x$ac_cv_have_decl_alarm" = xyes; then : - ac_have_decl=1 - else -@@ -18100,6 +18175,7 @@ - - - -+ - GNULIB_PSELECT=0; - GNULIB_SELECT=0; - HAVE_PSELECT=1; -@@ -18111,9 +18187,6 @@ - - - -- -- -- - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether is self-contained" >&5 - $as_echo_n "checking whether is self-contained... " >&6; } - if ${gl_cv_header_sys_select_h_selfcontained+:} false; then : -@@ -18201,12 +18274,6 @@ - - - -- : -- -- -- -- -- - - - -@@ -18289,12 +18356,6 @@ - - - -- : -- -- -- -- -- - if test $ac_cv_header_sys_socket_h != yes; then - for ac_header in winsock2.h - do : -@@ -18366,8 +18427,7 @@ - done - - -- -- ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default" -+ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default" - if test "x$ac_cv_have_decl_setenv" = xyes; then : - ac_have_decl=1 - else -@@ -18383,32 +18443,10 @@ - - - -- -- -- -- -- : -- -- -- -- -- - if test $ac_cv_have_decl_setenv = no; then - HAVE_DECL_SETENV=0 - fi - -- : -- -- -- -- -- -- -- -- -- -- : -- - - - -@@ -18490,18 +18528,6 @@ - - - -- -- -- : -- -- -- -- -- -- -- -- -- - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5 - $as_echo_n "checking whether snprintf returns a byte count as in C99... " >&6; } - if ${gl_cv_func_snprintf_retval_c99+:} false; then : -@@ -18586,8 +18612,7 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5 - $as_echo "$gl_cv_func_snprintf_retval_c99" >&6; } - -- -- ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" -+ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" - if test "x$ac_cv_have_decl_snprintf" = xyes; then : - ac_have_decl=1 - else -@@ -18598,7 +18623,6 @@ - #define HAVE_DECL_SNPRINTF $ac_have_decl - _ACEOF - -- - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 - $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } - if ${ac_cv_header_stdbool_h+:} false; then : -@@ -18608,59 +18632,67 @@ - /* end confdefs.h. */ - - #include -- #ifndef bool -- "error: bool is not defined" -- #endif -- #ifndef false -- "error: false is not defined" -- #endif -- #if false -- "error: false is not 0" -- #endif -- #ifndef true -- "error: true is not defined" -- #endif -- #if true != 1 -- "error: true is not 1" -+ -+ #ifdef __cplusplus -+ typedef bool Bool; -+ #else -+ typedef _Bool Bool; -+ #ifndef bool -+ "error: bool is not defined" -+ #endif -+ #ifndef false -+ "error: false is not defined" -+ #endif -+ #if false -+ "error: false is not 0" -+ #endif -+ #ifndef true -+ "error: true is not defined" -+ #endif -+ #if true != 1 -+ "error: true is not 1" -+ #endif - #endif -+ - #ifndef __bool_true_false_are_defined - "error: __bool_true_false_are_defined is not defined" - #endif - -- struct s { _Bool s: 1; _Bool t; } s; -+ struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s; - - char a[true == 1 ? 1 : -1]; - char b[false == 0 ? 1 : -1]; - char c[__bool_true_false_are_defined == 1 ? 1 : -1]; - char d[(bool) 0.5 == true ? 1 : -1]; - /* See body of main program for 'e'. */ -- char f[(_Bool) 0.0 == false ? 1 : -1]; -+ char f[(Bool) 0.0 == false ? 1 : -1]; - char g[true]; -- char h[sizeof (_Bool)]; -+ char h[sizeof (Bool)]; - char i[sizeof s.t]; - enum { j = false, k = true, l = false * true, m = true * 256 }; - /* The following fails for - HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ -- _Bool n[m]; -+ Bool n[m]; - char o[sizeof n == m * sizeof n[0] ? 1 : -1]; -- char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; -+ char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; - /* Catch a bug in an HP-UX C compiler. See - http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html - http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html - */ -- _Bool q = true; -- _Bool *pq = &q; -+ Bool q = true; -+ Bool *pq = &q; -+ bool *qq = &q; - - int - main () - { - - bool e = &s; -- *pq |= q; -- *pq |= ! q; -+ *pq |= q; *pq |= ! q; -+ *qq |= q; *qq |= ! q; - /* Refer to every declared value, to avoid compiler optimizations. */ - return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l -- + !m + !n + !o + !p + !q + !pq); -+ + !m + !n + !o + !p + !q + !pq + !qq); - - ; - return 0; -@@ -18687,6 +18719,90 @@ - - - -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5 -+$as_echo_n "checking for wint_t... " >&6; } -+if ${gt_cv_c_wint_t+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+/* Tru64 with Desktop Toolkit C has a bug: must be included before -+ . -+ BSD/OS 4.0.1 has a bug: , and must be included -+ before . */ -+#include -+#include -+#include -+#include -+ wint_t foo = (wchar_t)'\0'; -+int -+main () -+{ -+ -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ gt_cv_c_wint_t=yes -+else -+ gt_cv_c_wint_t=no -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5 -+$as_echo "$gt_cv_c_wint_t" >&6; } -+ if test $gt_cv_c_wint_t = yes; then -+ -+$as_echo "#define HAVE_WINT_T 1" >>confdefs.h -+ -+ -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wint_t is too small" >&5 -+$as_echo_n "checking whether wint_t is too small... " >&6; } -+if ${gl_cv_type_wint_t_too_small+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+/* Tru64 with Desktop Toolkit C has a bug: must be included before -+ . -+ BSD/OS 4.0.1 has a bug: , and must be -+ included before . */ -+#if !(defined __GLIBC__ && !defined __UCLIBC__) -+# include -+# include -+# include -+#endif -+#include -+ int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1]; -+ -+int -+main () -+{ -+ -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ gl_cv_type_wint_t_too_small=no -+else -+ gl_cv_type_wint_t_too_small=yes -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_too_small" >&5 -+$as_echo "$gl_cv_type_wint_t_too_small" >&6; } -+ if test $gl_cv_type_wint_t_too_small = yes; then -+ GNULIB_OVERRIDES_WINT_T=1 -+ else -+ GNULIB_OVERRIDES_WINT_T=0 -+ fi -+ else -+ GNULIB_OVERRIDES_WINT_T=0 -+ fi - - - -@@ -18714,12 +18830,6 @@ - - - -- : -- -- -- -- -- - if test $ac_cv_header_wchar_h = yes; then - HAVE_WCHAR_H=1 - else -@@ -18747,12 +18857,6 @@ - - - -- : -- -- -- -- -- - - - -@@ -18844,6 +18948,8 @@ - - - #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ -+#define __STDC_CONSTANT_MACROS 1 -+#define __STDC_LIMIT_MACROS 1 - #include - /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in . */ - #if !(defined WCHAR_MIN && defined WCHAR_MAX) -@@ -18934,6 +19040,15 @@ - intmax_t i = INTMAX_MAX; - uintmax_t j = UINTMAX_MAX; - -+/* Check that SIZE_MAX has the correct type, if possible. */ -+#if 201112 <= __STDC_VERSION__ -+int k = _Generic (SIZE_MAX, size_t: 0); -+#elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \ -+ || (0x5110 <= __SUNPRO_C && !__STDC__)) -+extern size_t k; -+extern __typeof__ (SIZE_MAX) k; -+#endif -+ - #include /* for CHAR_BIT */ - #define TYPE_MINIMUM(t) \ - ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t))) -@@ -19012,6 +19127,8 @@ - - - #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ -+#define __STDC_CONSTANT_MACROS 1 -+#define __STDC_LIMIT_MACROS 1 - #include - - -@@ -19097,8 +19214,111 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5 - $as_echo "$gl_cv_header_working_stdint_h" >&6; } - fi -+ -+ HAVE_C99_STDINT_H=0 -+ HAVE_SYS_BITYPES_H=0 -+ HAVE_SYS_INTTYPES_H=0 -+ STDINT_H=stdint.h - if test "$gl_cv_header_working_stdint_h" = yes; then -- STDINT_H= -+ HAVE_C99_STDINT_H=1 -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5 -+$as_echo_n "checking whether stdint.h predates C++11... " >&6; } -+if ${gl_cv_header_stdint_predates_cxx11_h+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ gl_cv_header_stdint_predates_cxx11_h=yes -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+ -+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ -+#include -+ -+ -+ /* BSD/OS 4.0.1 has a bug: , and must be -+ included before . */ -+ #include -+ #include -+ #if HAVE_WCHAR_H -+ # include -+ # include -+ # include -+ #endif -+ -+ -+intmax_t im = INTMAX_MAX; -+int32_t i32 = INT32_C (0x7fffffff); -+ -+int -+main () -+{ -+ -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ gl_cv_header_stdint_predates_cxx11_h=no -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5 -+$as_echo "$gl_cv_header_stdint_predates_cxx11_h" >&6; } -+ -+ if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then -+ -+$as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h -+ -+ -+$as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h -+ -+ fi -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5 -+$as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; } -+if ${gl_cv_header_stdint_width+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ gl_cv_header_stdint_width=no -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+ /* Work if build is not clean. */ -+ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 -+ #ifndef __STDC_WANT_IEC_60559_BFP_EXT__ -+ #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 -+ #endif -+ #include -+ -+ /* BSD/OS 4.0.1 has a bug: , and must be -+ included before . */ -+ #include -+ #include -+ #if HAVE_WCHAR_H -+ # include -+ # include -+ # include -+ #endif -+ -+ int iw = UINTMAX_WIDTH; -+ -+int -+main () -+{ -+ -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ gl_cv_header_stdint_width=yes -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5 -+$as_echo "$gl_cv_header_stdint_width" >&6; } -+ if test "$gl_cv_header_stdint_width" = yes; then -+ STDINT_H= -+ fi - else - for ac_header in sys/inttypes.h sys/bitypes.h - do : -@@ -19115,19 +19335,12 @@ - - if test $ac_cv_header_sys_inttypes_h = yes; then - HAVE_SYS_INTTYPES_H=1 -- else -- HAVE_SYS_INTTYPES_H=0 - fi -- - if test $ac_cv_header_sys_bitypes_h = yes; then - HAVE_SYS_BITYPES_H=1 -- else -- HAVE_SYS_BITYPES_H=0 - fi - - -- -- - if test $APPLE_UNIVERSAL_BUILD = 0; then - - -@@ -19421,13 +19634,26 @@ - - - -- if test $BITSIZEOF_WINT_T -lt 32; then -+ if test $GNULIB_OVERRIDES_WINT_T = 1; then - BITSIZEOF_WINT_T=32 - fi - -- STDINT_H=stdint.h - fi - -+ LIMITS_H=limits.h -+ if test -n "$LIMITS_H"; then -+ GL_GENERATE_LIMITS_H_TRUE= -+ GL_GENERATE_LIMITS_H_FALSE='#' -+else -+ GL_GENERATE_LIMITS_H_TRUE='#' -+ GL_GENERATE_LIMITS_H_FALSE= -+fi -+ -+ -+ -+ -+ -+ - if test -n "$STDINT_H"; then - GL_GENERATE_STDINT_H_TRUE= - GL_GENERATE_STDINT_H_FALSE='#' -@@ -19445,11 +19671,7 @@ - - - -- -- -- -- -- ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default" -+ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default" - if test "x$ac_cv_have_decl_strdup" = xyes; then : - ac_have_decl=1 - else -@@ -19461,7 +19683,6 @@ - _ACEOF - - -- - REPLACE_STRERROR_0=0 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5 - $as_echo_n "checking whether strerror(0) succeeds... " >&6; } -@@ -19651,15 +19872,6 @@ - - - -- : -- -- -- -- -- -- -- -- - if test $gl_cv_have_include_next = yes; then - gl_cv_next_strings_h='<'strings.h'>' - else -@@ -19781,8 +19993,7 @@ - done - - -- -- ac_fn_c_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default" -+ac_fn_c_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default" - if test "x$ac_cv_have_decl_strndup" = xyes; then : - ac_have_decl=1 - else -@@ -19795,12 +20006,7 @@ - - - -- -- -- -- -- -- ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default" -+ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default" - if test "x$ac_cv_have_decl_strnlen" = xyes; then : - ac_have_decl=1 - else -@@ -19818,43 +20024,11 @@ - - - -- -- -- -- -- -- -- - GNULIB_TCGETSID=0; - HAVE_DECL_TCGETSID=1; - HAVE_TERMIOS_H=1; - - -- GNULIB_MKTIME=0; -- GNULIB_NANOSLEEP=0; -- GNULIB_STRPTIME=0; -- GNULIB_TIMEGM=0; -- GNULIB_TIME_R=0; -- HAVE_DECL_LOCALTIME_R=1; -- HAVE_NANOSLEEP=1; -- HAVE_STRPTIME=1; -- HAVE_TIMEGM=1; -- REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; -- REPLACE_MKTIME=GNULIB_PORTCHECK; -- REPLACE_NANOSLEEP=GNULIB_PORTCHECK; -- REPLACE_TIMEGM=GNULIB_PORTCHECK; -- -- : ${GNULIB_GETTIMEOFDAY=0}; -- REPLACE_GMTIME=0; -- REPLACE_LOCALTIME=0; -- -- -- -- : -- -- -- -- - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 - $as_echo_n "checking for struct timespec in ... " >&6; } -@@ -20066,53 +20240,6 @@ - - - -- -- -- -- -- -- -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5 --$as_echo_n "checking for wint_t... " >&6; } --if ${gt_cv_c_wint_t+:} false; then : -- $as_echo_n "(cached) " >&6 --else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ -- --/* Tru64 with Desktop Toolkit C has a bug: must be included before -- . -- BSD/OS 4.0.1 has a bug: , and must be included -- before . */ --#include --#include --#include --#include -- wint_t foo = (wchar_t)'\0'; --int --main () --{ -- -- ; -- return 0; --} --_ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -- gt_cv_c_wint_t=yes --else -- gt_cv_c_wint_t=no --fi --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5 --$as_echo "$gt_cv_c_wint_t" >&6; } -- if test $gt_cv_c_wint_t = yes; then -- --$as_echo "#define HAVE_WINT_T 1" >>confdefs.h -- -- fi -- -- - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5 - $as_echo_n "checking for inttypes.h... " >&6; } - if ${gl_cv_header_inttypes_h+:} false; then : -@@ -20622,8 +20749,7 @@ - ;; - esac - -- -- ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" -+ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" - if test "x$ac_cv_have_decl_vsnprintf" = xyes; then : - ac_have_decl=1 - else -@@ -20638,6 +20764,13 @@ - - - -+ if test $ac_cv_header_crtdefs_h = yes; then -+ HAVE_CRTDEFS_H=1 -+ else -+ HAVE_CRTDEFS_H=0 -+ fi -+ -+ - - - -@@ -20654,9 +20787,6 @@ - - - -- -- -- - if false; then - GL_COND_LIBTOOL_TRUE= - GL_COND_LIBTOOL_FALSE='#' -@@ -20835,112 +20965,17 @@ - conftest$ac_exeext conftest.$ac_ext - - -- : -- - - - - - -- : - - - - - - -- : -- -- -- -- -- -- -- : -- -- -- -- -- -- -- : -- -- -- -- -- -- -- : -- -- -- -- -- -- -- : -- -- -- -- -- -- -- : -- -- -- -- -- -- -- : -- -- -- -- -- -- -- : -- -- -- -- -- -- -- : -- -- -- -- -- -- -- : -- -- -- -- -- -- -- : -- -- -- -- -- -- -- : -- -- -- -- -- -- -- -- -- -- : -- -- -- -- - - - -@@ -20958,12 +20993,6 @@ - - - -- : -- -- -- -- -- - if test $ac_cv_header_arpa_inet_h = yes; then - HAVE_ARPA_INET_H=1 - else -@@ -20976,12 +21005,6 @@ - - - -- : -- -- -- -- -- - - - -@@ -21123,12 +21146,6 @@ - - - -- : -- -- -- -- -- - if test $ac_cv_func_btowc = no; then - HAVE_BTOWC=0 - else -@@ -21280,6 +21297,58 @@ - - - -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5 -+$as_echo_n "checking for __builtin_expect... " >&6; } -+if ${gl_cv___builtin_expect+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+ int -+ main (int argc, char **argv) -+ { -+ argc = __builtin_expect (argc, 100); -+ return argv[argc != 100][0]; -+ } -+_ACEOF -+if ac_fn_c_try_link "$LINENO"; then : -+ gl_cv___builtin_expect=yes -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+ #include -+ int -+ main (int argc, char **argv) -+ { -+ argc = __builtin_expect (argc, 100); -+ return argv[argc != 100][0]; -+ } -+_ACEOF -+if ac_fn_c_try_link "$LINENO"; then : -+ gl_cv___builtin_expect="in " -+else -+ gl_cv___builtin_expect=no -+fi -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+fi -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv___builtin_expect" >&5 -+$as_echo "$gl_cv___builtin_expect" >&6; } -+ if test "$gl_cv___builtin_expect" = yes; then -+ $as_echo "#define HAVE___BUILTIN_EXPECT 1" >>confdefs.h -+ -+ elif test "$gl_cv___builtin_expect" = "in "; then -+ $as_echo "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h -+ -+ fi -+ -+ -+ - - - -@@ -21361,15 +21430,11 @@ - - - -- if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then -- REPLACE_CLOSE=1 -- fi -- -- -- - -+ if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then -+ REPLACE_CLOSE=1 -+ fi - -- : - - - -@@ -21407,12 +21472,6 @@ - - - -- : -- -- -- -- -- - if test $ac_cv_func_fchdir = no; then - HAVE_FCHDIR=0 - fi -@@ -21471,12 +21530,6 @@ - - - -- : -- -- -- -- -- - if test $ac_cv_func_fchdir = no; then - HAVE_FCHDIR=0 - fi -@@ -21487,6 +21540,10 @@ - fi - fi - -+ case $host_os,$HAVE_CLOSEDIR in -+ os2*,1) -+ REPLACE_CLOSEDIR=1;; -+ esac - - if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then - -@@ -21591,6 +21648,7 @@ - return 3; - if (e->d_ino != st.st_ino) - return 4; -+ closedir (dp); - return 0; - - ; -@@ -21665,12 +21723,6 @@ - - - -- : -- -- -- -- -- - - - -@@ -21850,15 +21902,19 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5 - $as_echo "$gl_cv_func_dirfd_macro" >&6; } - -- # Use the replacement only if we have no function or macro with that name. -- if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then -- if test $ac_cv_have_decl_dirfd = yes; then -- # If the system declares dirfd already, let's declare rpl_dirfd instead. -+ # Use the replacement if we have no function or macro with that name, -+ # or if OS/2 kLIBC whose dirfd() does not work. -+ # Replace only if the system declares dirfd already. -+ case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in -+ no,no,*,yes | *,*,os2*,yes) - REPLACE_DIRFD=1 -- fi -- fi - -- if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then -+$as_echo "#define REPLACE_DIRFD 1" >>confdefs.h -+;; -+ esac -+ -+ if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \ -+ || test $REPLACE_DIRFD = 1; then - - - -@@ -21980,14 +22036,10 @@ - - - -- if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then -- REPLACE_DUP=1 -- fi -- -- -- - -- : -+ if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then -+ REPLACE_DUP=1 -+ fi - - - -@@ -22001,6 +22053,50 @@ - REPLACE_DUP=1 - fi - -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5 -+$as_echo_n "checking whether dup works... " >&6; } -+if ${gl_cv_func_dup_works+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test "$cross_compiling" = yes; then : -+ gl_cv_func_dup_works='guessing yes' -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+#include -+ #include -+ #include -+int -+main () -+{ -+/* On OS/2 kLIBC, dup does not work on a directory fd. */ -+ int fd = open (".", O_RDONLY); -+ return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0; -+ -+ ; -+ return 0; -+} -+ -+_ACEOF -+if ac_fn_c_try_run "$LINENO"; then : -+ gl_cv_func_dup_works=yes -+else -+ gl_cv_func_dup_works=no -+fi -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -+ conftest.$ac_objext conftest.beam conftest.$ac_ext -+fi -+ -+ -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup_works" >&5 -+$as_echo "$gl_cv_func_dup_works" >&6; } -+ case "$gl_cv_func_dup_works" in -+ *yes) ;; -+ *) -+ REPLACE_DUP=1 -+ ;; -+ esac - - if test $REPLACE_DUP = 1; then - -@@ -22058,6 +22154,8 @@ - gl_cv_func_dup2_works="guessing no" ;; - *-android*) # implemented using dup3(), which fails if oldfd == newfd - gl_cv_func_dup2_works="guessing no" ;; -+ os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd. -+ gl_cv_func_dup2_works="guessing no" ;; - *) gl_cv_func_dup2_works="guessing yes" ;; - esac - else -@@ -22109,6 +22207,16 @@ - result |= 32; - dup2 (2, 255); - dup2 (2, 256); -+ /* On OS/2 kLIBC, dup2() does not work on a directory fd. */ -+ { -+ int fd = open (".", O_RDONLY); -+ if (fd == -1) -+ result |= 64; -+ else if (dup2 (fd, fd + 1) == -1) -+ result |= 128; -+ -+ close (fd); -+ } - return result; - ; - return 0; -@@ -22150,12 +22258,6 @@ - - - -- : -- -- -- -- -- - if test $ac_cv_func_fchdir = no; then - HAVE_FCHDIR=0 - fi -@@ -22270,12 +22372,6 @@ - - - -- : -- -- -- -- -- - if test $ac_cv_have_decl_fchdir = no; then - HAVE_DECL_FCHDIR=0 - fi -@@ -22364,22 +22460,10 @@ - - - -- : -- -- -- -- -- - if test $ac_cv_func_fcntl = no; then - - - -- : -- -- -- -- -- - if test $ac_cv_func_fcntl = no; then - HAVE_FCNTL=0 - else -@@ -22429,6 +22513,17 @@ - if (errno != EINVAL) result |= 2; - if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4; - if (errno != EINVAL) result |= 8; -+ /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */ -+ { -+ int fd; -+ fd = open (".", O_RDONLY); -+ if (fd == -1) -+ result |= 16; -+ else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1) -+ result |= 32; -+ -+ close (fd); -+ } - return result; - ; - return 0; -@@ -22451,12 +22546,6 @@ - *) - - -- : -- -- -- -- -- - if test $ac_cv_func_fcntl = no; then - HAVE_FCNTL=0 - else -@@ -22524,12 +22613,6 @@ - - - -- : -- -- -- -- -- - if test $ac_cv_func_fcntl = no; then - HAVE_FCNTL=0 - else -@@ -22542,12 +22625,6 @@ - - - -- : -- -- -- -- -- - if test $ac_cv_func_fchdir = no; then - HAVE_FCHDIR=0 - fi -@@ -22556,12 +22633,6 @@ - - - -- : -- -- -- -- -- - if test $ac_cv_func_fcntl = no; then - HAVE_FCNTL=0 - else -@@ -22743,12 +22814,6 @@ - fi - - -- : -- -- -- -- -- - if test $ac_cv_func_fdopendir = no; then - HAVE_FDOPENDIR=0 - else -@@ -22850,21 +22915,56 @@ - - - -- : -- -- -- - - - - - -- : -- -- -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5 -+$as_echo_n "checking for flexible array member... " >&6; } -+if ${ac_cv_c_flexmember+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+#include -+ #include -+ #include -+ struct m { struct m *next, **list; char name[]; }; -+ struct s { struct s *p; struct m *m; int n; double d[]; }; -+int -+main () -+{ -+int m = getchar (); -+ size_t nbytes = offsetof (struct s, d) + m * sizeof (double); -+ nbytes += sizeof (struct s) - 1; -+ nbytes -= nbytes % sizeof (struct s); -+ struct s *p = malloc (nbytes); -+ p->p = p; -+ p->m = NULL; -+ p->d[0] = 0.0; -+ return p->d != (double *) NULL; -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ ac_cv_c_flexmember=yes -+else -+ ac_cv_c_flexmember=no -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5 -+$as_echo "$ac_cv_c_flexmember" >&6; } -+ if test $ac_cv_c_flexmember = yes; then - -+$as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h - -+ else -+ $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h - -+ fi - - - -@@ -23258,39 +23358,6 @@ - _ACEOF - - -- : -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- : -- -- -- -- - - - fi -@@ -23572,12 +23639,6 @@ - $as_echo "$gl_cv_func_fseeko" >&6; } - - -- : -- -- -- -- -- - if test $ac_cv_have_decl_fseeko = no; then - HAVE_DECL_FSEEKO=0 - fi -@@ -23638,20 +23699,11 @@ - - - -- if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then -- REPLACE_FSTAT=1 -- fi -- -- -- if test $WINDOWS_64_BIT_ST_SIZE = 1; then -- REPLACE_FSTAT=1 -- fi -- -- -- -- -- -- : -+ case "$host_os" in -+ mingw*) -+ REPLACE_FSTAT=1 -+ ;; -+ esac - - - -@@ -23682,29 +23734,36 @@ - - gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext" - -- : -- fi - - - - - -- GNULIB_FSTAT=1 - - - -+ gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext" - - --$as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h - -+ : - -+ fi - - - - - -+ GNULIB_FSTAT=1 -+ -+ -+ -+ -+ -+$as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h -+ -+ - -- : - - - -@@ -23837,12 +23896,6 @@ - - - -- : -- -- -- -- -- - if test $ac_cv_have_decl_ftello = no; then - HAVE_DECL_FTELLO=0 - fi -@@ -24029,7 +24082,7 @@ - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to do getaddrinfo, freeaddrinfo and getnameinfo" >&5 --$as_echo "$as_me: checking how to do getaddrinfo, freeaddrinfo and getnameinfo" >&6;} -+$as_echo_n "checking how to do getaddrinfo, freeaddrinfo and getnameinfo... " >&6; } - GETADDRINFO_LIB= - gai_saved_LIBS="$LIBS" - -@@ -24291,12 +24344,6 @@ - - - -- : -- -- -- -- -- - - ac_fn_c_check_decl "$LINENO" "getaddrinfo" "ac_cv_have_decl_getaddrinfo" " - /* sys/types.h is not needed according to POSIX, but the -@@ -24483,18 +24530,6 @@ - *) - - -- : -- -- -- -- -- -- -- -- : -- -- -- - - - -@@ -24732,18 +24767,6 @@ - *yes) - - -- : -- -- -- -- -- -- -- : -- -- -- -- - - - for ac_func in getpagesize -@@ -25025,18 +25048,6 @@ - - - -- : -- -- -- -- -- -- -- -- : -- -- -- - - - if test $ac_cv_func_getdelim = yes; then -@@ -25096,7 +25107,9 @@ - size_t siz = (size_t)(~0) / 4; - if (getdelim (&line, &siz, '\n', in) == -1) - return 3; -+ free (line); - } -+ fclose (in); - return 0; - } - -@@ -25369,18 +25382,6 @@ - - - -- : -- -- -- -- -- -- -- : -- -- -- -- - - if test $ac_cv_func_getdtablesize = yes && - test $ac_cv_have_decl_getdtablesize = yes; then -@@ -25613,7 +25614,9 @@ - { - int size = getgroups (0, 0); - gid_t *list = malloc (size * sizeof *list); -- return getgroups (-1, list) != -1; -+ int result = getgroups (-1, list) != -1; -+ free (list); -+ return result; - ; - return 0; - } -@@ -25671,12 +25674,6 @@ - - - -- : -- -- -- -- -- - if test $ac_cv_header_sys_socket_h != yes; then - for ac_header in winsock2.h - do : -@@ -25761,24 +25758,6 @@ - - - -- : -- -- -- -- -- -- -- : -- -- -- -- -- -- -- : -- -- -- - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HOST_NAME_MAX" >&5 -@@ -25889,12 +25868,6 @@ - - - -- : -- -- -- -- -- - - gl_getline_needs_run_time_check=no - ac_fn_c_check_func "$LINENO" "getline" "ac_cv_func_getline" -@@ -25952,6 +25925,7 @@ - int len = getline (&line, &siz, in); - if (!(len == 4 && line && strcmp (line, "foo\n") == 0)) - return 2; -+ free (line); - } - { - /* Test result for a NULL buffer and a non-zero size. -@@ -25960,7 +25934,9 @@ - size_t siz = (size_t)(~0) / 4; - if (getline (&line, &siz, in) == -1) - return 3; -+ free (line); - } -+ fclose (in); - return 0; - } - -@@ -26025,23 +26001,11 @@ - - - -- : -- -- -- -- -- - if test $ac_cv_have_decl_getlogin_r = no; then - HAVE_DECL_GETLOGIN_R=0 - fi - - -- : -- -- -- -- -- - if test $ac_cv_func_getlogin_r = no; then - HAVE_GETLOGIN_R=0 - else -@@ -26054,10 +26018,10 @@ - else - - case "$host_os" in -- # Guess no on OSF/1. -- osf*) gl_cv_func_getlogin_r_works="guessing no" ;; -- # Guess yes otherwise. -- *) gl_cv_func_getlogin_r_works="guessing yes" ;; -+ # Guess no on Mac OS X, OSF/1. -+ darwin* | osf*) gl_cv_func_getlogin_r_works="guessing no" ;; -+ # Guess yes otherwise. -+ *) gl_cv_func_getlogin_r_works="guessing yes" ;; - esac - if test "$cross_compiling" = yes; then : - : -@@ -26066,6 +26030,7 @@ - /* end confdefs.h. */ - - #include -+#include - #include - #if !HAVE_DECL_GETLOGIN_R - extern -@@ -26081,19 +26046,22 @@ - char buf[100]; - - if (getlogin_r (buf, 0) == 0) -- result |= 16; -+ result |= 1; - if (getlogin_r (buf, 1) == 0) -- result |= 17; -+ result |= 2; -+ if (getlogin_r (buf, 100) == 0) -+ { -+ size_t n = strlen (buf); -+ if (getlogin_r (buf, n) == 0) -+ result |= 4; -+ } - return result; - } - _ACEOF - if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_getlogin_r_works=yes - else -- case $? in -- 16 | 17) gl_cv_func_getlogin_r_works=no ;; -- esac -- -+ gl_cv_func_getlogin_r_works=no - fi - rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -@@ -26122,12 +26090,6 @@ - - - -- : -- -- -- -- -- - - fi - -@@ -26150,56 +26112,28 @@ - - - -- if test $REPLACE_GETOPT = 1; then -- -- -- -- -- -- -- -- -- gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" -- -- -- -- -- -- - - - -- gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" -- -- -- -- : -- - - -+ REPLACE_GETOPT=1 - -+ if test $REPLACE_GETOPT = 1; then - - -- GNULIB_GL_UNISTD_H_GETOPT=1 -+ if test $ac_cv_header_sys_cdefs_h = yes; then -+ HAVE_SYS_CDEFS_H=1 -+ else -+ HAVE_SYS_CDEFS_H=0 - fi - - - --$as_echo "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h -- -- -- -- -- -- -- -- REPLACE_GETOPT=1 -- -- if test $REPLACE_GETOPT = 1; then -+$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h - - GETOPT_H=getopt.h -- --$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h -+ GETOPT_CDEFS_H=getopt-cdefs.h - - - -@@ -26226,15 +26160,6 @@ - - gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" - -- -- -- : -- -- -- -- -- -- - GNULIB_GL_UNISTD_H_GETOPT=1 - fi - -@@ -26253,12 +26178,6 @@ - done - - -- : -- -- -- -- -- - if test $ac_cv_func_getpass = yes; then - HAVE_GETPASS=1 - else -@@ -26278,27 +26197,6 @@ - - - -- : -- -- -- -- -- -- -- -- -- -- : -- -- -- -- -- -- -- -- -- -- - - ac_fn_c_check_decl "$LINENO" "__fsetlocking" "ac_cv_have_decl___fsetlocking" "#include - #if HAVE_STDIO_EXT_H -@@ -26316,42 +26214,102 @@ - _ACEOF - - -- : -- -- - - - - - : - -+ fi - - - -+ ac_found=0 -+ ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include -+" -+if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then : -+ ac_have_decl=1 -+else -+ ac_have_decl=0 -+fi - -+cat >>confdefs.h <<_ACEOF -+#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl -+_ACEOF -+if test $ac_have_decl = 1; then : -+ ac_found=1 -+fi - -- : -- -- -- -- -- -- -- : -+ ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include -+" -+if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then : -+ ac_have_decl=1 -+else -+ ac_have_decl=0 -+fi - -+cat >>confdefs.h <<_ACEOF -+#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl -+_ACEOF -+if test $ac_have_decl = 1; then : -+ ac_found=1 -+fi - -+ ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include -+" -+if test "x$ac_cv_have_decl___argv" = xyes; then : -+ ac_have_decl=1 -+else -+ ac_have_decl=0 -+fi - -+cat >>confdefs.h <<_ACEOF -+#define HAVE_DECL___ARGV $ac_have_decl -+_ACEOF -+if test $ac_have_decl = 1; then : -+ ac_found=1 -+fi - - -+ # Incur the cost of this test only if none of the above worked. -+ if test $ac_found = 0; then -+ # On OpenBSD 5.1, using the global __progname variable appears to be -+ # the only way to implement getprogname. -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5 -+$as_echo_n "checking whether __progname is defined in default libraries... " >&6; } -+if ${gl_cv_var___progname+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else - -- : -+ gl_cv_var___progname= -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+extern char *__progname; -+int -+main () -+{ -+return *__progname; - -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_link "$LINENO"; then : -+ gl_cv_var___progname=yes - -+fi -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext - - -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5 -+$as_echo "$gl_cv_var___progname" >&6; } -+ if test "$gl_cv_var___progname" = yes; then - -- : -+$as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h - -+ fi - fi - - -@@ -26361,10 +26319,6 @@ - - - -- : -- -- -- - - - -@@ -26375,6 +26329,7 @@ - - - -+ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5 - $as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; } - if ${gl_cv_func_gettimeofday_clobber+:} false; then : -@@ -26431,11 +26386,14 @@ - *yes) - REPLACE_GETTIMEOFDAY=1 - -- REPLACE_GMTIME=1 -- REPLACE_LOCALTIME=1 -+$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h -+ - - --$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h -+ -+ NEED_LOCALTIME_BUFFER=1 -+ REPLACE_GMTIME=1 -+ REPLACE_LOCALTIME=1 - - ;; - esac -@@ -26503,7 +26461,9 @@ - if test $REPLACE_STRUCT_TIMEVAL = 1; then - REPLACE_GETTIMEOFDAY=1 - fi -- -+ case "$host_os" in -+ mingw*) REPLACE_GETTIMEOFDAY=1 ;; -+ esac - fi - - cat >>confdefs.h <<_ACEOF -@@ -26522,31 +26482,7 @@ - - gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext" - -- -- for ac_header in sys/timeb.h --do : -- ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default" --if test "x$ac_cv_header_sys_timeb_h" = xyes; then : -- cat >>confdefs.h <<_ACEOF --#define HAVE_SYS_TIMEB_H 1 --_ACEOF -- --fi -- --done -- -- for ac_func in _ftime --do : -- ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime" --if test "x$ac_cv_func__ftime" = xyes; then : -- cat >>confdefs.h <<_ACEOF --#define HAVE__FTIME 1 --_ACEOF -- --fi --done -- -- -+ : - fi - - -@@ -26565,9 +26501,6 @@ - - - -- : -- -- - - - -@@ -26575,15 +26508,6 @@ - - - -- -- -- -- : -- -- -- -- -- - if test $ac_cv_func_getusershell = yes; then - HAVE_GETUSERSHELL=1 - ac_fn_c_check_decl "$LINENO" "getusershell" "ac_cv_have_decl_getusershell" "$ac_includes_default" -@@ -26749,34 +26673,13 @@ - gl_LIBOBJS="$gl_LIBOBJS glob.$ac_objext" - - -- -- : -- -- -- -- -- -- -- -- if test $ac_cv_header_sys_cdefs_h = yes; then -+ if test $ac_cv_header_sys_cdefs_h = yes; then - HAVE_SYS_CDEFS_H=1 - else - HAVE_SYS_CDEFS_H=0 - fi - - -- : -- -- -- -- -- -- -- -- -- -- -- - fi - # Autoconf 2.61a.99 and earlier don't support linking a file only - # in VPATH builds. But since GNUmakefile is for maintainer use -@@ -26787,6 +26690,9 @@ - ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile" - - -+ : -+ -+ - HOSTENT_LIB= - gl_saved_libs="$LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 -@@ -26916,12 +26822,6 @@ - - - -- : -- -- -- -- -- - if test $ac_cv_header_sys_socket_h != yes; then - for ac_header in winsock2.h - do : -@@ -27047,12 +26947,6 @@ - fi - - -- : -- -- -- -- -- - ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include - #if HAVE_NETDB_H - # include -@@ -27203,12 +27097,6 @@ - - - -- : -- -- -- -- -- - - - -@@ -27287,12 +27175,6 @@ - HAVE_LANGINFO_ERA=0 - HAVE_LANGINFO_YESEXPR=0 - -- : -- -- -- -- -- - if test $ac_cv_header_langinfo_h = yes; then - HAVE_LANGINFO_H=1 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5 -@@ -27474,11 +27356,6 @@ - - - -- : -- -- -- -- - - - -@@ -27531,12 +27408,6 @@ - $as_echo "$gl_cv_header_locale_h_posix2001" >&6; } - - -- : -- -- -- -- -- - if test $ac_cv_header_xlocale_h = yes; then - HAVE_XLOCALE_H=1 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5 -@@ -27777,17 +27648,181 @@ - - - -+ -+ -+ -+ -+ -+ -+ -+ gl_LIBOBJS="$gl_LIBOBJS localtime-buffer.$ac_objext" -+ -+ -+ - if test "$gl_threads_api" = posix; then - # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the - # pthread_rwlock_* functions. -+ has_rwlock=false - ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include - " - if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then : -+ has_rwlock=true - - $as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h - - fi - -+ if $has_rwlock; then -+ -+ -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5 -+$as_echo_n "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; } -+if ${gl_cv_pthread_rwlock_rdlock_prefer_writer+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ save_LIBS="$LIBS" -+ LIBS="$LIBS $LIBMULTITHREAD" -+ if test "$cross_compiling" = yes; then : -+ gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes" -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+#include -+#include -+#include -+#include -+ -+#define SUCCEED() exit (0) -+#define FAILURE() exit (1) -+#define UNEXPECTED(n) (exit (10 + (n))) -+ -+/* The main thread creates the waiting writer and the requesting reader threads -+ in the default way; this guarantees that they have the same priority. -+ We can reuse the main thread as first reader thread. */ -+ -+static pthread_rwlock_t lock; -+static pthread_t reader1; -+static pthread_t writer; -+static pthread_t reader2; -+static pthread_t timer; -+/* Used to pass control from writer to reader2 and from reader2 to timer, -+ as in a relay race. -+ Passing control from one running thread to another running thread -+ is most likely faster than to create the second thread. */ -+static pthread_mutex_t baton; -+ -+static void * -+timer_func (void *ignored) -+{ -+ /* Step 13 (can be before or after step 12): -+ The timer thread takes the baton, then waits a moment to make sure -+ it can tell whether the second reader thread is blocked at step 12. */ -+ if (pthread_mutex_lock (&baton)) -+ UNEXPECTED (13); -+ usleep (100000); -+ /* By the time we get here, it's clear that the second reader thread is -+ blocked at step 12. This is the desired behaviour. */ -+ SUCCEED (); -+} -+ -+static void * -+reader2_func (void *ignored) -+{ -+ int err; -+ -+ /* Step 8 (can be before or after step 7): -+ The second reader thread takes the baton, then waits a moment to make sure -+ the writer thread has reached step 7. */ -+ if (pthread_mutex_lock (&baton)) -+ UNEXPECTED (8); -+ usleep (100000); -+ /* Step 9: The second reader thread requests the lock. */ -+ err = pthread_rwlock_tryrdlock (&lock); -+ if (err == 0) -+ FAILURE (); -+ else if (err != EBUSY) -+ UNEXPECTED (9); -+ /* Step 10: Launch a timer, to test whether the next call blocks. */ -+ if (pthread_create (&timer, NULL, timer_func, NULL)) -+ UNEXPECTED (10); -+ /* Step 11: Release the baton. */ -+ if (pthread_mutex_unlock (&baton)) -+ UNEXPECTED (11); -+ /* Step 12: The second reader thread requests the lock. */ -+ err = pthread_rwlock_rdlock (&lock); -+ if (err == 0) -+ FAILURE (); -+ else -+ UNEXPECTED (12); -+} -+ -+static void * -+writer_func (void *ignored) -+{ -+ /* Step 4: Take the baton, so that the second reader thread does not go ahead -+ too early. */ -+ if (pthread_mutex_lock (&baton)) -+ UNEXPECTED (4); -+ /* Step 5: Create the second reader thread. */ -+ if (pthread_create (&reader2, NULL, reader2_func, NULL)) -+ UNEXPECTED (5); -+ /* Step 6: Release the baton. */ -+ if (pthread_mutex_unlock (&baton)) -+ UNEXPECTED (6); -+ /* Step 7: The writer thread requests the lock. */ -+ if (pthread_rwlock_wrlock (&lock)) -+ UNEXPECTED (7); -+ return NULL; -+} -+ -+int -+main () -+{ -+ reader1 = pthread_self (); -+ -+ /* Step 1: The main thread initializes the lock and the baton. */ -+ if (pthread_rwlock_init (&lock, NULL)) -+ UNEXPECTED (1); -+ if (pthread_mutex_init (&baton, NULL)) -+ UNEXPECTED (1); -+ /* Step 2: The main thread acquires the lock as a reader. */ -+ if (pthread_rwlock_rdlock (&lock)) -+ UNEXPECTED (2); -+ /* Step 3: Create the writer thread. */ -+ if (pthread_create (&writer, NULL, writer_func, NULL)) -+ UNEXPECTED (3); -+ /* Job done. Go to sleep. */ -+ for (;;) -+ { -+ sleep (1); -+ } -+} -+ -+_ACEOF -+if ac_fn_c_try_run "$LINENO"; then : -+ gl_cv_pthread_rwlock_rdlock_prefer_writer=yes -+else -+ gl_cv_pthread_rwlock_rdlock_prefer_writer=no -+fi -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -+ conftest.$ac_objext conftest.beam conftest.$ac_ext -+fi -+ -+ LIBS="$save_LIBS" -+ -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5 -+$as_echo "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; } -+ case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in -+ *yes) -+ -+$as_echo "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h -+ -+ ;; -+ esac -+ -+ fi - # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ -@@ -27878,12 +27913,6 @@ - - - -- : -- -- -- -- -- - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5 - $as_echo_n "checking whether lseek detects pipes... " >&6; } - if ${gl_cv_func_lseek_pipe+:} false; then : -@@ -27996,12 +28025,6 @@ - - - -- : -- -- -- -- -- - if test $ac_cv_func_lstat = yes; then - - case "$gl_cv_func_lstat_dereferences_slashed_symlink" in -@@ -28085,7 +28108,10 @@ - int - main () - { --return ! malloc (0); -+char *p = malloc (0); -+ int result = !p; -+ free (p); -+ return result; - ; - return 0; - } -@@ -28186,18 +28212,6 @@ - - - -- : -- -- -- -- -- -- -- : -- -- -- -- - - if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then - -@@ -28243,7 +28257,7 @@ - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) - if (mbsinit (&state)) -- return 1; -+ return 2; - } - return 0; - } -@@ -28310,7 +28324,7 @@ - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 3, 6, &state) != 4 - && mbtowc (&wc, input + 3, 6) == 4) -- return 1; -+ return 2; - } - return 0; - } -@@ -28345,12 +28359,6 @@ - - - -- : -- -- -- -- -- - if test $ac_cv_func_mbrtowc = no; then - HAVE_MBRTOWC=0 - ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" " -@@ -28503,7 +28511,7 @@ - mbrtowc (&wc, NULL, 5, &state); - /* Check that wc was not modified. */ - if (wc != (wchar_t) 0xBADFACE) -- return 1; -+ return 2; - } - return 0; - } -@@ -28703,7 +28711,7 @@ - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, "", 1, &state) != 0) -- return 1; -+ return 2; - } - return 0; - } -@@ -28749,13 +28757,13 @@ - int - main (void) - { -- return mbrtowc (&wc, "", 0, &mbs) == (size_t) -2; -+ return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2; - } - _ACEOF - if ac_fn_c_try_run "$LINENO"; then : -- gl_cv_func_mbrtowc_empty_input=no --else - gl_cv_func_mbrtowc_empty_input=yes -+else -+ gl_cv_func_mbrtowc_empty_input=no - fi - rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -@@ -28766,6 +28774,60 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5 - $as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; } - -+ -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5 -+$as_echo_n "checking whether the C locale is free of encoding errors... " >&6; } -+if ${gl_cv_C_locale_sans_EILSEQ+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ -+ gl_cv_C_locale_sans_EILSEQ="guessing no" -+ -+ if test "$cross_compiling" = yes; then : -+ : -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+#include -+ #include -+ #include -+ -+int -+main () -+{ -+ -+ int i; -+ char *locale = setlocale (LC_ALL, "C"); -+ if (! locale) -+ return 2; -+ for (i = CHAR_MIN; i <= CHAR_MAX; i++) -+ { -+ char c = i; -+ wchar_t wc; -+ mbstate_t mbs = { 0, }; -+ size_t ss = mbrtowc (&wc, &c, 1, &mbs); -+ if (1 < ss) -+ return 3; -+ } -+ return 0; -+ -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_run "$LINENO"; then : -+ gl_cv_C_locale_sans_EILSEQ=yes -+else -+ gl_cv_C_locale_sans_EILSEQ=no -+fi -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -+ conftest.$ac_objext conftest.beam conftest.$ac_ext -+fi -+ -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_C_locale_sans_EILSEQ" >&5 -+$as_echo "$gl_cv_C_locale_sans_EILSEQ" >&6; } -+ - case "$gl_cv_func_mbrtowc_null_arg1" in - *yes) ;; - *) -@@ -28806,6 +28868,14 @@ - REPLACE_MBRTOWC=1 - ;; - esac -+ case $gl_cv_C_locale_sans_EILSEQ in -+ *yes) ;; -+ *) -+$as_echo "#define C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h -+ -+ REPLACE_MBRTOWC=1 -+ ;; -+ esac - fi - fi - -@@ -28849,18 +28919,6 @@ - - - -- : -- -- -- -- -- -- -- : -- -- -- -- - - if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then - -@@ -28906,7 +28964,7 @@ - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) - if (mbsinit (&state)) -- return 1; -+ return 2; - } - return 0; - } -@@ -28973,7 +29031,7 @@ - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 3, 6, &state) != 4 - && mbtowc (&wc, input + 3, 6) == 4) -- return 1; -+ return 2; - } - return 0; - } -@@ -29008,12 +29066,6 @@ - - - -- : -- -- -- -- -- - if test $ac_cv_func_mbsinit = no; then - HAVE_MBSINIT=0 - ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" " -@@ -29089,18 +29141,6 @@ - - - -- : -- -- -- -- -- -- -- : -- -- -- -- - - if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then - -@@ -29146,7 +29186,7 @@ - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) - if (mbsinit (&state)) -- return 1; -+ return 2; - } - return 0; - } -@@ -29213,7 +29253,7 @@ - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 3, 6, &state) != 4 - && mbtowc (&wc, input + 3, 6) == 4) -- return 1; -+ return 2; - } - return 0; - } -@@ -29248,12 +29288,6 @@ - - - -- : -- -- -- -- -- - if test $ac_cv_func_mbsrtowcs = no; then - HAVE_MBSRTOWCS=0 - ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" " -@@ -29579,12 +29613,6 @@ - - - -- : -- -- -- -- -- - if test $ac_cv_have_decl_memrchr = no; then - HAVE_DECL_MEMRCHR=0 - fi -@@ -29631,21 +29659,9 @@ - - - -- : -- -- -- -- -- -- -- -- -- -- - - - -- : - - - -@@ -29759,23 +29775,6 @@ - - - -- -- : -- -- -- -- -- -- if test $ac_cv_func__set_invalid_parameter_handler = yes; then -- HAVE_MSVC_INVALID_PARAMETER_HANDLER=1 -- --$as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h -- -- else -- HAVE_MSVC_INVALID_PARAMETER_HANDLER=0 -- fi -- -- - if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then - - -@@ -29789,8 +29788,6 @@ - - fi - -- -- - if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then - - -@@ -29805,6 +29802,9 @@ - fi - - -+cat >>confdefs.h <<_ACEOF -+#define GNULIB_MSVC_NOTHROW 1 -+_ACEOF - - - -@@ -29812,8 +29812,6 @@ - - - -- : -- - - - -@@ -29987,12 +29985,6 @@ - - - -- : -- -- -- -- -- - - - -@@ -30087,12 +30079,6 @@ - - - -- : -- -- -- -- -- - if test $ac_cv_func_nl_langinfo = yes; then - # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5 -@@ -30256,12 +30242,6 @@ - ;; - *) - -- : -- -- -- -- -- - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5 - $as_echo_n "checking whether open recognizes a trailing slash... " >&6; } - if ${gl_cv_func_open_slash+:} false; then : -@@ -30330,12 +30310,6 @@ - - - -- : -- -- -- -- -- - if test $ac_cv_func_fchdir = no; then - HAVE_FCHDIR=0 - fi -@@ -30382,12 +30356,6 @@ - - - -- : -- -- -- -- -- - - case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in - yes+*yes) -@@ -30460,12 +30428,6 @@ - - - -- : -- -- -- -- -- - if test $ac_cv_func_fchdir = no; then - HAVE_FCHDIR=0 - fi -@@ -30476,6 +30438,10 @@ - fi - fi - -+ case $host_os,$HAVE_OPENDIR in -+ os2*,1) -+ REPLACE_OPENDIR=1;; -+ esac - - if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then - -@@ -30628,12 +30594,6 @@ - - - -- : -- -- -- -- -- - - - -@@ -30774,15 +30734,6 @@ - - - -- : -- -- -- -- -- -- -- -- - - fi - -@@ -30804,12 +30755,6 @@ - - - -- : -- -- -- -- -- - if test $ac_cv_header_poll_h = yes; then - HAVE_POLL_H=1 - else -@@ -30823,12 +30768,6 @@ - - - -- : -- -- -- -- -- - - - -@@ -30948,12 +30887,6 @@ - - - -- : -- -- -- -- -- - if test $ac_cv_func_posix_openpt != yes; then - HAVE_POSIX_OPENPT=0 - fi -@@ -31107,26 +31040,8 @@ - - - -- : -- -- -- -- -- -- -- -- - if test $ac_cv_header_utmp_h = yes || test $ac_cv_header_utmpx_h = yes; then - -- : -- -- -- -- -- -- -- -- - ac_fn_c_check_decl "$LINENO" "getutent" "ac_cv_have_decl_getutent" " - /* is a prerequisite of on FreeBSD 8.0, OpenBSD 4.6. */ - #include -@@ -31437,7 +31352,10 @@ - int - main () - { --return ! realloc (0, 0); -+char *p = realloc (0, 0); -+ int result = !p; -+ free (p); -+ return result; - ; - return 0; - } -@@ -31542,18 +31460,6 @@ - # If cross compiling, assume the test would fail and use the included - # regex.c. - -- : -- -- -- -- -- -- -- : -- -- -- -- - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5 - $as_echo_n "checking for working re_compile_pattern... " >&6; } -@@ -31628,6 +31534,7 @@ - 0, sizeof data - 1, ®s) - != -1) - result |= 1; -+ regfree (®ex); - } - - { -@@ -31659,6 +31566,7 @@ - if (i != 0 && i != 21) - result |= 1; - } -+ regfree (®ex); - } - - if (! setlocale (LC_ALL, "C")) -@@ -31869,15 +31777,6 @@ - done - - -- : -- -- -- -- -- -- -- -- - ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include - " - if test "x$ac_cv_have_decl_isblank" = xyes; then : -@@ -31939,24 +31838,12 @@ - - - -- : -- -- -- - - - - - - -- -- -- : -- -- -- -- -- - if test $ac_cv_func_secure_getenv = no; then - HAVE_SECURE_GETENV=0 - fi -@@ -31998,6 +31885,7 @@ - - fi - -+ - fi - - -@@ -32017,16 +31905,11 @@ - - - -+ - if test "$ac_cv_header_winsock2_h" = yes; then - REPLACE_SELECT=1 - else - -- : -- -- -- -- -- - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether select supports a 0 argument" >&5 - $as_echo_n "checking whether select supports a 0 argument... " >&6; } - if ${gl_cv_func_select_supports0+:} false; then : -@@ -32414,24 +32297,6 @@ - - - -- : -- -- -- -- -- -- -- : -- -- -- -- -- -- -- : -- -- -- - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HOST_NAME_MAX" >&5 -@@ -32806,12 +32671,6 @@ - _ACEOF - - -- : -- -- -- -- -- - if test $ac_cv_have_decl_sleep != yes; then - HAVE_SLEEP=0 - else -@@ -33054,16 +32913,15 @@ - - if test $ac_cv_func_snprintf = yes; then - REPLACE_SNPRINTF=1 -- fi -- : -+ else - -+ if test $ac_cv_have_decl_snprintf = yes; then -+ REPLACE_SNPRINTF=1 -+ fi - fi -- - : - -- -- -- -+ fi - - if test $ac_cv_have_decl_snprintf = no; then - HAVE_DECL_SNPRINTF=0 -@@ -33192,64 +33050,29 @@ - - - -- : -- -- -- -- -- -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5 --$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; } --if ${gl_cv_func_stat_dir_slash+:} false; then : -- $as_echo_n "(cached) " >&6 --else -- if test "$cross_compiling" = yes; then : -- case $host_os in -- mingw*) gl_cv_func_stat_dir_slash="guessing no";; -- *) gl_cv_func_stat_dir_slash="guessing yes";; -- esac --else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --#include - --int --main () --{ --struct stat st; return stat (".", &st) != stat ("./", &st); -- ; -- return 0; --} --_ACEOF --if ac_fn_c_try_run "$LINENO"; then : -- gl_cv_func_stat_dir_slash=yes --else -- gl_cv_func_stat_dir_slash=no --fi --rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -- conftest.$ac_objext conftest.beam conftest.$ac_ext --fi -- --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5 --$as_echo "$gl_cv_func_stat_dir_slash" >&6; } -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5 -+ case "$host_os" in -+ mingw*) -+ REPLACE_STAT=1 -+ ;; -+ *) -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5 - $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; } - if ${gl_cv_func_stat_file_slash+:} false; then : - $as_echo_n "(cached) " >&6 - else - touch conftest.tmp -- # Assume that if we have lstat, we can also check symlinks. -- if test $ac_cv_func_lstat = yes; then -- ln -s conftest.tmp conftest.lnk -- fi -- if test "$cross_compiling" = yes; then : -+ # Assume that if we have lstat, we can also check symlinks. -+ if test $ac_cv_func_lstat = yes; then -+ ln -s conftest.tmp conftest.lnk -+ fi -+ if test "$cross_compiling" = yes; then : - case "$host_os" in -- # Guess yes on glibc systems. -- *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;; -- # If we don't know, assume the worst. -- *) gl_cv_func_stat_file_slash="guessing no" ;; -- esac -+ # Guess yes on glibc systems. -+ *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;; -+ # If we don't know, assume the worst. -+ *) gl_cv_func_stat_file_slash="guessing no" ;; -+ esac - - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -@@ -33260,14 +33083,14 @@ - main () - { - int result = 0; -- struct stat st; -- if (!stat ("conftest.tmp/", &st)) -- result |= 1; -+ struct stat st; -+ if (!stat ("conftest.tmp/", &st)) -+ result |= 1; - #if HAVE_LSTAT -- if (!stat ("conftest.lnk/", &st)) -- result |= 2; -+ if (!stat ("conftest.lnk/", &st)) -+ result |= 2; - #endif -- return result; -+ return result; - - ; - return 0; -@@ -33282,21 +33105,18 @@ - conftest.$ac_objext conftest.beam conftest.$ac_ext - fi - -- rm -f conftest.tmp conftest.lnk -+ rm -f conftest.tmp conftest.lnk - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5 - $as_echo "$gl_cv_func_stat_file_slash" >&6; } -- case $gl_cv_func_stat_dir_slash in -- *no) REPLACE_STAT=1 -- --$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h --;; -- esac -- case $gl_cv_func_stat_file_slash in -- *no) REPLACE_STAT=1 -+ case $gl_cv_func_stat_file_slash in -+ *no) -+ REPLACE_STAT=1 - - $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h - ;; -+ esac -+ ;; - esac - - if test $REPLACE_STAT = 1; then -@@ -33310,7 +33130,20 @@ - - gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext" - -- : -+ -+ -+ -+ -+ -+ -+ -+ -+ gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext" -+ -+ -+ -+ : -+ - fi - - -@@ -33357,8 +33190,8 @@ - || (defined __APPLE__ && defined __MACH__ \ - ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \ - : __GNUC__) \ -- || __HP_cc || __HP_aCC || __IBMC__ || __IBMCPP__ \ -- || __ICC || 0x5110 <= __SUNPRO_C \ -+ || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \ -+ || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__ \ - || 1300 <= _MSC_VER) - struct alignas_test { char c; char alignas (8) alignas_8; }; - char test_alignas[offsetof (struct alignas_test, alignas_8) == 8 -@@ -33743,6 +33576,7 @@ - - - -+ $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h - - - -@@ -33817,27 +33651,39 @@ - - - -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inttypes macros match system or gnu printf" >&5 --$as_echo_n "checking whether inttypes macros match system or gnu printf... " >&6; } -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5 -+$as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; } - if ${gl_cv_func_printf_attribute_flavor+:} false; then : - $as_echo_n "(cached) " >&6 - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ --#define __STDC_FORMAT_MACROS 1 -+ -+ #define __STDC_FORMAT_MACROS 1 - #include - #include -- findme PRIdMAX findme -+ /* For non-mingw systems, compilation will trivially succeed. -+ For mingw, compilation will succeed for older mingw (system -+ printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */ -+ #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \ -+ (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -+ extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1]; -+ #endif - -+int -+main () -+{ -+ -+ ; -+ return 0; -+} - _ACEOF --if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -- $EGREP "findme .(ll|j)d. findme" >/dev/null 2>&1; then : -- gl_cv_func_printf_attribute_flavor=gnu --else -+if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_func_printf_attribute_flavor=system -+else -+ gl_cv_func_printf_attribute_flavor=gnu - fi --rm -f conftest* -- -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5 - $as_echo "$gl_cv_func_printf_attribute_flavor" >&6; } -@@ -33999,7 +33845,7 @@ - - - -- for gl_func in _Exit atoll canonicalize_file_name getloadavg getsubopt grantpt initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps posix_openpt ptsname ptsname_r random random_r realpath rpmatch secure_getenv setenv setstate setstate_r srandom srandom_r strtod strtoll strtoull unlockpt unsetenv; do -+ for gl_func in _Exit atoll canonicalize_file_name getloadavg getsubopt grantpt initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps posix_openpt ptsname ptsname_r qsort_r random random_r realpath rpmatch secure_getenv setenv setstate setstate_r srandom srandom_r strtod strtoll strtoull unlockpt unsetenv; do - as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 - $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -@@ -34240,24 +34086,12 @@ - - - -- : -- -- -- -- -- - if test $ac_cv_func_strdup = yes; then - if test $gl_cv_func_malloc_posix != yes; then - REPLACE_STRDUP=1 - fi - fi - -- : -- -- -- -- -- - if test $ac_cv_have_decl_strdup = no; then - HAVE_DECL_STRDUP=0 - fi -@@ -34397,12 +34231,6 @@ - - - -- : -- -- -- -- -- - if test $ac_cv_header_sys_socket_h != yes; then - for ac_header in winsock2.h - do : -@@ -34438,18 +34266,6 @@ - - - -- : -- -- -- -- -- -- -- : -- -- -- -- - - if test $ac_cv_have_decl_strndup = no; then - HAVE_DECL_STRNDUP=0 -@@ -34487,11 +34303,14 @@ - #endif - char *strndup (const char *, size_t); - #endif -+ int result; - char *s; - s = strndup ("some longer string", 15); - free (s); - s = strndup ("shorter string", 13); -- return s[13] != '\0'; -+ result = s[13] != '\0'; -+ free (s); -+ return result; - ; - return 0; - } -@@ -34548,12 +34367,6 @@ - - - -- : -- -- -- -- -- - if test $ac_cv_have_decl_strnlen = no; then - HAVE_DECL_STRNLEN=0 - else -@@ -34648,12 +34461,6 @@ - - - -- : -- -- -- -- -- - if test $ac_cv_header_sys_ioctl_h = yes; then - HAVE_SYS_IOCTL_H=1 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether declares ioctl" >&5 -@@ -34693,12 +34500,6 @@ - - - -- : -- -- -- -- -- - - - -@@ -34908,12 +34709,6 @@ - - - -- : -- -- -- -- -- - - - -@@ -34996,12 +34791,6 @@ - - - -- : -- -- -- -- -- - if test $ac_cv_header_sys_socket_h != yes; then - for ac_header in winsock2.h - do : -@@ -35087,12 +34876,6 @@ - - - -- : -- -- -- -- -- - - - -@@ -35169,14 +34952,14 @@ - - - -+ WINDOWS_STAT_TIMESPEC=0 -+ -+ - - - -- if test $WINDOWS_64_BIT_ST_SIZE = 1; then - --$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h - -- fi - - ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include - #include -@@ -35246,12 +35029,6 @@ - - - -- : -- -- -- -- -- - - - -@@ -35334,12 +35111,6 @@ - - - -- : -- -- -- -- -- - if test $ac_cv_header_sysexits_h = yes; then - HAVE_SYSEXITS_H=1 - -@@ -35348,12 +35119,6 @@ - - - -- : -- -- -- -- -- - - - -@@ -35492,12 +35257,6 @@ - - - -- : -- -- -- -- -- - - - -@@ -35632,12 +35391,6 @@ - - - -- : -- -- -- -- -- - - - -@@ -35722,7 +35475,7 @@ - - - -- for gl_func in chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups gethostname getlogin getlogin_r getpagesize getusershell setusershell endusershell group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite readlink readlinkat rmdir sethostname sleep symlink symlinkat ttyname_r unlink unlinkat usleep; do -+ for gl_func in chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups gethostname getlogin getlogin_r getpagesize getusershell setusershell endusershell group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite readlink readlinkat rmdir sethostname sleep symlink symlinkat truncate ttyname_r unlink unlinkat usleep; do - as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 - $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -@@ -35776,30 +35529,12 @@ - - - -- : -- -- -- -- -- -- -- -- -- : -- -- - - - - if test $ac_cv_func_vasnprintf = no; then - - -- : -- -- -- -- -- - - - -@@ -36142,16 +35877,15 @@ - - if test $ac_cv_func_vsnprintf = yes; then - REPLACE_VSNPRINTF=1 -- fi -- : -+ else - -+ if test $ac_cv_have_decl_vsnprintf = yes; then -+ REPLACE_VSNPRINTF=1 -+ fi - fi -- - : - -- -- -- -+ fi - - if test $ac_cv_have_decl_vsnprintf = no; then - HAVE_DECL_VSNPRINTF=0 -@@ -36181,12 +35915,6 @@ - - - -- : -- -- -- -- -- - - - -@@ -36277,7 +36005,9 @@ - - - -- for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth ; do -+ -+ -+ for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth wcsftime ; do - as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 - $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -@@ -36336,18 +36066,6 @@ - - - -- : -- -- -- -- -- -- -- : -- -- -- -- - - if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then - -@@ -36393,7 +36111,7 @@ - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) - if (mbsinit (&state)) -- return 1; -+ return 2; - } - return 0; - } -@@ -36460,7 +36178,7 @@ - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 3, 6, &state) != 4 - && mbtowc (&wc, input + 3, 6) == 4) -- return 1; -+ return 2; - } - return 0; - } -@@ -36495,12 +36213,6 @@ - - - -- : -- -- -- -- -- - if test $ac_cv_func_wcrtomb = no; then - HAVE_WCRTOMB=0 - ac_fn_c_check_decl "$LINENO" "wcrtomb" "ac_cv_have_decl_wcrtomb" " -@@ -36647,12 +36359,6 @@ - - - -- : -- -- -- -- -- - if test $ac_cv_func_iswcntrl = yes; then - HAVE_ISWCNTRL=1 - else -@@ -36674,10 +36380,6 @@ - - - -- : -- -- -- - - - -@@ -37240,7 +36942,7 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_initscr" >&5 - $as_echo "$ac_cv_lib_ncurses_initscr" >&6; } - if test "x$ac_cv_lib_ncurses_initscr" = xyes; then : -- LIBNCURSES="-lncurses" -+ LIBNCURSES="-lncursesw" - fi - - if test "$LIBNCURSES"; then -@@ -37271,8 +36973,8 @@ - $as_echo_n "(cached) " >&6 - else - for D in $includedir $prefix/include /local/include /usr/local/include /include /usr/include; do -- if test -d $D/ncurses; then -- inetutils_cv_includedir_ncurses="$D/ncurses" -+ if test -d $D/ncursesw; then -+ inetutils_cv_includedir_ncurses="$D/ncursesw" - break - fi - test "$inetutils_cv_includedir_ncurses" \ -@@ -39079,8 +38781,19 @@ - - - # At least OpenSolaris is missing . -+ac_fn_c_check_header_compile "$LINENO" "protocols/osockaddr.h" "ac_cv_header_protocols_osockaddr_h" "#include -+#include -+ -+" -+if test "x$ac_cv_header_protocols_osockaddr_h" = xyes; then : -+ -+fi -+ -+ -+ - ac_fn_c_check_header_compile "$LINENO" "protocols/talkd.h" "ac_cv_header_protocols_talkd_h" "#include - #include -+#include - - " - if test "x$ac_cv_header_protocols_talkd_h" = xyes; then : -@@ -40363,7 +40076,13 @@ - LIBS="$save_LIBS -lwrap" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ --int allow_severity = 1; int deny_severity = 1; -+#ifdef __CYGWIN__ -+ extern int allow_severity = 1; -+ extern int deny_severity = 1; -+ #else -+ int allow_severity = 1; -+ int deny_severity = 1; -+ #endif - int - main () - { -@@ -40826,7 +40545,7 @@ - fi - - --for ac_header in arpa/nameser.h errno.h fcntl.h features.h \ -+for ac_header in stdio.h arpa/nameser.h errno.h fcntl.h features.h \ - glob.h memory.h netinet/ether.h netinet/in_systm.h \ - netinet/ip.h netinet/ip_icmp.h netinet/ip_var.h \ - security/pam_appl.h shadow.h \ -@@ -40837,11 +40556,14 @@ - sys/proc.h sys/select.h sys/time.h sys/wait.h \ - sys/resource.h \ - stropts.h tcpd.h utmp.h utmpx.h unistd.h \ -- vis.h -+ vis.h crypt.h - do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` - ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " - #include -+#ifdef HAVE_STDIO_H -+# include -+#endif - #ifdef HAVE_NETINET_IN_SYSTM_H - # include - #endif -@@ -40961,6 +40683,20 @@ - - - ### Checks for structures. -+ac_fn_c_check_type "$LINENO" "struct osockaddr" "ac_cv_type_struct_osockaddr" "#include -+#include -+#ifdef HAVE_OSOCKADDR_H -+# include -+#endif -+ -+" -+if test "x$ac_cv_type_struct_osockaddr" = xyes; then : -+ -+$as_echo "#define HAVE_STRUCT_OSOCKADDR 1" >>confdefs.h -+ -+fi -+ -+ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_in.sin_len" >&5 - $as_echo_n "checking for struct sockaddr_in.sin_len... " >&6; } - if ${ac_cv_member_struct_sockaddr_in_sin_len+:} false; then : -@@ -43253,21 +42989,6 @@ - - - -- -- -- -- : -- -- -- -- -- -- -- -- -- -- -- - for ac_func in getpagesize - do : - ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" -@@ -43876,6 +43597,10 @@ - - - ac_fn_c_check_decl "$LINENO" "crypt" "ac_cv_have_decl_crypt" "#include -+#ifdef HAVE_CRYPT_H -+# include -+#endif -+ - " - if test "x$ac_cv_have_decl_crypt" = xyes; then : - ac_have_decl=1 -@@ -43992,6 +43717,39 @@ - fi - - -+ -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIOCNOTTY" >&5 -+$as_echo_n "checking for TIOCNOTTY... " >&6; } -+if ${inetutils_cv_macro_tiocnotty+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+#include -+#if defined(TIOCNOTTY) -+IU_CHECK_MACRO_TIOCNOTTY -+#endif -+ -+_ACEOF -+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -+ $EGREP "IU_CHECK_MACRO_TIOCNOTTY" >/dev/null 2>&1; then : -+ inetutils_cv_macro_tiocnotty=yes -+else -+ inetutils_cv_macro_tiocnotty=no -+fi -+rm -f conftest* -+ -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $inetutils_cv_macro_tiocnotty" >&5 -+$as_echo "$inetutils_cv_macro_tiocnotty" >&6; } -+if test "$inetutils_cv_macro_tiocnotty" = yes; then -+ -+$as_echo "#define HAVE_TIOCNOTTY 1" >>confdefs.h -+ -+else -+ : -+fi -+ - # Some systems don't declare common functions (especially if they - # return int), at least in the expected header file. Check. - ac_fn_c_check_decl "$LINENO" "fclose" "ac_cv_have_decl_fclose" "#include -@@ -44627,6 +44385,12 @@ - $as_echo "#define HAVE_STREAMSPTY 1" >>confdefs.h - - ;; -+*cygwin*) -+ LIBS="/usr/lib/textmode.o ${LIBS}" -+ -+$as_echo "#define UTMPX 1" >>confdefs.h -+ -+ ;; - *irix* | *hpux* ) - # Known and needed work-arounds? - ;; -@@ -44967,6 +44731,10 @@ - as_fn_error $? "conditional \"GL_GENERATE_GLOB_H\" was never defined. - Usually this means the macro was only invoked conditionally." "$LINENO" 5 - fi -+if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then -+ as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined. -+Usually this means the macro was only invoked conditionally." "$LINENO" 5 -+fi - if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then - as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined. - Usually this means the macro was only invoked conditionally." "$LINENO" 5 -@@ -44993,6 +44761,10 @@ - as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined. - Usually this means the macro was only invoked conditionally." "$LINENO" 5 - fi -+if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then -+ as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined. -+Usually this means the macro was only invoked conditionally." "$LINENO" 5 -+fi - if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then - as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined. - Usually this means the macro was only invoked conditionally." "$LINENO" 5 -diff -durN inetutils-1.9.4.orig/doc/gendocs_template inetutils-1.9.4/doc/gendocs_template ---- inetutils-1.9.4.orig/doc/gendocs_template 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/doc/gendocs_template 2017-05-15 17:50:57.125000000 +0800 -@@ -0,0 +1,91 @@ -+ -+ -+%%TITLE%% - GNU Project - Free Software Foundation -+ -+

%%TITLE%%

-+ -+
Free Software Foundation
-+
last updated %%DATE%%
-+ -+

This manual (%%PACKAGE%%) is available in the following formats:

-+ -+ -+ -+

You can buy printed copies of -+some manuals (among other items) from the Free Software Foundation; -+this helps support FSF activities.

-+ -+

(This page generated by the %%SCRIPTNAME%% -+script.)

-+ -+ -+ -+ -+ -+ -+ -+ -diff -durN inetutils-1.9.4.orig/doc/gendocs_template_min inetutils-1.9.4/doc/gendocs_template_min ---- inetutils-1.9.4.orig/doc/gendocs_template_min 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/doc/gendocs_template_min 2017-05-15 17:50:57.250000000 +0800 -@@ -0,0 +1,93 @@ -+ -+ -+ -+ -+ -+%%TITLE%% - GNU Project - Free Software Foundation -+ -+ -+ -+ -+ -+ -+

%%TITLE%%

-+ -+
Free Software Foundation
-+
last updated %%DATE%%
-+

-+ -+  [image of the head of a GNU] -+ -+

-+
-+ -+

This manual (%%PACKAGE%%) is available in the following formats:

-+ -+ -+ -+

(This page generated by the %%SCRIPTNAME%% -+script.)

-+ -+ -+ -+

Copyright © 2017 Free Software Foundation, Inc.

-+ -+

This page is licensed under a Creative -+Commons Attribution-NoDerivs 3.0 United States License.

-+ -+ -+ -+ -+ -+ -diff -durN inetutils-1.9.4.orig/doc/Makefile.in inetutils-1.9.4/doc/Makefile.in ---- inetutils-1.9.4.orig/doc/Makefile.in 2015-06-09 15:48:08.000000000 +0800 -+++ inetutils-1.9.4/doc/Makefile.in 2017-05-15 17:58:14.968750000 +0800 -@@ -107,10 +107,18 @@ - host_triplet = @host@ - subdir = doc - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 --am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ -+am__aclocal_m4_deps = $(top_srcdir)/am/check_macro.m4 \ -+ $(top_srcdir)/am/check_member.m4 \ -+ $(top_srcdir)/am/check_weak_refs.m4 \ -+ $(top_srcdir)/am/config_paths.m4 $(top_srcdir)/am/enable.m4 \ -+ $(top_srcdir)/am/flushleft.m4 $(top_srcdir)/am/krb5.m4 \ -+ $(top_srcdir)/am/libcurses.m4 $(top_srcdir)/am/libidn.m4 \ -+ $(top_srcdir)/am/readline.m4 $(top_srcdir)/am/result.m4 \ -+ $(top_srcdir)/m4/00gnulib.m4 \ - $(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \ - $(top_srcdir)/m4/argp.m4 $(top_srcdir)/m4/arpa_inet_h.m4 \ - $(top_srcdir)/m4/autobuild.m4 $(top_srcdir)/m4/btowc.m4 \ -+ $(top_srcdir)/m4/builtin-expect.m4 \ - $(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/close.m4 \ - $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/codeset.m4 \ - $(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/d-ino.m4 \ -@@ -125,51 +133,56 @@ - $(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl.m4 \ - $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopendir.m4 \ - $(top_srcdir)/m4/filemode.m4 $(top_srcdir)/m4/filenamecat.m4 \ -- $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fnmatch.m4 \ -- $(top_srcdir)/m4/fopen.m4 $(top_srcdir)/m4/fseek.m4 \ -- $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/fstat.m4 \ -- $(top_srcdir)/m4/fstatat.m4 $(top_srcdir)/m4/ftell.m4 \ -- $(top_srcdir)/m4/ftello.m4 $(top_srcdir)/m4/getaddrinfo.m4 \ -+ $(top_srcdir)/m4/flexmember.m4 $(top_srcdir)/m4/float_h.m4 \ -+ $(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fopen.m4 \ -+ $(top_srcdir)/m4/fseek.m4 $(top_srcdir)/m4/fseeko.m4 \ -+ $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/fstatat.m4 \ -+ $(top_srcdir)/m4/ftell.m4 $(top_srcdir)/m4/ftello.m4 \ -+ $(top_srcdir)/m4/getaddrinfo.m4 \ - $(top_srcdir)/m4/getcwd-abort-bug.m4 \ - $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \ - $(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getdomainname.m4 \ - $(top_srcdir)/m4/getdtablesize.m4 \ - $(top_srcdir)/m4/getgroups.m4 $(top_srcdir)/m4/gethostname.m4 \ -- $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getlogin_r.m4 \ -- $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpass.m4 \ -+ $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getlogin.m4 \ -+ $(top_srcdir)/m4/getlogin_r.m4 $(top_srcdir)/m4/getopt.m4 \ -+ $(top_srcdir)/m4/getpass.m4 $(top_srcdir)/m4/getprogname.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettimeofday.m4 \ - $(top_srcdir)/m4/getugroups.m4 \ - $(top_srcdir)/m4/getusershell.m4 $(top_srcdir)/m4/glibc21.m4 \ - $(top_srcdir)/m4/glob.m4 $(top_srcdir)/m4/gnulib-common.m4 \ -- $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/hostent.m4 \ -+ $(top_srcdir)/m4/gnulib-comp.m4 \ -+ $(top_srcdir)/m4/hard-locale.m4 $(top_srcdir)/m4/hostent.m4 \ - $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inet_ntop.m4 \ - $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttostr.m4 \ - $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/ioctl.m4 \ - $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ -- $(top_srcdir)/m4/lib-prefix.m4 \ -+ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/limits-h.m4 \ - $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \ - $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \ - $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localeconv.m4 \ -- $(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/longlong.m4 \ -- $(top_srcdir)/m4/lseek.m4 $(top_srcdir)/m4/lstat.m4 \ -- $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \ -- $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \ -- $(top_srcdir)/m4/mbsrtowcs.m4 $(top_srcdir)/m4/mbstate_t.m4 \ -- $(top_srcdir)/m4/mbtowc.m4 $(top_srcdir)/m4/memchr.m4 \ -- $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/memrchr.m4 \ -- $(top_srcdir)/m4/mgetgroups.m4 $(top_srcdir)/m4/minmax.m4 \ -- $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mmap-anon.m4 \ -- $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \ -+ $(top_srcdir)/m4/localtime-buffer.m4 $(top_srcdir)/m4/lock.m4 \ -+ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \ -+ $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/malloc.m4 \ -+ $(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/mbrtowc.m4 \ -+ $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbsrtowcs.m4 \ -+ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ -+ $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mempcpy.m4 \ -+ $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/mgetgroups.m4 \ -+ $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkstemp.m4 \ -+ $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/mode_t.m4 \ -+ $(top_srcdir)/m4/msvc-inval.m4 \ - $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \ - $(top_srcdir)/m4/netdb_h.m4 $(top_srcdir)/m4/netinet_in_h.m4 \ - $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nocrash.m4 \ - $(top_srcdir)/m4/obstack.m4 $(top_srcdir)/m4/off_t.m4 \ -- $(top_srcdir)/m4/onceonly.m4 $(top_srcdir)/m4/open.m4 \ -- $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/opendir.m4 \ -- $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \ -- $(top_srcdir)/m4/poll.m4 $(top_srcdir)/m4/poll_h.m4 \ -- $(top_srcdir)/m4/posix_openpt.m4 $(top_srcdir)/m4/printf.m4 \ -+ $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/openat.m4 \ -+ $(top_srcdir)/m4/opendir.m4 $(top_srcdir)/m4/pathmax.m4 \ -+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/poll.m4 \ -+ $(top_srcdir)/m4/poll_h.m4 $(top_srcdir)/m4/posix_openpt.m4 \ -+ $(top_srcdir)/m4/printf.m4 \ -+ $(top_srcdir)/m4/pthread_rwlock_rdlock.m4 \ - $(top_srcdir)/m4/pty.m4 $(top_srcdir)/m4/pty_h.m4 \ - $(top_srcdir)/m4/rawmemchr.m4 $(top_srcdir)/m4/read-file.m4 \ - $(top_srcdir)/m4/readdir.m4 $(top_srcdir)/m4/readutmp.m4 \ -@@ -206,14 +219,7 @@ - $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctype_h.m4 \ - $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \ - $(top_srcdir)/m4/xgetcwd.m4 $(top_srcdir)/m4/xsize.m4 \ -- $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/am/check_macro.m4 \ -- $(top_srcdir)/am/check_member.m4 \ -- $(top_srcdir)/am/check_weak_refs.m4 \ -- $(top_srcdir)/am/config_paths.m4 $(top_srcdir)/am/enable.m4 \ -- $(top_srcdir)/am/flushleft.m4 $(top_srcdir)/am/krb5.m4 \ -- $(top_srcdir)/am/libcurses.m4 $(top_srcdir)/am/libidn.m4 \ -- $(top_srcdir)/am/readline.m4 $(top_srcdir)/am/result.m4 \ -- $(top_srcdir)/configure.ac -+ $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/configure.ac - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) - DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/version.texi \ -@@ -360,6 +366,7 @@ - FTPD_LIBPAM = @FTPD_LIBPAM@ - GETADDRINFO_LIB = @GETADDRINFO_LIB@ - GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ -+GETOPT_CDEFS_H = @GETOPT_CDEFS_H@ - GETOPT_H = @GETOPT_H@ - GLIBC21 = @GLIBC21@ - GLOB_H = @GLOB_H@ -@@ -376,6 +383,7 @@ - GNULIB_CLOSE = @GNULIB_CLOSE@ - GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ - GNULIB_CONNECT = @GNULIB_CONNECT@ -+GNULIB_CTIME = @GNULIB_CTIME@ - GNULIB_DIRFD = @GNULIB_DIRFD@ - GNULIB_DPRINTF = @GNULIB_DPRINTF@ - GNULIB_DUP = @GNULIB_DUP@ -@@ -454,6 +462,7 @@ - GNULIB_LINKAT = @GNULIB_LINKAT@ - GNULIB_LISTEN = @GNULIB_LISTEN@ - GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ -+GNULIB_LOCALTIME = @GNULIB_LOCALTIME@ - GNULIB_LSEEK = @GNULIB_LSEEK@ - GNULIB_LSTAT = @GNULIB_LSTAT@ - GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ -@@ -501,6 +510,8 @@ - GNULIB_OPENAT = @GNULIB_OPENAT@ - GNULIB_OPENDIR = @GNULIB_OPENDIR@ - GNULIB_OPENPTY = @GNULIB_OPENPTY@ -+GNULIB_OVERRIDES_STRUCT_STAT = @GNULIB_OVERRIDES_STRUCT_STAT@ -+GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@ - GNULIB_PCLOSE = @GNULIB_PCLOSE@ - GNULIB_PERROR = @GNULIB_PERROR@ - GNULIB_PIPE = @GNULIB_PIPE@ -@@ -567,6 +578,7 @@ - GNULIB_STRDUP = @GNULIB_STRDUP@ - GNULIB_STRERROR = @GNULIB_STRERROR@ - GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ -+GNULIB_STRFTIME = @GNULIB_STRFTIME@ - GNULIB_STRNCAT = @GNULIB_STRNCAT@ - GNULIB_STRNDUP = @GNULIB_STRNDUP@ - GNULIB_STRNLEN = @GNULIB_STRNLEN@ -@@ -586,9 +598,12 @@ - GNULIB_TCGETSID = @GNULIB_TCGETSID@ - GNULIB_TIMEGM = @GNULIB_TIMEGM@ - GNULIB_TIME_R = @GNULIB_TIME_R@ -+GNULIB_TIME_RZ = @GNULIB_TIME_RZ@ - GNULIB_TMPFILE = @GNULIB_TMPFILE@ - GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ -+GNULIB_TRUNCATE = @GNULIB_TRUNCATE@ - GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -+GNULIB_TZSET = @GNULIB_TZSET@ - GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ - GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ - GNULIB_UNLINK = @GNULIB_UNLINK@ -@@ -618,6 +633,7 @@ - GNULIB_WCSCPY = @GNULIB_WCSCPY@ - GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ - GNULIB_WCSDUP = @GNULIB_WCSDUP@ -+GNULIB_WCSFTIME = @GNULIB_WCSFTIME@ - GNULIB_WCSLEN = @GNULIB_WCSLEN@ - GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ - GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ -@@ -651,9 +667,11 @@ - HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ - HAVE_ATOLL = @HAVE_ATOLL@ - HAVE_BTOWC = @HAVE_BTOWC@ -+HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@ - HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ - HAVE_CHOWN = @HAVE_CHOWN@ - HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ -+HAVE_CRTDEFS_H = @HAVE_CRTDEFS_H@ - HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ - HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ - HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ -@@ -669,6 +687,7 @@ - HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ - HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ - HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ -+HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@ - HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ - HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ - HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ -@@ -787,6 +806,7 @@ - HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ - HAVE_PTY_H = @HAVE_PTY_H@ - HAVE_PWRITE = @HAVE_PWRITE@ -+HAVE_QSORT_R = @HAVE_QSORT_R@ - HAVE_RAISE = @HAVE_RAISE@ - HAVE_RANDOM = @HAVE_RANDOM@ - HAVE_RANDOM_H = @HAVE_RANDOM_H@ -@@ -848,7 +868,10 @@ - HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@ - HAVE_TERMIOS_H = @HAVE_TERMIOS_H@ - HAVE_TIMEGM = @HAVE_TIMEGM@ -+HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@ -+HAVE_TRUNCATE = @HAVE_TRUNCATE@ - HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ -+HAVE_TZSET = @HAVE_TZSET@ - HAVE_UNISTD_H = @HAVE_UNISTD_H@ - HAVE_UNLINKAT = @HAVE_UNLINKAT@ - HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ -@@ -871,6 +894,7 @@ - HAVE_WCSCPY = @HAVE_WCSCPY@ - HAVE_WCSCSPN = @HAVE_WCSCSPN@ - HAVE_WCSDUP = @HAVE_WCSDUP@ -+HAVE_WCSFTIME = @HAVE_WCSFTIME@ - HAVE_WCSLEN = @HAVE_WCSLEN@ - HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ - HAVE_WCSNCAT = @HAVE_WCSNCAT@ -@@ -938,8 +962,10 @@ - LIBTHREAD = @LIBTHREAD@ - LIBUTIL = @LIBUTIL@ - LIBWRAP = @LIBWRAP@ -+LIB_GETLOGIN = @LIB_GETLOGIN@ - LIB_POLL = @LIB_POLL@ - LIB_SELECT = @LIB_SELECT@ -+LIMITS_H = @LIMITS_H@ - LN_S = @LN_S@ - LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ - LOCALE_FR = @LOCALE_FR@ -@@ -966,6 +992,7 @@ - NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ - NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ - NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ -+NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@ - NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ - NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ - NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ -@@ -998,6 +1025,7 @@ - NEXT_FLOAT_H = @NEXT_FLOAT_H@ - NEXT_GETOPT_H = @NEXT_GETOPT_H@ - NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ -+NEXT_LIMITS_H = @NEXT_LIMITS_H@ - NEXT_LOCALE_H = @NEXT_LOCALE_H@ - NEXT_NETDB_H = @NEXT_NETDB_H@ - NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ -@@ -1045,6 +1073,7 @@ - REPLACE_CHOWN = @REPLACE_CHOWN@ - REPLACE_CLOSE = @REPLACE_CLOSE@ - REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ -+REPLACE_CTIME = @REPLACE_CTIME@ - REPLACE_DIRFD = @REPLACE_DIRFD@ - REPLACE_DPRINTF = @REPLACE_DPRINTF@ - REPLACE_DUP = @REPLACE_DUP@ -@@ -1156,6 +1185,7 @@ - REPLACE_STRDUP = @REPLACE_STRDUP@ - REPLACE_STRERROR = @REPLACE_STRERROR@ - REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ -+REPLACE_STRFTIME = @REPLACE_STRFTIME@ - REPLACE_STRNCAT = @REPLACE_STRNCAT@ - REPLACE_STRNDUP = @REPLACE_STRNDUP@ - REPLACE_STRNLEN = @REPLACE_STRNLEN@ -@@ -1170,7 +1200,9 @@ - REPLACE_TIMEGM = @REPLACE_TIMEGM@ - REPLACE_TMPFILE = @REPLACE_TMPFILE@ - REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ -+REPLACE_TRUNCATE = @REPLACE_TRUNCATE@ - REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ -+REPLACE_TZSET = @REPLACE_TZSET@ - REPLACE_UNLINK = @REPLACE_UNLINK@ - REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ - REPLACE_UNSETENV = @REPLACE_UNSETENV@ -@@ -1183,6 +1215,7 @@ - REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ - REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ - REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ -+REPLACE_WCSFTIME = @REPLACE_WCSFTIME@ - REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ - REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ - REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ -@@ -1219,6 +1252,8 @@ - WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ - WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ - WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ -+WINDOWS_STAT_INODES = @WINDOWS_STAT_INODES@ -+WINDOWS_STAT_TIMESPEC = @WINDOWS_STAT_TIMESPEC@ - WINT_T_SUFFIX = @WINT_T_SUFFIX@ - YACC = @YACC@ - YFLAGS = @YFLAGS@ -diff -durN inetutils-1.9.4.orig/ftp/Makefile.in inetutils-1.9.4/ftp/Makefile.in ---- inetutils-1.9.4.orig/ftp/Makefile.in 2015-06-09 15:48:08.000000000 +0800 -+++ inetutils-1.9.4/ftp/Makefile.in 2017-05-15 17:58:15.265625000 +0800 -@@ -111,10 +111,18 @@ - EXTRA_PROGRAMS = ftp$(EXEEXT) - subdir = ftp - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 --am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ -+am__aclocal_m4_deps = $(top_srcdir)/am/check_macro.m4 \ -+ $(top_srcdir)/am/check_member.m4 \ -+ $(top_srcdir)/am/check_weak_refs.m4 \ -+ $(top_srcdir)/am/config_paths.m4 $(top_srcdir)/am/enable.m4 \ -+ $(top_srcdir)/am/flushleft.m4 $(top_srcdir)/am/krb5.m4 \ -+ $(top_srcdir)/am/libcurses.m4 $(top_srcdir)/am/libidn.m4 \ -+ $(top_srcdir)/am/readline.m4 $(top_srcdir)/am/result.m4 \ -+ $(top_srcdir)/m4/00gnulib.m4 \ - $(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \ - $(top_srcdir)/m4/argp.m4 $(top_srcdir)/m4/arpa_inet_h.m4 \ - $(top_srcdir)/m4/autobuild.m4 $(top_srcdir)/m4/btowc.m4 \ -+ $(top_srcdir)/m4/builtin-expect.m4 \ - $(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/close.m4 \ - $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/codeset.m4 \ - $(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/d-ino.m4 \ -@@ -129,51 +137,56 @@ - $(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl.m4 \ - $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopendir.m4 \ - $(top_srcdir)/m4/filemode.m4 $(top_srcdir)/m4/filenamecat.m4 \ -- $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fnmatch.m4 \ -- $(top_srcdir)/m4/fopen.m4 $(top_srcdir)/m4/fseek.m4 \ -- $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/fstat.m4 \ -- $(top_srcdir)/m4/fstatat.m4 $(top_srcdir)/m4/ftell.m4 \ -- $(top_srcdir)/m4/ftello.m4 $(top_srcdir)/m4/getaddrinfo.m4 \ -+ $(top_srcdir)/m4/flexmember.m4 $(top_srcdir)/m4/float_h.m4 \ -+ $(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fopen.m4 \ -+ $(top_srcdir)/m4/fseek.m4 $(top_srcdir)/m4/fseeko.m4 \ -+ $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/fstatat.m4 \ -+ $(top_srcdir)/m4/ftell.m4 $(top_srcdir)/m4/ftello.m4 \ -+ $(top_srcdir)/m4/getaddrinfo.m4 \ - $(top_srcdir)/m4/getcwd-abort-bug.m4 \ - $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \ - $(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getdomainname.m4 \ - $(top_srcdir)/m4/getdtablesize.m4 \ - $(top_srcdir)/m4/getgroups.m4 $(top_srcdir)/m4/gethostname.m4 \ -- $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getlogin_r.m4 \ -- $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpass.m4 \ -+ $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getlogin.m4 \ -+ $(top_srcdir)/m4/getlogin_r.m4 $(top_srcdir)/m4/getopt.m4 \ -+ $(top_srcdir)/m4/getpass.m4 $(top_srcdir)/m4/getprogname.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettimeofday.m4 \ - $(top_srcdir)/m4/getugroups.m4 \ - $(top_srcdir)/m4/getusershell.m4 $(top_srcdir)/m4/glibc21.m4 \ - $(top_srcdir)/m4/glob.m4 $(top_srcdir)/m4/gnulib-common.m4 \ -- $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/hostent.m4 \ -+ $(top_srcdir)/m4/gnulib-comp.m4 \ -+ $(top_srcdir)/m4/hard-locale.m4 $(top_srcdir)/m4/hostent.m4 \ - $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inet_ntop.m4 \ - $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttostr.m4 \ - $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/ioctl.m4 \ - $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ -- $(top_srcdir)/m4/lib-prefix.m4 \ -+ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/limits-h.m4 \ - $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \ - $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \ - $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localeconv.m4 \ -- $(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/longlong.m4 \ -- $(top_srcdir)/m4/lseek.m4 $(top_srcdir)/m4/lstat.m4 \ -- $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \ -- $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \ -- $(top_srcdir)/m4/mbsrtowcs.m4 $(top_srcdir)/m4/mbstate_t.m4 \ -- $(top_srcdir)/m4/mbtowc.m4 $(top_srcdir)/m4/memchr.m4 \ -- $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/memrchr.m4 \ -- $(top_srcdir)/m4/mgetgroups.m4 $(top_srcdir)/m4/minmax.m4 \ -- $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mmap-anon.m4 \ -- $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \ -+ $(top_srcdir)/m4/localtime-buffer.m4 $(top_srcdir)/m4/lock.m4 \ -+ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \ -+ $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/malloc.m4 \ -+ $(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/mbrtowc.m4 \ -+ $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbsrtowcs.m4 \ -+ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ -+ $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mempcpy.m4 \ -+ $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/mgetgroups.m4 \ -+ $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkstemp.m4 \ -+ $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/mode_t.m4 \ -+ $(top_srcdir)/m4/msvc-inval.m4 \ - $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \ - $(top_srcdir)/m4/netdb_h.m4 $(top_srcdir)/m4/netinet_in_h.m4 \ - $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nocrash.m4 \ - $(top_srcdir)/m4/obstack.m4 $(top_srcdir)/m4/off_t.m4 \ -- $(top_srcdir)/m4/onceonly.m4 $(top_srcdir)/m4/open.m4 \ -- $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/opendir.m4 \ -- $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \ -- $(top_srcdir)/m4/poll.m4 $(top_srcdir)/m4/poll_h.m4 \ -- $(top_srcdir)/m4/posix_openpt.m4 $(top_srcdir)/m4/printf.m4 \ -+ $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/openat.m4 \ -+ $(top_srcdir)/m4/opendir.m4 $(top_srcdir)/m4/pathmax.m4 \ -+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/poll.m4 \ -+ $(top_srcdir)/m4/poll_h.m4 $(top_srcdir)/m4/posix_openpt.m4 \ -+ $(top_srcdir)/m4/printf.m4 \ -+ $(top_srcdir)/m4/pthread_rwlock_rdlock.m4 \ - $(top_srcdir)/m4/pty.m4 $(top_srcdir)/m4/pty_h.m4 \ - $(top_srcdir)/m4/rawmemchr.m4 $(top_srcdir)/m4/read-file.m4 \ - $(top_srcdir)/m4/readdir.m4 $(top_srcdir)/m4/readutmp.m4 \ -@@ -210,14 +223,7 @@ - $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctype_h.m4 \ - $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \ - $(top_srcdir)/m4/xgetcwd.m4 $(top_srcdir)/m4/xsize.m4 \ -- $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/am/check_macro.m4 \ -- $(top_srcdir)/am/check_member.m4 \ -- $(top_srcdir)/am/check_weak_refs.m4 \ -- $(top_srcdir)/am/config_paths.m4 $(top_srcdir)/am/enable.m4 \ -- $(top_srcdir)/am/flushleft.m4 $(top_srcdir)/am/krb5.m4 \ -- $(top_srcdir)/am/libcurses.m4 $(top_srcdir)/am/libidn.m4 \ -- $(top_srcdir)/am/readline.m4 $(top_srcdir)/am/result.m4 \ -- $(top_srcdir)/configure.ac -+ $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/configure.ac - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) - DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ -@@ -338,6 +344,7 @@ - FTPD_LIBPAM = @FTPD_LIBPAM@ - GETADDRINFO_LIB = @GETADDRINFO_LIB@ - GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ -+GETOPT_CDEFS_H = @GETOPT_CDEFS_H@ - GETOPT_H = @GETOPT_H@ - GLIBC21 = @GLIBC21@ - GLOB_H = @GLOB_H@ -@@ -354,6 +361,7 @@ - GNULIB_CLOSE = @GNULIB_CLOSE@ - GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ - GNULIB_CONNECT = @GNULIB_CONNECT@ -+GNULIB_CTIME = @GNULIB_CTIME@ - GNULIB_DIRFD = @GNULIB_DIRFD@ - GNULIB_DPRINTF = @GNULIB_DPRINTF@ - GNULIB_DUP = @GNULIB_DUP@ -@@ -432,6 +440,7 @@ - GNULIB_LINKAT = @GNULIB_LINKAT@ - GNULIB_LISTEN = @GNULIB_LISTEN@ - GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ -+GNULIB_LOCALTIME = @GNULIB_LOCALTIME@ - GNULIB_LSEEK = @GNULIB_LSEEK@ - GNULIB_LSTAT = @GNULIB_LSTAT@ - GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ -@@ -479,6 +488,8 @@ - GNULIB_OPENAT = @GNULIB_OPENAT@ - GNULIB_OPENDIR = @GNULIB_OPENDIR@ - GNULIB_OPENPTY = @GNULIB_OPENPTY@ -+GNULIB_OVERRIDES_STRUCT_STAT = @GNULIB_OVERRIDES_STRUCT_STAT@ -+GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@ - GNULIB_PCLOSE = @GNULIB_PCLOSE@ - GNULIB_PERROR = @GNULIB_PERROR@ - GNULIB_PIPE = @GNULIB_PIPE@ -@@ -545,6 +556,7 @@ - GNULIB_STRDUP = @GNULIB_STRDUP@ - GNULIB_STRERROR = @GNULIB_STRERROR@ - GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ -+GNULIB_STRFTIME = @GNULIB_STRFTIME@ - GNULIB_STRNCAT = @GNULIB_STRNCAT@ - GNULIB_STRNDUP = @GNULIB_STRNDUP@ - GNULIB_STRNLEN = @GNULIB_STRNLEN@ -@@ -564,9 +576,12 @@ - GNULIB_TCGETSID = @GNULIB_TCGETSID@ - GNULIB_TIMEGM = @GNULIB_TIMEGM@ - GNULIB_TIME_R = @GNULIB_TIME_R@ -+GNULIB_TIME_RZ = @GNULIB_TIME_RZ@ - GNULIB_TMPFILE = @GNULIB_TMPFILE@ - GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ -+GNULIB_TRUNCATE = @GNULIB_TRUNCATE@ - GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -+GNULIB_TZSET = @GNULIB_TZSET@ - GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ - GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ - GNULIB_UNLINK = @GNULIB_UNLINK@ -@@ -596,6 +611,7 @@ - GNULIB_WCSCPY = @GNULIB_WCSCPY@ - GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ - GNULIB_WCSDUP = @GNULIB_WCSDUP@ -+GNULIB_WCSFTIME = @GNULIB_WCSFTIME@ - GNULIB_WCSLEN = @GNULIB_WCSLEN@ - GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ - GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ -@@ -629,9 +645,11 @@ - HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ - HAVE_ATOLL = @HAVE_ATOLL@ - HAVE_BTOWC = @HAVE_BTOWC@ -+HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@ - HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ - HAVE_CHOWN = @HAVE_CHOWN@ - HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ -+HAVE_CRTDEFS_H = @HAVE_CRTDEFS_H@ - HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ - HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ - HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ -@@ -647,6 +665,7 @@ - HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ - HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ - HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ -+HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@ - HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ - HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ - HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ -@@ -765,6 +784,7 @@ - HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ - HAVE_PTY_H = @HAVE_PTY_H@ - HAVE_PWRITE = @HAVE_PWRITE@ -+HAVE_QSORT_R = @HAVE_QSORT_R@ - HAVE_RAISE = @HAVE_RAISE@ - HAVE_RANDOM = @HAVE_RANDOM@ - HAVE_RANDOM_H = @HAVE_RANDOM_H@ -@@ -826,7 +846,10 @@ - HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@ - HAVE_TERMIOS_H = @HAVE_TERMIOS_H@ - HAVE_TIMEGM = @HAVE_TIMEGM@ -+HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@ -+HAVE_TRUNCATE = @HAVE_TRUNCATE@ - HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ -+HAVE_TZSET = @HAVE_TZSET@ - HAVE_UNISTD_H = @HAVE_UNISTD_H@ - HAVE_UNLINKAT = @HAVE_UNLINKAT@ - HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ -@@ -849,6 +872,7 @@ - HAVE_WCSCPY = @HAVE_WCSCPY@ - HAVE_WCSCSPN = @HAVE_WCSCSPN@ - HAVE_WCSDUP = @HAVE_WCSDUP@ -+HAVE_WCSFTIME = @HAVE_WCSFTIME@ - HAVE_WCSLEN = @HAVE_WCSLEN@ - HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ - HAVE_WCSNCAT = @HAVE_WCSNCAT@ -@@ -916,8 +940,10 @@ - LIBTHREAD = @LIBTHREAD@ - LIBUTIL = @LIBUTIL@ - LIBWRAP = @LIBWRAP@ -+LIB_GETLOGIN = @LIB_GETLOGIN@ - LIB_POLL = @LIB_POLL@ - LIB_SELECT = @LIB_SELECT@ -+LIMITS_H = @LIMITS_H@ - LN_S = @LN_S@ - LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ - LOCALE_FR = @LOCALE_FR@ -@@ -944,6 +970,7 @@ - NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ - NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ - NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ -+NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@ - NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ - NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ - NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ -@@ -976,6 +1003,7 @@ - NEXT_FLOAT_H = @NEXT_FLOAT_H@ - NEXT_GETOPT_H = @NEXT_GETOPT_H@ - NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ -+NEXT_LIMITS_H = @NEXT_LIMITS_H@ - NEXT_LOCALE_H = @NEXT_LOCALE_H@ - NEXT_NETDB_H = @NEXT_NETDB_H@ - NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ -@@ -1023,6 +1051,7 @@ - REPLACE_CHOWN = @REPLACE_CHOWN@ - REPLACE_CLOSE = @REPLACE_CLOSE@ - REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ -+REPLACE_CTIME = @REPLACE_CTIME@ - REPLACE_DIRFD = @REPLACE_DIRFD@ - REPLACE_DPRINTF = @REPLACE_DPRINTF@ - REPLACE_DUP = @REPLACE_DUP@ -@@ -1134,6 +1163,7 @@ - REPLACE_STRDUP = @REPLACE_STRDUP@ - REPLACE_STRERROR = @REPLACE_STRERROR@ - REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ -+REPLACE_STRFTIME = @REPLACE_STRFTIME@ - REPLACE_STRNCAT = @REPLACE_STRNCAT@ - REPLACE_STRNDUP = @REPLACE_STRNDUP@ - REPLACE_STRNLEN = @REPLACE_STRNLEN@ -@@ -1148,7 +1178,9 @@ - REPLACE_TIMEGM = @REPLACE_TIMEGM@ - REPLACE_TMPFILE = @REPLACE_TMPFILE@ - REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ -+REPLACE_TRUNCATE = @REPLACE_TRUNCATE@ - REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ -+REPLACE_TZSET = @REPLACE_TZSET@ - REPLACE_UNLINK = @REPLACE_UNLINK@ - REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ - REPLACE_UNSETENV = @REPLACE_UNSETENV@ -@@ -1161,6 +1193,7 @@ - REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ - REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ - REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ -+REPLACE_WCSFTIME = @REPLACE_WCSFTIME@ - REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ - REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ - REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ -@@ -1197,6 +1230,8 @@ - WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ - WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ - WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ -+WINDOWS_STAT_INODES = @WINDOWS_STAT_INODES@ -+WINDOWS_STAT_TIMESPEC = @WINDOWS_STAT_TIMESPEC@ - WINT_T_SUFFIX = @WINT_T_SUFFIX@ - YACC = @YACC@ - YFLAGS = @YFLAGS@ -diff -durN inetutils-1.9.4.orig/ftpd/Makefile.in inetutils-1.9.4/ftpd/Makefile.in ---- inetutils-1.9.4.orig/ftpd/Makefile.in 2015-06-09 15:48:09.000000000 +0800 -+++ inetutils-1.9.4/ftpd/Makefile.in 2017-05-15 17:58:15.578125000 +0800 -@@ -111,10 +111,18 @@ - EXTRA_PROGRAMS = ftpd$(EXEEXT) - subdir = ftpd - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 --am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ -+am__aclocal_m4_deps = $(top_srcdir)/am/check_macro.m4 \ -+ $(top_srcdir)/am/check_member.m4 \ -+ $(top_srcdir)/am/check_weak_refs.m4 \ -+ $(top_srcdir)/am/config_paths.m4 $(top_srcdir)/am/enable.m4 \ -+ $(top_srcdir)/am/flushleft.m4 $(top_srcdir)/am/krb5.m4 \ -+ $(top_srcdir)/am/libcurses.m4 $(top_srcdir)/am/libidn.m4 \ -+ $(top_srcdir)/am/readline.m4 $(top_srcdir)/am/result.m4 \ -+ $(top_srcdir)/m4/00gnulib.m4 \ - $(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \ - $(top_srcdir)/m4/argp.m4 $(top_srcdir)/m4/arpa_inet_h.m4 \ - $(top_srcdir)/m4/autobuild.m4 $(top_srcdir)/m4/btowc.m4 \ -+ $(top_srcdir)/m4/builtin-expect.m4 \ - $(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/close.m4 \ - $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/codeset.m4 \ - $(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/d-ino.m4 \ -@@ -129,51 +137,56 @@ - $(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl.m4 \ - $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopendir.m4 \ - $(top_srcdir)/m4/filemode.m4 $(top_srcdir)/m4/filenamecat.m4 \ -- $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fnmatch.m4 \ -- $(top_srcdir)/m4/fopen.m4 $(top_srcdir)/m4/fseek.m4 \ -- $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/fstat.m4 \ -- $(top_srcdir)/m4/fstatat.m4 $(top_srcdir)/m4/ftell.m4 \ -- $(top_srcdir)/m4/ftello.m4 $(top_srcdir)/m4/getaddrinfo.m4 \ -+ $(top_srcdir)/m4/flexmember.m4 $(top_srcdir)/m4/float_h.m4 \ -+ $(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fopen.m4 \ -+ $(top_srcdir)/m4/fseek.m4 $(top_srcdir)/m4/fseeko.m4 \ -+ $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/fstatat.m4 \ -+ $(top_srcdir)/m4/ftell.m4 $(top_srcdir)/m4/ftello.m4 \ -+ $(top_srcdir)/m4/getaddrinfo.m4 \ - $(top_srcdir)/m4/getcwd-abort-bug.m4 \ - $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \ - $(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getdomainname.m4 \ - $(top_srcdir)/m4/getdtablesize.m4 \ - $(top_srcdir)/m4/getgroups.m4 $(top_srcdir)/m4/gethostname.m4 \ -- $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getlogin_r.m4 \ -- $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpass.m4 \ -+ $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getlogin.m4 \ -+ $(top_srcdir)/m4/getlogin_r.m4 $(top_srcdir)/m4/getopt.m4 \ -+ $(top_srcdir)/m4/getpass.m4 $(top_srcdir)/m4/getprogname.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettimeofday.m4 \ - $(top_srcdir)/m4/getugroups.m4 \ - $(top_srcdir)/m4/getusershell.m4 $(top_srcdir)/m4/glibc21.m4 \ - $(top_srcdir)/m4/glob.m4 $(top_srcdir)/m4/gnulib-common.m4 \ -- $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/hostent.m4 \ -+ $(top_srcdir)/m4/gnulib-comp.m4 \ -+ $(top_srcdir)/m4/hard-locale.m4 $(top_srcdir)/m4/hostent.m4 \ - $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inet_ntop.m4 \ - $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttostr.m4 \ - $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/ioctl.m4 \ - $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ -- $(top_srcdir)/m4/lib-prefix.m4 \ -+ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/limits-h.m4 \ - $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \ - $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \ - $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localeconv.m4 \ -- $(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/longlong.m4 \ -- $(top_srcdir)/m4/lseek.m4 $(top_srcdir)/m4/lstat.m4 \ -- $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \ -- $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \ -- $(top_srcdir)/m4/mbsrtowcs.m4 $(top_srcdir)/m4/mbstate_t.m4 \ -- $(top_srcdir)/m4/mbtowc.m4 $(top_srcdir)/m4/memchr.m4 \ -- $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/memrchr.m4 \ -- $(top_srcdir)/m4/mgetgroups.m4 $(top_srcdir)/m4/minmax.m4 \ -- $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mmap-anon.m4 \ -- $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \ -+ $(top_srcdir)/m4/localtime-buffer.m4 $(top_srcdir)/m4/lock.m4 \ -+ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \ -+ $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/malloc.m4 \ -+ $(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/mbrtowc.m4 \ -+ $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbsrtowcs.m4 \ -+ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ -+ $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mempcpy.m4 \ -+ $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/mgetgroups.m4 \ -+ $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkstemp.m4 \ -+ $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/mode_t.m4 \ -+ $(top_srcdir)/m4/msvc-inval.m4 \ - $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \ - $(top_srcdir)/m4/netdb_h.m4 $(top_srcdir)/m4/netinet_in_h.m4 \ - $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nocrash.m4 \ - $(top_srcdir)/m4/obstack.m4 $(top_srcdir)/m4/off_t.m4 \ -- $(top_srcdir)/m4/onceonly.m4 $(top_srcdir)/m4/open.m4 \ -- $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/opendir.m4 \ -- $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \ -- $(top_srcdir)/m4/poll.m4 $(top_srcdir)/m4/poll_h.m4 \ -- $(top_srcdir)/m4/posix_openpt.m4 $(top_srcdir)/m4/printf.m4 \ -+ $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/openat.m4 \ -+ $(top_srcdir)/m4/opendir.m4 $(top_srcdir)/m4/pathmax.m4 \ -+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/poll.m4 \ -+ $(top_srcdir)/m4/poll_h.m4 $(top_srcdir)/m4/posix_openpt.m4 \ -+ $(top_srcdir)/m4/printf.m4 \ -+ $(top_srcdir)/m4/pthread_rwlock_rdlock.m4 \ - $(top_srcdir)/m4/pty.m4 $(top_srcdir)/m4/pty_h.m4 \ - $(top_srcdir)/m4/rawmemchr.m4 $(top_srcdir)/m4/read-file.m4 \ - $(top_srcdir)/m4/readdir.m4 $(top_srcdir)/m4/readutmp.m4 \ -@@ -210,14 +223,7 @@ - $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctype_h.m4 \ - $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \ - $(top_srcdir)/m4/xgetcwd.m4 $(top_srcdir)/m4/xsize.m4 \ -- $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/am/check_macro.m4 \ -- $(top_srcdir)/am/check_member.m4 \ -- $(top_srcdir)/am/check_weak_refs.m4 \ -- $(top_srcdir)/am/config_paths.m4 $(top_srcdir)/am/enable.m4 \ -- $(top_srcdir)/am/flushleft.m4 $(top_srcdir)/am/krb5.m4 \ -- $(top_srcdir)/am/libcurses.m4 $(top_srcdir)/am/libidn.m4 \ -- $(top_srcdir)/am/readline.m4 $(top_srcdir)/am/result.m4 \ -- $(top_srcdir)/configure.ac -+ $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/configure.ac - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) - DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ -@@ -349,6 +355,7 @@ - FTPD_LIBPAM = @FTPD_LIBPAM@ - GETADDRINFO_LIB = @GETADDRINFO_LIB@ - GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ -+GETOPT_CDEFS_H = @GETOPT_CDEFS_H@ - GETOPT_H = @GETOPT_H@ - GLIBC21 = @GLIBC21@ - GLOB_H = @GLOB_H@ -@@ -365,6 +372,7 @@ - GNULIB_CLOSE = @GNULIB_CLOSE@ - GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ - GNULIB_CONNECT = @GNULIB_CONNECT@ -+GNULIB_CTIME = @GNULIB_CTIME@ - GNULIB_DIRFD = @GNULIB_DIRFD@ - GNULIB_DPRINTF = @GNULIB_DPRINTF@ - GNULIB_DUP = @GNULIB_DUP@ -@@ -443,6 +451,7 @@ - GNULIB_LINKAT = @GNULIB_LINKAT@ - GNULIB_LISTEN = @GNULIB_LISTEN@ - GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ -+GNULIB_LOCALTIME = @GNULIB_LOCALTIME@ - GNULIB_LSEEK = @GNULIB_LSEEK@ - GNULIB_LSTAT = @GNULIB_LSTAT@ - GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ -@@ -490,6 +499,8 @@ - GNULIB_OPENAT = @GNULIB_OPENAT@ - GNULIB_OPENDIR = @GNULIB_OPENDIR@ - GNULIB_OPENPTY = @GNULIB_OPENPTY@ -+GNULIB_OVERRIDES_STRUCT_STAT = @GNULIB_OVERRIDES_STRUCT_STAT@ -+GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@ - GNULIB_PCLOSE = @GNULIB_PCLOSE@ - GNULIB_PERROR = @GNULIB_PERROR@ - GNULIB_PIPE = @GNULIB_PIPE@ -@@ -556,6 +567,7 @@ - GNULIB_STRDUP = @GNULIB_STRDUP@ - GNULIB_STRERROR = @GNULIB_STRERROR@ - GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ -+GNULIB_STRFTIME = @GNULIB_STRFTIME@ - GNULIB_STRNCAT = @GNULIB_STRNCAT@ - GNULIB_STRNDUP = @GNULIB_STRNDUP@ - GNULIB_STRNLEN = @GNULIB_STRNLEN@ -@@ -575,9 +587,12 @@ - GNULIB_TCGETSID = @GNULIB_TCGETSID@ - GNULIB_TIMEGM = @GNULIB_TIMEGM@ - GNULIB_TIME_R = @GNULIB_TIME_R@ -+GNULIB_TIME_RZ = @GNULIB_TIME_RZ@ - GNULIB_TMPFILE = @GNULIB_TMPFILE@ - GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ -+GNULIB_TRUNCATE = @GNULIB_TRUNCATE@ - GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -+GNULIB_TZSET = @GNULIB_TZSET@ - GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ - GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ - GNULIB_UNLINK = @GNULIB_UNLINK@ -@@ -607,6 +622,7 @@ - GNULIB_WCSCPY = @GNULIB_WCSCPY@ - GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ - GNULIB_WCSDUP = @GNULIB_WCSDUP@ -+GNULIB_WCSFTIME = @GNULIB_WCSFTIME@ - GNULIB_WCSLEN = @GNULIB_WCSLEN@ - GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ - GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ -@@ -640,9 +656,11 @@ - HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ - HAVE_ATOLL = @HAVE_ATOLL@ - HAVE_BTOWC = @HAVE_BTOWC@ -+HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@ - HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ - HAVE_CHOWN = @HAVE_CHOWN@ - HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ -+HAVE_CRTDEFS_H = @HAVE_CRTDEFS_H@ - HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ - HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ - HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ -@@ -658,6 +676,7 @@ - HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ - HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ - HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ -+HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@ - HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ - HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ - HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ -@@ -776,6 +795,7 @@ - HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ - HAVE_PTY_H = @HAVE_PTY_H@ - HAVE_PWRITE = @HAVE_PWRITE@ -+HAVE_QSORT_R = @HAVE_QSORT_R@ - HAVE_RAISE = @HAVE_RAISE@ - HAVE_RANDOM = @HAVE_RANDOM@ - HAVE_RANDOM_H = @HAVE_RANDOM_H@ -@@ -837,7 +857,10 @@ - HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@ - HAVE_TERMIOS_H = @HAVE_TERMIOS_H@ - HAVE_TIMEGM = @HAVE_TIMEGM@ -+HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@ -+HAVE_TRUNCATE = @HAVE_TRUNCATE@ - HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ -+HAVE_TZSET = @HAVE_TZSET@ - HAVE_UNISTD_H = @HAVE_UNISTD_H@ - HAVE_UNLINKAT = @HAVE_UNLINKAT@ - HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ -@@ -860,6 +883,7 @@ - HAVE_WCSCPY = @HAVE_WCSCPY@ - HAVE_WCSCSPN = @HAVE_WCSCSPN@ - HAVE_WCSDUP = @HAVE_WCSDUP@ -+HAVE_WCSFTIME = @HAVE_WCSFTIME@ - HAVE_WCSLEN = @HAVE_WCSLEN@ - HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ - HAVE_WCSNCAT = @HAVE_WCSNCAT@ -@@ -927,8 +951,10 @@ - LIBTHREAD = @LIBTHREAD@ - LIBUTIL = @LIBUTIL@ - LIBWRAP = @LIBWRAP@ -+LIB_GETLOGIN = @LIB_GETLOGIN@ - LIB_POLL = @LIB_POLL@ - LIB_SELECT = @LIB_SELECT@ -+LIMITS_H = @LIMITS_H@ - LN_S = @LN_S@ - LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ - LOCALE_FR = @LOCALE_FR@ -@@ -955,6 +981,7 @@ - NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ - NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ - NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ -+NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@ - NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ - NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ - NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ -@@ -987,6 +1014,7 @@ - NEXT_FLOAT_H = @NEXT_FLOAT_H@ - NEXT_GETOPT_H = @NEXT_GETOPT_H@ - NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ -+NEXT_LIMITS_H = @NEXT_LIMITS_H@ - NEXT_LOCALE_H = @NEXT_LOCALE_H@ - NEXT_NETDB_H = @NEXT_NETDB_H@ - NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ -@@ -1034,6 +1062,7 @@ - REPLACE_CHOWN = @REPLACE_CHOWN@ - REPLACE_CLOSE = @REPLACE_CLOSE@ - REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ -+REPLACE_CTIME = @REPLACE_CTIME@ - REPLACE_DIRFD = @REPLACE_DIRFD@ - REPLACE_DPRINTF = @REPLACE_DPRINTF@ - REPLACE_DUP = @REPLACE_DUP@ -@@ -1145,6 +1174,7 @@ - REPLACE_STRDUP = @REPLACE_STRDUP@ - REPLACE_STRERROR = @REPLACE_STRERROR@ - REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ -+REPLACE_STRFTIME = @REPLACE_STRFTIME@ - REPLACE_STRNCAT = @REPLACE_STRNCAT@ - REPLACE_STRNDUP = @REPLACE_STRNDUP@ - REPLACE_STRNLEN = @REPLACE_STRNLEN@ -@@ -1159,7 +1189,9 @@ - REPLACE_TIMEGM = @REPLACE_TIMEGM@ - REPLACE_TMPFILE = @REPLACE_TMPFILE@ - REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ -+REPLACE_TRUNCATE = @REPLACE_TRUNCATE@ - REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ -+REPLACE_TZSET = @REPLACE_TZSET@ - REPLACE_UNLINK = @REPLACE_UNLINK@ - REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ - REPLACE_UNSETENV = @REPLACE_UNSETENV@ -@@ -1172,6 +1204,7 @@ - REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ - REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ - REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ -+REPLACE_WCSFTIME = @REPLACE_WCSFTIME@ - REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ - REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ - REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ -@@ -1208,6 +1241,8 @@ - WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ - WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ - WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ -+WINDOWS_STAT_INODES = @WINDOWS_STAT_INODES@ -+WINDOWS_STAT_TIMESPEC = @WINDOWS_STAT_TIMESPEC@ - WINT_T_SUFFIX = @WINT_T_SUFFIX@ - YACC = @YACC@ - YFLAGS = @YFLAGS@ -diff -durN inetutils-1.9.4.orig/GNUmakefile inetutils-1.9.4/GNUmakefile ---- inetutils-1.9.4.orig/GNUmakefile 2015-06-09 15:54:39.000000000 +0800 -+++ inetutils-1.9.4/GNUmakefile 2017-05-15 17:50:55.703125000 +0800 -@@ -5,7 +5,7 @@ - # It is necessary if you want to build targets usually of interest - # only to the maintainer. - --# Copyright (C) 2001, 2003, 2006-2015 Free Software Foundation, Inc. -+# Copyright (C) 2001, 2003, 2006-2017 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 -diff -durN inetutils-1.9.4.orig/ifconfig/Makefile.in inetutils-1.9.4/ifconfig/Makefile.in ---- inetutils-1.9.4.orig/ifconfig/Makefile.in 2015-06-09 15:48:09.000000000 +0800 -+++ inetutils-1.9.4/ifconfig/Makefile.in 2017-05-15 17:58:15.859375000 +0800 -@@ -110,10 +110,18 @@ - EXTRA_PROGRAMS = ifconfig$(EXEEXT) - subdir = ifconfig - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 --am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ -+am__aclocal_m4_deps = $(top_srcdir)/am/check_macro.m4 \ -+ $(top_srcdir)/am/check_member.m4 \ -+ $(top_srcdir)/am/check_weak_refs.m4 \ -+ $(top_srcdir)/am/config_paths.m4 $(top_srcdir)/am/enable.m4 \ -+ $(top_srcdir)/am/flushleft.m4 $(top_srcdir)/am/krb5.m4 \ -+ $(top_srcdir)/am/libcurses.m4 $(top_srcdir)/am/libidn.m4 \ -+ $(top_srcdir)/am/readline.m4 $(top_srcdir)/am/result.m4 \ -+ $(top_srcdir)/m4/00gnulib.m4 \ - $(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \ - $(top_srcdir)/m4/argp.m4 $(top_srcdir)/m4/arpa_inet_h.m4 \ - $(top_srcdir)/m4/autobuild.m4 $(top_srcdir)/m4/btowc.m4 \ -+ $(top_srcdir)/m4/builtin-expect.m4 \ - $(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/close.m4 \ - $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/codeset.m4 \ - $(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/d-ino.m4 \ -@@ -128,51 +136,56 @@ - $(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl.m4 \ - $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopendir.m4 \ - $(top_srcdir)/m4/filemode.m4 $(top_srcdir)/m4/filenamecat.m4 \ -- $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fnmatch.m4 \ -- $(top_srcdir)/m4/fopen.m4 $(top_srcdir)/m4/fseek.m4 \ -- $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/fstat.m4 \ -- $(top_srcdir)/m4/fstatat.m4 $(top_srcdir)/m4/ftell.m4 \ -- $(top_srcdir)/m4/ftello.m4 $(top_srcdir)/m4/getaddrinfo.m4 \ -+ $(top_srcdir)/m4/flexmember.m4 $(top_srcdir)/m4/float_h.m4 \ -+ $(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fopen.m4 \ -+ $(top_srcdir)/m4/fseek.m4 $(top_srcdir)/m4/fseeko.m4 \ -+ $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/fstatat.m4 \ -+ $(top_srcdir)/m4/ftell.m4 $(top_srcdir)/m4/ftello.m4 \ -+ $(top_srcdir)/m4/getaddrinfo.m4 \ - $(top_srcdir)/m4/getcwd-abort-bug.m4 \ - $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \ - $(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getdomainname.m4 \ - $(top_srcdir)/m4/getdtablesize.m4 \ - $(top_srcdir)/m4/getgroups.m4 $(top_srcdir)/m4/gethostname.m4 \ -- $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getlogin_r.m4 \ -- $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpass.m4 \ -+ $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getlogin.m4 \ -+ $(top_srcdir)/m4/getlogin_r.m4 $(top_srcdir)/m4/getopt.m4 \ -+ $(top_srcdir)/m4/getpass.m4 $(top_srcdir)/m4/getprogname.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettimeofday.m4 \ - $(top_srcdir)/m4/getugroups.m4 \ - $(top_srcdir)/m4/getusershell.m4 $(top_srcdir)/m4/glibc21.m4 \ - $(top_srcdir)/m4/glob.m4 $(top_srcdir)/m4/gnulib-common.m4 \ -- $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/hostent.m4 \ -+ $(top_srcdir)/m4/gnulib-comp.m4 \ -+ $(top_srcdir)/m4/hard-locale.m4 $(top_srcdir)/m4/hostent.m4 \ - $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inet_ntop.m4 \ - $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttostr.m4 \ - $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/ioctl.m4 \ - $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ -- $(top_srcdir)/m4/lib-prefix.m4 \ -+ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/limits-h.m4 \ - $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \ - $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \ - $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localeconv.m4 \ -- $(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/longlong.m4 \ -- $(top_srcdir)/m4/lseek.m4 $(top_srcdir)/m4/lstat.m4 \ -- $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \ -- $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \ -- $(top_srcdir)/m4/mbsrtowcs.m4 $(top_srcdir)/m4/mbstate_t.m4 \ -- $(top_srcdir)/m4/mbtowc.m4 $(top_srcdir)/m4/memchr.m4 \ -- $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/memrchr.m4 \ -- $(top_srcdir)/m4/mgetgroups.m4 $(top_srcdir)/m4/minmax.m4 \ -- $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mmap-anon.m4 \ -- $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \ -+ $(top_srcdir)/m4/localtime-buffer.m4 $(top_srcdir)/m4/lock.m4 \ -+ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \ -+ $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/malloc.m4 \ -+ $(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/mbrtowc.m4 \ -+ $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbsrtowcs.m4 \ -+ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ -+ $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mempcpy.m4 \ -+ $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/mgetgroups.m4 \ -+ $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkstemp.m4 \ -+ $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/mode_t.m4 \ -+ $(top_srcdir)/m4/msvc-inval.m4 \ - $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \ - $(top_srcdir)/m4/netdb_h.m4 $(top_srcdir)/m4/netinet_in_h.m4 \ - $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nocrash.m4 \ - $(top_srcdir)/m4/obstack.m4 $(top_srcdir)/m4/off_t.m4 \ -- $(top_srcdir)/m4/onceonly.m4 $(top_srcdir)/m4/open.m4 \ -- $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/opendir.m4 \ -- $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \ -- $(top_srcdir)/m4/poll.m4 $(top_srcdir)/m4/poll_h.m4 \ -- $(top_srcdir)/m4/posix_openpt.m4 $(top_srcdir)/m4/printf.m4 \ -+ $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/openat.m4 \ -+ $(top_srcdir)/m4/opendir.m4 $(top_srcdir)/m4/pathmax.m4 \ -+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/poll.m4 \ -+ $(top_srcdir)/m4/poll_h.m4 $(top_srcdir)/m4/posix_openpt.m4 \ -+ $(top_srcdir)/m4/printf.m4 \ -+ $(top_srcdir)/m4/pthread_rwlock_rdlock.m4 \ - $(top_srcdir)/m4/pty.m4 $(top_srcdir)/m4/pty_h.m4 \ - $(top_srcdir)/m4/rawmemchr.m4 $(top_srcdir)/m4/read-file.m4 \ - $(top_srcdir)/m4/readdir.m4 $(top_srcdir)/m4/readutmp.m4 \ -@@ -209,14 +222,7 @@ - $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctype_h.m4 \ - $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \ - $(top_srcdir)/m4/xgetcwd.m4 $(top_srcdir)/m4/xsize.m4 \ -- $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/am/check_macro.m4 \ -- $(top_srcdir)/am/check_member.m4 \ -- $(top_srcdir)/am/check_weak_refs.m4 \ -- $(top_srcdir)/am/config_paths.m4 $(top_srcdir)/am/enable.m4 \ -- $(top_srcdir)/am/flushleft.m4 $(top_srcdir)/am/krb5.m4 \ -- $(top_srcdir)/am/libcurses.m4 $(top_srcdir)/am/libidn.m4 \ -- $(top_srcdir)/am/readline.m4 $(top_srcdir)/am/result.m4 \ -- $(top_srcdir)/configure.ac -+ $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/configure.ac - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) - DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ -@@ -379,6 +385,7 @@ - FTPD_LIBPAM = @FTPD_LIBPAM@ - GETADDRINFO_LIB = @GETADDRINFO_LIB@ - GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ -+GETOPT_CDEFS_H = @GETOPT_CDEFS_H@ - GETOPT_H = @GETOPT_H@ - GLIBC21 = @GLIBC21@ - GLOB_H = @GLOB_H@ -@@ -395,6 +402,7 @@ - GNULIB_CLOSE = @GNULIB_CLOSE@ - GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ - GNULIB_CONNECT = @GNULIB_CONNECT@ -+GNULIB_CTIME = @GNULIB_CTIME@ - GNULIB_DIRFD = @GNULIB_DIRFD@ - GNULIB_DPRINTF = @GNULIB_DPRINTF@ - GNULIB_DUP = @GNULIB_DUP@ -@@ -473,6 +481,7 @@ - GNULIB_LINKAT = @GNULIB_LINKAT@ - GNULIB_LISTEN = @GNULIB_LISTEN@ - GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ -+GNULIB_LOCALTIME = @GNULIB_LOCALTIME@ - GNULIB_LSEEK = @GNULIB_LSEEK@ - GNULIB_LSTAT = @GNULIB_LSTAT@ - GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ -@@ -520,6 +529,8 @@ - GNULIB_OPENAT = @GNULIB_OPENAT@ - GNULIB_OPENDIR = @GNULIB_OPENDIR@ - GNULIB_OPENPTY = @GNULIB_OPENPTY@ -+GNULIB_OVERRIDES_STRUCT_STAT = @GNULIB_OVERRIDES_STRUCT_STAT@ -+GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@ - GNULIB_PCLOSE = @GNULIB_PCLOSE@ - GNULIB_PERROR = @GNULIB_PERROR@ - GNULIB_PIPE = @GNULIB_PIPE@ -@@ -586,6 +597,7 @@ - GNULIB_STRDUP = @GNULIB_STRDUP@ - GNULIB_STRERROR = @GNULIB_STRERROR@ - GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ -+GNULIB_STRFTIME = @GNULIB_STRFTIME@ - GNULIB_STRNCAT = @GNULIB_STRNCAT@ - GNULIB_STRNDUP = @GNULIB_STRNDUP@ - GNULIB_STRNLEN = @GNULIB_STRNLEN@ -@@ -605,9 +617,12 @@ - GNULIB_TCGETSID = @GNULIB_TCGETSID@ - GNULIB_TIMEGM = @GNULIB_TIMEGM@ - GNULIB_TIME_R = @GNULIB_TIME_R@ -+GNULIB_TIME_RZ = @GNULIB_TIME_RZ@ - GNULIB_TMPFILE = @GNULIB_TMPFILE@ - GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ -+GNULIB_TRUNCATE = @GNULIB_TRUNCATE@ - GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -+GNULIB_TZSET = @GNULIB_TZSET@ - GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ - GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ - GNULIB_UNLINK = @GNULIB_UNLINK@ -@@ -637,6 +652,7 @@ - GNULIB_WCSCPY = @GNULIB_WCSCPY@ - GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ - GNULIB_WCSDUP = @GNULIB_WCSDUP@ -+GNULIB_WCSFTIME = @GNULIB_WCSFTIME@ - GNULIB_WCSLEN = @GNULIB_WCSLEN@ - GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ - GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ -@@ -670,9 +686,11 @@ - HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ - HAVE_ATOLL = @HAVE_ATOLL@ - HAVE_BTOWC = @HAVE_BTOWC@ -+HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@ - HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ - HAVE_CHOWN = @HAVE_CHOWN@ - HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ -+HAVE_CRTDEFS_H = @HAVE_CRTDEFS_H@ - HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ - HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ - HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ -@@ -688,6 +706,7 @@ - HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ - HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ - HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ -+HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@ - HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ - HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ - HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ -@@ -806,6 +825,7 @@ - HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ - HAVE_PTY_H = @HAVE_PTY_H@ - HAVE_PWRITE = @HAVE_PWRITE@ -+HAVE_QSORT_R = @HAVE_QSORT_R@ - HAVE_RAISE = @HAVE_RAISE@ - HAVE_RANDOM = @HAVE_RANDOM@ - HAVE_RANDOM_H = @HAVE_RANDOM_H@ -@@ -867,7 +887,10 @@ - HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@ - HAVE_TERMIOS_H = @HAVE_TERMIOS_H@ - HAVE_TIMEGM = @HAVE_TIMEGM@ -+HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@ -+HAVE_TRUNCATE = @HAVE_TRUNCATE@ - HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ -+HAVE_TZSET = @HAVE_TZSET@ - HAVE_UNISTD_H = @HAVE_UNISTD_H@ - HAVE_UNLINKAT = @HAVE_UNLINKAT@ - HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ -@@ -890,6 +913,7 @@ - HAVE_WCSCPY = @HAVE_WCSCPY@ - HAVE_WCSCSPN = @HAVE_WCSCSPN@ - HAVE_WCSDUP = @HAVE_WCSDUP@ -+HAVE_WCSFTIME = @HAVE_WCSFTIME@ - HAVE_WCSLEN = @HAVE_WCSLEN@ - HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ - HAVE_WCSNCAT = @HAVE_WCSNCAT@ -@@ -957,8 +981,10 @@ - LIBTHREAD = @LIBTHREAD@ - LIBUTIL = @LIBUTIL@ - LIBWRAP = @LIBWRAP@ -+LIB_GETLOGIN = @LIB_GETLOGIN@ - LIB_POLL = @LIB_POLL@ - LIB_SELECT = @LIB_SELECT@ -+LIMITS_H = @LIMITS_H@ - LN_S = @LN_S@ - LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ - LOCALE_FR = @LOCALE_FR@ -@@ -985,6 +1011,7 @@ - NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ - NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ - NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ -+NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@ - NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ - NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ - NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ -@@ -1017,6 +1044,7 @@ - NEXT_FLOAT_H = @NEXT_FLOAT_H@ - NEXT_GETOPT_H = @NEXT_GETOPT_H@ - NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ -+NEXT_LIMITS_H = @NEXT_LIMITS_H@ - NEXT_LOCALE_H = @NEXT_LOCALE_H@ - NEXT_NETDB_H = @NEXT_NETDB_H@ - NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ -@@ -1064,6 +1092,7 @@ - REPLACE_CHOWN = @REPLACE_CHOWN@ - REPLACE_CLOSE = @REPLACE_CLOSE@ - REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ -+REPLACE_CTIME = @REPLACE_CTIME@ - REPLACE_DIRFD = @REPLACE_DIRFD@ - REPLACE_DPRINTF = @REPLACE_DPRINTF@ - REPLACE_DUP = @REPLACE_DUP@ -@@ -1175,6 +1204,7 @@ - REPLACE_STRDUP = @REPLACE_STRDUP@ - REPLACE_STRERROR = @REPLACE_STRERROR@ - REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ -+REPLACE_STRFTIME = @REPLACE_STRFTIME@ - REPLACE_STRNCAT = @REPLACE_STRNCAT@ - REPLACE_STRNDUP = @REPLACE_STRNDUP@ - REPLACE_STRNLEN = @REPLACE_STRNLEN@ -@@ -1189,7 +1219,9 @@ - REPLACE_TIMEGM = @REPLACE_TIMEGM@ - REPLACE_TMPFILE = @REPLACE_TMPFILE@ - REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ -+REPLACE_TRUNCATE = @REPLACE_TRUNCATE@ - REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ -+REPLACE_TZSET = @REPLACE_TZSET@ - REPLACE_UNLINK = @REPLACE_UNLINK@ - REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ - REPLACE_UNSETENV = @REPLACE_UNSETENV@ -@@ -1202,6 +1234,7 @@ - REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ - REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ - REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ -+REPLACE_WCSFTIME = @REPLACE_WCSFTIME@ - REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ - REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ - REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ -@@ -1238,6 +1271,8 @@ - WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ - WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ - WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ -+WINDOWS_STAT_INODES = @WINDOWS_STAT_INODES@ -+WINDOWS_STAT_TIMESPEC = @WINDOWS_STAT_TIMESPEC@ - WINT_T_SUFFIX = @WINT_T_SUFFIX@ - YACC = @YACC@ - YFLAGS = @YFLAGS@ -diff -durN inetutils-1.9.4.orig/ifconfig/system/Makefile.in inetutils-1.9.4/ifconfig/system/Makefile.in ---- inetutils-1.9.4.orig/ifconfig/system/Makefile.in 2015-06-09 15:48:09.000000000 +0800 -+++ inetutils-1.9.4/ifconfig/system/Makefile.in 2017-05-15 17:58:16.062500000 +0800 -@@ -111,10 +111,18 @@ - host_triplet = @host@ - subdir = ifconfig/system - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 --am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ -+am__aclocal_m4_deps = $(top_srcdir)/am/check_macro.m4 \ -+ $(top_srcdir)/am/check_member.m4 \ -+ $(top_srcdir)/am/check_weak_refs.m4 \ -+ $(top_srcdir)/am/config_paths.m4 $(top_srcdir)/am/enable.m4 \ -+ $(top_srcdir)/am/flushleft.m4 $(top_srcdir)/am/krb5.m4 \ -+ $(top_srcdir)/am/libcurses.m4 $(top_srcdir)/am/libidn.m4 \ -+ $(top_srcdir)/am/readline.m4 $(top_srcdir)/am/result.m4 \ -+ $(top_srcdir)/m4/00gnulib.m4 \ - $(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \ - $(top_srcdir)/m4/argp.m4 $(top_srcdir)/m4/arpa_inet_h.m4 \ - $(top_srcdir)/m4/autobuild.m4 $(top_srcdir)/m4/btowc.m4 \ -+ $(top_srcdir)/m4/builtin-expect.m4 \ - $(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/close.m4 \ - $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/codeset.m4 \ - $(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/d-ino.m4 \ -@@ -129,51 +137,56 @@ - $(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl.m4 \ - $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopendir.m4 \ - $(top_srcdir)/m4/filemode.m4 $(top_srcdir)/m4/filenamecat.m4 \ -- $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fnmatch.m4 \ -- $(top_srcdir)/m4/fopen.m4 $(top_srcdir)/m4/fseek.m4 \ -- $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/fstat.m4 \ -- $(top_srcdir)/m4/fstatat.m4 $(top_srcdir)/m4/ftell.m4 \ -- $(top_srcdir)/m4/ftello.m4 $(top_srcdir)/m4/getaddrinfo.m4 \ -+ $(top_srcdir)/m4/flexmember.m4 $(top_srcdir)/m4/float_h.m4 \ -+ $(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fopen.m4 \ -+ $(top_srcdir)/m4/fseek.m4 $(top_srcdir)/m4/fseeko.m4 \ -+ $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/fstatat.m4 \ -+ $(top_srcdir)/m4/ftell.m4 $(top_srcdir)/m4/ftello.m4 \ -+ $(top_srcdir)/m4/getaddrinfo.m4 \ - $(top_srcdir)/m4/getcwd-abort-bug.m4 \ - $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \ - $(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getdomainname.m4 \ - $(top_srcdir)/m4/getdtablesize.m4 \ - $(top_srcdir)/m4/getgroups.m4 $(top_srcdir)/m4/gethostname.m4 \ -- $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getlogin_r.m4 \ -- $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpass.m4 \ -+ $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getlogin.m4 \ -+ $(top_srcdir)/m4/getlogin_r.m4 $(top_srcdir)/m4/getopt.m4 \ -+ $(top_srcdir)/m4/getpass.m4 $(top_srcdir)/m4/getprogname.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettimeofday.m4 \ - $(top_srcdir)/m4/getugroups.m4 \ - $(top_srcdir)/m4/getusershell.m4 $(top_srcdir)/m4/glibc21.m4 \ - $(top_srcdir)/m4/glob.m4 $(top_srcdir)/m4/gnulib-common.m4 \ -- $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/hostent.m4 \ -+ $(top_srcdir)/m4/gnulib-comp.m4 \ -+ $(top_srcdir)/m4/hard-locale.m4 $(top_srcdir)/m4/hostent.m4 \ - $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inet_ntop.m4 \ - $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttostr.m4 \ - $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/ioctl.m4 \ - $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ -- $(top_srcdir)/m4/lib-prefix.m4 \ -+ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/limits-h.m4 \ - $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \ - $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \ - $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localeconv.m4 \ -- $(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/longlong.m4 \ -- $(top_srcdir)/m4/lseek.m4 $(top_srcdir)/m4/lstat.m4 \ -- $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \ -- $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \ -- $(top_srcdir)/m4/mbsrtowcs.m4 $(top_srcdir)/m4/mbstate_t.m4 \ -- $(top_srcdir)/m4/mbtowc.m4 $(top_srcdir)/m4/memchr.m4 \ -- $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/memrchr.m4 \ -- $(top_srcdir)/m4/mgetgroups.m4 $(top_srcdir)/m4/minmax.m4 \ -- $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mmap-anon.m4 \ -- $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \ -+ $(top_srcdir)/m4/localtime-buffer.m4 $(top_srcdir)/m4/lock.m4 \ -+ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \ -+ $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/malloc.m4 \ -+ $(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/mbrtowc.m4 \ -+ $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbsrtowcs.m4 \ -+ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ -+ $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mempcpy.m4 \ -+ $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/mgetgroups.m4 \ -+ $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkstemp.m4 \ -+ $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/mode_t.m4 \ -+ $(top_srcdir)/m4/msvc-inval.m4 \ - $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \ - $(top_srcdir)/m4/netdb_h.m4 $(top_srcdir)/m4/netinet_in_h.m4 \ - $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nocrash.m4 \ - $(top_srcdir)/m4/obstack.m4 $(top_srcdir)/m4/off_t.m4 \ -- $(top_srcdir)/m4/onceonly.m4 $(top_srcdir)/m4/open.m4 \ -- $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/opendir.m4 \ -- $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \ -- $(top_srcdir)/m4/poll.m4 $(top_srcdir)/m4/poll_h.m4 \ -- $(top_srcdir)/m4/posix_openpt.m4 $(top_srcdir)/m4/printf.m4 \ -+ $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/openat.m4 \ -+ $(top_srcdir)/m4/opendir.m4 $(top_srcdir)/m4/pathmax.m4 \ -+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/poll.m4 \ -+ $(top_srcdir)/m4/poll_h.m4 $(top_srcdir)/m4/posix_openpt.m4 \ -+ $(top_srcdir)/m4/printf.m4 \ -+ $(top_srcdir)/m4/pthread_rwlock_rdlock.m4 \ - $(top_srcdir)/m4/pty.m4 $(top_srcdir)/m4/pty_h.m4 \ - $(top_srcdir)/m4/rawmemchr.m4 $(top_srcdir)/m4/read-file.m4 \ - $(top_srcdir)/m4/readdir.m4 $(top_srcdir)/m4/readutmp.m4 \ -@@ -210,14 +223,7 @@ - $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctype_h.m4 \ - $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \ - $(top_srcdir)/m4/xgetcwd.m4 $(top_srcdir)/m4/xsize.m4 \ -- $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/am/check_macro.m4 \ -- $(top_srcdir)/am/check_member.m4 \ -- $(top_srcdir)/am/check_weak_refs.m4 \ -- $(top_srcdir)/am/config_paths.m4 $(top_srcdir)/am/enable.m4 \ -- $(top_srcdir)/am/flushleft.m4 $(top_srcdir)/am/krb5.m4 \ -- $(top_srcdir)/am/libcurses.m4 $(top_srcdir)/am/libidn.m4 \ -- $(top_srcdir)/am/readline.m4 $(top_srcdir)/am/result.m4 \ -- $(top_srcdir)/configure.ac -+ $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/configure.ac - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) - DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ -@@ -312,6 +318,7 @@ - FTPD_LIBPAM = @FTPD_LIBPAM@ - GETADDRINFO_LIB = @GETADDRINFO_LIB@ - GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ -+GETOPT_CDEFS_H = @GETOPT_CDEFS_H@ - GETOPT_H = @GETOPT_H@ - GLIBC21 = @GLIBC21@ - GLOB_H = @GLOB_H@ -@@ -328,6 +335,7 @@ - GNULIB_CLOSE = @GNULIB_CLOSE@ - GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ - GNULIB_CONNECT = @GNULIB_CONNECT@ -+GNULIB_CTIME = @GNULIB_CTIME@ - GNULIB_DIRFD = @GNULIB_DIRFD@ - GNULIB_DPRINTF = @GNULIB_DPRINTF@ - GNULIB_DUP = @GNULIB_DUP@ -@@ -406,6 +414,7 @@ - GNULIB_LINKAT = @GNULIB_LINKAT@ - GNULIB_LISTEN = @GNULIB_LISTEN@ - GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ -+GNULIB_LOCALTIME = @GNULIB_LOCALTIME@ - GNULIB_LSEEK = @GNULIB_LSEEK@ - GNULIB_LSTAT = @GNULIB_LSTAT@ - GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ -@@ -453,6 +462,8 @@ - GNULIB_OPENAT = @GNULIB_OPENAT@ - GNULIB_OPENDIR = @GNULIB_OPENDIR@ - GNULIB_OPENPTY = @GNULIB_OPENPTY@ -+GNULIB_OVERRIDES_STRUCT_STAT = @GNULIB_OVERRIDES_STRUCT_STAT@ -+GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@ - GNULIB_PCLOSE = @GNULIB_PCLOSE@ - GNULIB_PERROR = @GNULIB_PERROR@ - GNULIB_PIPE = @GNULIB_PIPE@ -@@ -519,6 +530,7 @@ - GNULIB_STRDUP = @GNULIB_STRDUP@ - GNULIB_STRERROR = @GNULIB_STRERROR@ - GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ -+GNULIB_STRFTIME = @GNULIB_STRFTIME@ - GNULIB_STRNCAT = @GNULIB_STRNCAT@ - GNULIB_STRNDUP = @GNULIB_STRNDUP@ - GNULIB_STRNLEN = @GNULIB_STRNLEN@ -@@ -538,9 +550,12 @@ - GNULIB_TCGETSID = @GNULIB_TCGETSID@ - GNULIB_TIMEGM = @GNULIB_TIMEGM@ - GNULIB_TIME_R = @GNULIB_TIME_R@ -+GNULIB_TIME_RZ = @GNULIB_TIME_RZ@ - GNULIB_TMPFILE = @GNULIB_TMPFILE@ - GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ -+GNULIB_TRUNCATE = @GNULIB_TRUNCATE@ - GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -+GNULIB_TZSET = @GNULIB_TZSET@ - GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ - GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ - GNULIB_UNLINK = @GNULIB_UNLINK@ -@@ -570,6 +585,7 @@ - GNULIB_WCSCPY = @GNULIB_WCSCPY@ - GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ - GNULIB_WCSDUP = @GNULIB_WCSDUP@ -+GNULIB_WCSFTIME = @GNULIB_WCSFTIME@ - GNULIB_WCSLEN = @GNULIB_WCSLEN@ - GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ - GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ -@@ -603,9 +619,11 @@ - HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ - HAVE_ATOLL = @HAVE_ATOLL@ - HAVE_BTOWC = @HAVE_BTOWC@ -+HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@ - HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ - HAVE_CHOWN = @HAVE_CHOWN@ - HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ -+HAVE_CRTDEFS_H = @HAVE_CRTDEFS_H@ - HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ - HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ - HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ -@@ -621,6 +639,7 @@ - HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ - HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ - HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ -+HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@ - HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ - HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ - HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ -@@ -739,6 +758,7 @@ - HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ - HAVE_PTY_H = @HAVE_PTY_H@ - HAVE_PWRITE = @HAVE_PWRITE@ -+HAVE_QSORT_R = @HAVE_QSORT_R@ - HAVE_RAISE = @HAVE_RAISE@ - HAVE_RANDOM = @HAVE_RANDOM@ - HAVE_RANDOM_H = @HAVE_RANDOM_H@ -@@ -800,7 +820,10 @@ - HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@ - HAVE_TERMIOS_H = @HAVE_TERMIOS_H@ - HAVE_TIMEGM = @HAVE_TIMEGM@ -+HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@ -+HAVE_TRUNCATE = @HAVE_TRUNCATE@ - HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ -+HAVE_TZSET = @HAVE_TZSET@ - HAVE_UNISTD_H = @HAVE_UNISTD_H@ - HAVE_UNLINKAT = @HAVE_UNLINKAT@ - HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ -@@ -823,6 +846,7 @@ - HAVE_WCSCPY = @HAVE_WCSCPY@ - HAVE_WCSCSPN = @HAVE_WCSCSPN@ - HAVE_WCSDUP = @HAVE_WCSDUP@ -+HAVE_WCSFTIME = @HAVE_WCSFTIME@ - HAVE_WCSLEN = @HAVE_WCSLEN@ - HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ - HAVE_WCSNCAT = @HAVE_WCSNCAT@ -@@ -890,8 +914,10 @@ - LIBTHREAD = @LIBTHREAD@ - LIBUTIL = @LIBUTIL@ - LIBWRAP = @LIBWRAP@ -+LIB_GETLOGIN = @LIB_GETLOGIN@ - LIB_POLL = @LIB_POLL@ - LIB_SELECT = @LIB_SELECT@ -+LIMITS_H = @LIMITS_H@ - LN_S = @LN_S@ - LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ - LOCALE_FR = @LOCALE_FR@ -@@ -918,6 +944,7 @@ - NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ - NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ - NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ -+NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@ - NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ - NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ - NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ -@@ -950,6 +977,7 @@ - NEXT_FLOAT_H = @NEXT_FLOAT_H@ - NEXT_GETOPT_H = @NEXT_GETOPT_H@ - NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ -+NEXT_LIMITS_H = @NEXT_LIMITS_H@ - NEXT_LOCALE_H = @NEXT_LOCALE_H@ - NEXT_NETDB_H = @NEXT_NETDB_H@ - NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ -@@ -997,6 +1025,7 @@ - REPLACE_CHOWN = @REPLACE_CHOWN@ - REPLACE_CLOSE = @REPLACE_CLOSE@ - REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ -+REPLACE_CTIME = @REPLACE_CTIME@ - REPLACE_DIRFD = @REPLACE_DIRFD@ - REPLACE_DPRINTF = @REPLACE_DPRINTF@ - REPLACE_DUP = @REPLACE_DUP@ -@@ -1108,6 +1137,7 @@ - REPLACE_STRDUP = @REPLACE_STRDUP@ - REPLACE_STRERROR = @REPLACE_STRERROR@ - REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ -+REPLACE_STRFTIME = @REPLACE_STRFTIME@ - REPLACE_STRNCAT = @REPLACE_STRNCAT@ - REPLACE_STRNDUP = @REPLACE_STRNDUP@ - REPLACE_STRNLEN = @REPLACE_STRNLEN@ -@@ -1122,7 +1152,9 @@ - REPLACE_TIMEGM = @REPLACE_TIMEGM@ - REPLACE_TMPFILE = @REPLACE_TMPFILE@ - REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ -+REPLACE_TRUNCATE = @REPLACE_TRUNCATE@ - REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ -+REPLACE_TZSET = @REPLACE_TZSET@ - REPLACE_UNLINK = @REPLACE_UNLINK@ - REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ - REPLACE_UNSETENV = @REPLACE_UNSETENV@ -@@ -1135,6 +1167,7 @@ - REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ - REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ - REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ -+REPLACE_WCSFTIME = @REPLACE_WCSFTIME@ - REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ - REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ - REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ -@@ -1171,6 +1204,8 @@ - WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ - WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ - WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ -+WINDOWS_STAT_INODES = @WINDOWS_STAT_INODES@ -+WINDOWS_STAT_TIMESPEC = @WINDOWS_STAT_TIMESPEC@ - WINT_T_SUFFIX = @WINT_T_SUFFIX@ - YACC = @YACC@ - YFLAGS = @YFLAGS@ -diff -durN inetutils-1.9.4.orig/INSTALL inetutils-1.9.4/INSTALL ---- inetutils-1.9.4.orig/INSTALL 2015-01-08 01:26:57.000000000 +0800 -+++ inetutils-1.9.4/INSTALL 2017-05-15 11:01:15.328125000 +0800 -@@ -1,7 +1,7 @@ - Installation Instructions - ************************* - -- Copyright (C) 1994-1996, 1999-2002, 2004-2015 Free Software -+ Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software - Foundation, Inc. - - Copying and distribution of this file, with or without modification, -diff -durN inetutils-1.9.4.orig/lib/_Noreturn.h inetutils-1.9.4/lib/_Noreturn.h ---- inetutils-1.9.4.orig/lib/_Noreturn.h 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/lib/_Noreturn.h 2017-05-15 17:50:57.453125000 +0800 -@@ -0,0 +1,10 @@ -+#if !defined _Noreturn && __STDC_VERSION__ < 201112 -+# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ -+ || 0x5110 <= __SUNPRO_C) -+# define _Noreturn __attribute__ ((__noreturn__)) -+# elif 1200 <= _MSC_VER -+# define _Noreturn __declspec (noreturn) -+# else -+# define _Noreturn -+# endif -+#endif -diff -durN inetutils-1.9.4.orig/lib/alignof.h inetutils-1.9.4/lib/alignof.h ---- inetutils-1.9.4.orig/lib/alignof.h 2015-05-12 20:14:19.000000000 +0800 -+++ inetutils-1.9.4/lib/alignof.h 2017-05-15 17:50:57.593750000 +0800 -@@ -1,5 +1,5 @@ - /* Determine alignment of types. -- Copyright (C) 2003-2004, 2006, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2003-2004, 2006, 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/alloca.in.h inetutils-1.9.4/lib/alloca.in.h ---- inetutils-1.9.4.orig/lib/alloca.in.h 2015-05-12 20:14:19.000000000 +0800 -+++ inetutils-1.9.4/lib/alloca.in.h 2017-05-15 17:50:58.078125000 +0800 -@@ -1,6 +1,6 @@ - /* Memory allocation on the stack. - -- Copyright (C) 1995, 1999, 2001-2004, 2006-2015 Free Software Foundation, -+ Copyright (C) 1995, 1999, 2001-2004, 2006-2017 Free Software Foundation, - Inc. - - This program is free software; you can redistribute it and/or modify it -@@ -51,6 +51,8 @@ - void *_alloca (unsigned short); - # pragma intrinsic (_alloca) - # define alloca _alloca -+# elif defined __MVS__ -+# include - # else - # include - # ifdef __cplusplus -diff -durN inetutils-1.9.4.orig/lib/anytostr.c inetutils-1.9.4/lib/anytostr.c ---- inetutils-1.9.4.orig/lib/anytostr.c 2015-05-12 20:14:19.000000000 +0800 -+++ inetutils-1.9.4/lib/anytostr.c 2017-05-15 17:50:58.234375000 +0800 -@@ -1,6 +1,6 @@ - /* anytostr.c -- convert integers to printable strings - -- Copyright (C) 2001, 2006, 2008-2015 Free Software Foundation, Inc. -+ Copyright (C) 2001, 2006, 2008-2017 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 -diff -durN inetutils-1.9.4.orig/lib/arg-nonnull.h inetutils-1.9.4/lib/arg-nonnull.h ---- inetutils-1.9.4.orig/lib/arg-nonnull.h 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/lib/arg-nonnull.h 2017-05-15 17:50:58.390625000 +0800 -@@ -0,0 +1,26 @@ -+/* A C macro for declaring that specific arguments must not be NULL. -+ Copyright (C) 2009-2017 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 the Free Software Foundation; either version 3 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, see . */ -+ -+/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools -+ that the values passed as arguments n, ..., m must be non-NULL pointers. -+ n = 1 stands for the first argument, n = 2 for the second argument etc. */ -+#ifndef _GL_ARG_NONNULL -+# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 -+# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) -+# else -+# define _GL_ARG_NONNULL(params) -+# endif -+#endif -diff -durN inetutils-1.9.4.orig/lib/argp.h inetutils-1.9.4/lib/argp.h ---- inetutils-1.9.4.orig/lib/argp.h 2015-05-12 20:14:19.000000000 +0800 -+++ inetutils-1.9.4/lib/argp.h 2017-05-15 17:51:00.812500000 +0800 -@@ -1,5 +1,5 @@ - /* Hierarchical argument parsing, layered over getopt. -- Copyright (C) 1995-1999, 2003-2015 Free Software Foundation, Inc. -+ Copyright (C) 1995-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Written by Miles Bader . - -@@ -146,15 +146,14 @@ - /* Valid only in conjunction with OPTION_DOC. This option disables translation - of option name. */ - #define OPTION_NO_TRANS 0x20 -- - - struct argp; /* fwd declare this type */ - struct argp_state; /* " */ - struct argp_child; /* " */ - - /* The type of a pointer to an argp parsing function. */ --typedef error_t (*argp_parser_t) (int key, char *arg, -- struct argp_state *state); -+typedef error_t (*argp_parser_t) (int __key, char *__arg, -+ struct argp_state *__state); - - /* What to return for unrecognized keys. For special ARGP_KEY_ keys, such - returns will simply be ignored. For user keys, this error will be turned -@@ -589,28 +588,7 @@ - # endif - - # ifndef ARGP_EI --# ifdef __GNUC__ -- /* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 -- inline semantics, unless -fgnu89-inline is used. It defines a macro -- __GNUC_STDC_INLINE__ to indicate this situation or a macro -- __GNUC_GNU_INLINE__ to indicate the opposite situation. -- GCC 4.2 with -std=c99 or -std=gnu99 implements the GNU C inline -- semantics but warns, unless -fgnu89-inline is used: -- warning: C99 inline functions are not supported; using GNU89 -- warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute -- It defines a macro __GNUC_GNU_INLINE__ to indicate this situation. */ --# if defined __GNUC_STDC_INLINE__ --# define ARGP_EI __inline__ --# elif defined __GNUC_GNU_INLINE__ --# define ARGP_EI extern __inline__ __attribute__ ((__gnu_inline__)) --# else --# define ARGP_EI extern __inline__ --# endif --# else -- /* With other compilers, assume the ISO C99 meaning of 'inline', if -- the compiler supports 'inline' at all. */ --# define ARGP_EI inline --# endif -+# define ARGP_EI __extern_inline - # endif - - ARGP_EI void -diff -durN inetutils-1.9.4.orig/lib/argp-ba.c inetutils-1.9.4/lib/argp-ba.c ---- inetutils-1.9.4.orig/lib/argp-ba.c 2015-03-31 15:08:14.000000000 +0800 -+++ inetutils-1.9.4/lib/argp-ba.c 2017-05-15 17:50:58.546875000 +0800 -@@ -1,5 +1,5 @@ - /* Default definition for ARGP_PROGRAM_BUG_ADDRESS. -- Copyright (C) 1996-1997, 1999, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 1996-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Written by Miles Bader . - -diff -durN inetutils-1.9.4.orig/lib/argp-eexst.c inetutils-1.9.4/lib/argp-eexst.c ---- inetutils-1.9.4.orig/lib/argp-eexst.c 2015-05-12 20:14:19.000000000 +0800 -+++ inetutils-1.9.4/lib/argp-eexst.c 2017-05-15 17:50:58.687500000 +0800 -@@ -1,5 +1,5 @@ - /* Default definition for ARGP_ERR_EXIT_STATUS -- Copyright (C) 1997, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 1997, 2009-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Written by Miles Bader . - -diff -durN inetutils-1.9.4.orig/lib/argp-fmtstream.c inetutils-1.9.4/lib/argp-fmtstream.c ---- inetutils-1.9.4.orig/lib/argp-fmtstream.c 2015-05-12 20:14:19.000000000 +0800 -+++ inetutils-1.9.4/lib/argp-fmtstream.c 2017-05-15 17:50:58.828125000 +0800 -@@ -1,6 +1,5 @@ - /* Word-wrapping and line-truncating streams -- Copyright (C) 1997-1999, 2001-2003, 2005, 2009-2015 Free Software -- Foundation, Inc. -+ Copyright (C) 1997-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Written by Miles Bader . - -@@ -39,7 +38,7 @@ - #define isblank(ch) ((ch)==' ' || (ch)=='\t') - #endif - --#if defined _LIBC && defined USE_IN_LIBIO -+#ifdef _LIBC - # include - # include - # define __vsnprintf(s, l, f, a) _IO_vsnprintf (s, l, f, a) -@@ -100,7 +99,7 @@ - __argp_fmtstream_update (fs); - if (fs->p > fs->buf) - { --#ifdef USE_IN_LIBIO -+#ifdef _LIBC - __fxprintf (fs->stream, "%.*s", (int) (fs->p - fs->buf), fs->buf); - #else - fwrite_unlocked (fs->buf, 1, fs->p - fs->buf, fs->stream); -@@ -149,7 +148,7 @@ - size_t i; - for (i = 0; i < pad; i++) - { --#ifdef USE_IN_LIBIO -+#ifdef _LIBC - if (_IO_fwide (fs->stream, 0) > 0) - putwc_unlocked (L' ', fs->stream); - else -@@ -315,7 +314,7 @@ - *nl++ = ' '; - else - for (i = 0; i < fs->wmargin; ++i) --#ifdef USE_IN_LIBIO -+#ifdef _LIBC - if (_IO_fwide (fs->stream, 0) > 0) - putwc_unlocked (L' ', fs->stream); - else -diff -durN inetutils-1.9.4.orig/lib/argp-fmtstream.h inetutils-1.9.4/lib/argp-fmtstream.h ---- inetutils-1.9.4.orig/lib/argp-fmtstream.h 2015-05-12 20:14:19.000000000 +0800 -+++ inetutils-1.9.4/lib/argp-fmtstream.h 2017-05-15 17:50:59.000000000 +0800 -@@ -1,5 +1,5 @@ - /* Word-wrapping and line-truncating streams. -- Copyright (C) 1997, 2006-2015 Free Software Foundation, Inc. -+ Copyright (C) 1997-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Written by Miles Bader . - -@@ -40,8 +40,7 @@ - # define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ - #endif - --#if (_LIBC - 0 && !defined (USE_IN_LIBIO)) \ -- || (defined (__GNU_LIBRARY__) && defined (HAVE_LINEWRAP_H)) -+#if defined (__GNU_LIBRARY__) && defined (HAVE_LINEWRAP_H) - /* line_wrap_stream is available, so use that. */ - #define ARGP_FMTSTREAM_USE_LINEWRAP - #endif -@@ -87,6 +86,7 @@ - - #else /* !ARGP_FMTSTREAM_USE_LINEWRAP */ - /* Guess we have to define our own version. */ -+ - - struct argp_fmtstream - { -@@ -207,63 +207,11 @@ - #endif - - #ifndef ARGP_FS_EI --# ifdef __GNUC__ -- /* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 -- inline semantics, unless -fgnu89-inline is used. It defines a macro -- __GNUC_STDC_INLINE__ to indicate this situation or a macro -- __GNUC_GNU_INLINE__ to indicate the opposite situation. -- -- GCC 4.2 with -std=c99 or -std=gnu99 implements the GNU C inline -- semantics but warns, unless -fgnu89-inline is used: -- warning: C99 inline functions are not supported; using GNU89 -- warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute -- It defines a macro __GNUC_GNU_INLINE__ to indicate this situation. -- -- Whereas Apple GCC 4.0.1 build 5479 without -std=c99 or -std=gnu99 -- implements the GNU C inline semantics and defines the macro -- __GNUC_GNU_INLINE__, but it does not warn and does not support -- __attribute__ ((__gnu_inline__)). -- -- All in all, these are the possible combinations. For every compiler, -- we need to choose ARGP_FS_EI so that the corresponding table cell -- contains an "ok". -- -- \ ARGP_FS_EI inline extern extern -- \ inline inline -- CC \ __attribute__ -- ((gnu_inline)) -- -- gcc 4.3.0 error ok ok -- gcc 4.3.0 -std=gnu99 -fgnu89-inline error ok ok -- gcc 4.3.0 -std=gnu99 ok error ok -- -- gcc 4.2.2 error ok ok -- gcc 4.2.2 -std=gnu99 -fgnu89-inline error ok ok -- gcc 4.2.2 -std=gnu99 error warning ok -- -- gcc 4.1.2 error ok warning -- gcc 4.1.2 -std=gnu99 error ok warning -- -- Apple gcc 4.0.1 error ok warning -- Apple gcc 4.0.1 -std=gnu99 ok error warning -- */ --# if defined __GNUC_STDC_INLINE__ --# define ARGP_FS_EI inline --# elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) --# define ARGP_FS_EI extern inline __attribute__ ((__gnu_inline__)) --# else --# define ARGP_FS_EI extern inline --# endif --# else -- /* With other compilers, assume the ISO C99 meaning of 'inline', if -- the compiler supports 'inline' at all. */ --# define ARGP_FS_EI inline --# endif -+#define ARGP_FS_EI extern inline - #endif - - ARGP_FS_EI size_t --__argp_fmtstream_write (argp_fmtstream_t __fs, -- const char *__str, size_t __len) -+__argp_fmtstream_write (argp_fmtstream_t __fs, const char *__str, size_t __len) - { - if (__fs->p + __len <= __fs->end || __argp_fmtstream_ensure (__fs, __len)) - { -diff -durN inetutils-1.9.4.orig/lib/argp-fs-xinl.c inetutils-1.9.4/lib/argp-fs-xinl.c ---- inetutils-1.9.4.orig/lib/argp-fs-xinl.c 2015-05-12 20:14:19.000000000 +0800 -+++ inetutils-1.9.4/lib/argp-fs-xinl.c 2017-05-15 17:50:59.203125000 +0800 -@@ -1,5 +1,5 @@ - /* Real definitions for extern inline functions in argp-fmtstream.h -- Copyright (C) 1997, 2003-2004, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 1997-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Written by Miles Bader . - -diff -durN inetutils-1.9.4.orig/lib/argp-help.c inetutils-1.9.4/lib/argp-help.c ---- inetutils-1.9.4.orig/lib/argp-help.c 2015-05-12 20:14:19.000000000 +0800 -+++ inetutils-1.9.4/lib/argp-help.c 2017-05-15 17:50:59.359375000 +0800 -@@ -1,5 +1,5 @@ - /* Hierarchical argument parsing help output -- Copyright (C) 1995-2005, 2007, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 1995-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Written by Miles Bader . - -@@ -26,15 +26,16 @@ - - #include - #include -+#include - #include - #include - #include --#include - #include - #include - #include - #include --#ifdef USE_IN_LIBIO -+#ifdef _LIBC -+# include <../libio/libioP.h> - # include - #endif - -@@ -42,7 +43,7 @@ - # include - # undef dgettext - # define dgettext(domain, msgid) \ -- INTUSE(__dcgettext) (domain, msgid, LC_MESSAGES) -+ __dcgettext (domain, msgid, LC_MESSAGES) - #else - # include "gettext.h" - #endif -@@ -104,39 +105,38 @@ - static struct uparams uparams = { - DUP_ARGS, DUP_ARGS_NOTE, - SHORT_OPT_COL, LONG_OPT_COL, DOC_OPT_COL, OPT_DOC_COL, HEADER_COL, -- USAGE_INDENT, RMARGIN, -- 0 -+ USAGE_INDENT, RMARGIN - }; - - /* A particular uparam, and what the user name is. */ - struct uparam_name - { -- const char *name; /* User name. */ -- int is_bool; /* Whether it's 'boolean'. */ -- size_t uparams_offs; /* Location of the (int) field in UPARAMS. */ -+ const char name[14]; /* User name. */ -+ bool is_bool; /* Whether it's 'boolean'. */ -+ unsigned char uparams_offs; /* Location of the (int) field in UPARAMS. */ - }; - - /* The name-field mappings we know about. */ - static const struct uparam_name uparam_names[] = - { -- { "dup-args", 1, offsetof (struct uparams, dup_args) }, -- { "dup-args-note", 1, offsetof (struct uparams, dup_args_note) }, -- { "short-opt-col", 0, offsetof (struct uparams, short_opt_col) }, -- { "long-opt-col", 0, offsetof (struct uparams, long_opt_col) }, -- { "doc-opt-col", 0, offsetof (struct uparams, doc_opt_col) }, -- { "opt-doc-col", 0, offsetof (struct uparams, opt_doc_col) }, -- { "header-col", 0, offsetof (struct uparams, header_col) }, -- { "usage-indent", 0, offsetof (struct uparams, usage_indent) }, -- { "rmargin", 0, offsetof (struct uparams, rmargin) }, -- { 0 } -+ { "dup-args", true, offsetof (struct uparams, dup_args) }, -+ { "dup-args-note", true, offsetof (struct uparams, dup_args_note) }, -+ { "short-opt-col", false, offsetof (struct uparams, short_opt_col) }, -+ { "long-opt-col", false, offsetof (struct uparams, long_opt_col) }, -+ { "doc-opt-col", false, offsetof (struct uparams, doc_opt_col) }, -+ { "opt-doc-col", false, offsetof (struct uparams, opt_doc_col) }, -+ { "header-col", false, offsetof (struct uparams, header_col) }, -+ { "usage-indent", false, offsetof (struct uparams, usage_indent) }, -+ { "rmargin", false, offsetof (struct uparams, rmargin) } - }; -+#define nuparam_names (sizeof (uparam_names) / sizeof (uparam_names[0])) - - static void - validate_uparams (const struct argp_state *state, struct uparams *upptr) - { - const struct uparam_name *up; - -- for (up = uparam_names; up->name; up++) -+ for (up = uparam_names; up < uparam_names + nuparam_names; up++) - { - if (up->is_bool - || up->uparams_offs == offsetof (struct uparams, rmargin)) -@@ -155,7 +155,7 @@ - uparams.valid = 1; - } - --/* Read user options from the environment, and fill in UPARAMS appropriately. */ -+/* Read user options from the environment, and fill in UPARAMS appropriately. */ - static void - fill_in_uparams (const struct argp_state *state) - { -@@ -211,29 +211,27 @@ - SKIPWS (arg); - } - -- for (un = uparam_names; un->name; un++) -+ for (un = uparam_names; -+ un < uparam_names + nuparam_names; -+ un++) - if (strlen (un->name) == var_len - && strncmp (var, un->name, var_len) == 0) - { - if (unspec && !un->is_bool) - __argp_failure (state, 0, 0, -- dgettext (state->root_argp->argp_domain, -+ dgettext (state == NULL ? NULL -+ : state->root_argp->argp_domain, - "\ - %.*s: ARGP_HELP_FMT parameter requires a value"), - (int) var_len, var); -- else if (val < 0) -- __argp_failure (state, 0, 0, -- dgettext (state->root_argp->argp_domain, -- "\ --%.*s: ARGP_HELP_FMT parameter must be positive"), -- (int) var_len, var); - else - *(int *)((char *)&new_params + un->uparams_offs) = val; - break; - } -- if (! un->name) -+ if (un == uparam_names + nuparam_names) - __argp_failure (state, 0, 0, -- dgettext (state->root_argp->argp_domain, "\ -+ dgettext (state == NULL ? NULL -+ : state->root_argp->argp_domain, "\ - %.*s: Unknown ARGP_HELP_FMT parameter"), - (int) var_len, var); - -@@ -244,7 +242,8 @@ - else if (*var) - { - __argp_failure (state, 0, 0, -- dgettext (state->root_argp->argp_domain, -+ dgettext (state == NULL ? NULL -+ : state->root_argp->argp_domain, - "Garbage in ARGP_HELP_FMT: %s"), var); - break; - } -@@ -678,9 +677,7 @@ - hol_cluster_cmp (const struct hol_cluster *cl1, const struct hol_cluster *cl2) - { - /* If one cluster is deeper than the other, use its ancestor at the same -- level, so that finding the common ancestor is straightforward. -- -- clN->depth > 0 means that clN->parent != NULL (see hol_add_cluster) */ -+ level, so that finding the common ancestor is straightforward. */ - while (cl1->depth > cl2->depth) - cl1 = cl1->parent; - while (cl2->depth > cl1->depth) -@@ -721,20 +718,14 @@ - canon_doc_option (const char **name) - { - int non_opt; -- -- if (!*name) -- non_opt = 1; -- else -- { -- /* Skip initial whitespace. */ -- while (isspace ((unsigned char) **name)) -- (*name)++; -- /* Decide whether this looks like an option (leading '-') or not. */ -- non_opt = (**name != '-'); -- /* Skip until part of name used for sorting. */ -- while (**name && !isalnum ((unsigned char) **name)) -- (*name)++; -- } -+ /* Skip initial whitespace. */ -+ while (isspace (**name)) -+ (*name)++; -+ /* Decide whether this looks like an option (leading '-') or not. */ -+ non_opt = (**name != '-'); -+ /* Skip until part of name used for sorting. */ -+ while (**name && !isalnum (**name)) -+ (*name)++; - return non_opt; - } - -@@ -749,25 +740,23 @@ - /* The group numbers by which the entries should be ordered; if either is - in a cluster, then this is just the group within the cluster. */ - int group1 = entry1->group, group2 = entry2->group; -- int rc; - - if (entry1->cluster != entry2->cluster) - { - /* The entries are not within the same cluster, so we can't compare them - directly, we have to use the appropriate clustering level too. */ - if (! entry1->cluster) -- /* ENTRY1 is at the "base level", not in a cluster, so we have to -+ /* ENTRY1 is at the 'base level', not in a cluster, so we have to - compare it's group number with that of the base cluster in which - ENTRY2 resides. Note that if they're in the same group, the -- clustered option always comes laster. */ -+ clustered option always comes last. */ - return group_cmp (group1, hol_cluster_base (entry2->cluster)->group, -1); - else if (! entry2->cluster) - /* Likewise, but ENTRY2's not in a cluster. */ - return group_cmp (hol_cluster_base (entry1->cluster)->group, group2, 1); - else - /* Both entries are in clusters, we can just compare the clusters. */ -- return (rc = hol_cluster_cmp (entry1->cluster, entry2->cluster)) ? -- rc : HOL_ENTRY_PTRCMP (entry1, entry2); -+ return hol_cluster_cmp (entry1->cluster, entry2->cluster); - } - else if (group1 == group2) - /* The entries are both in the same cluster and group, so compare them -@@ -781,18 +770,17 @@ - const char *long2 = hol_entry_first_long (entry2); - - if (doc1) -- doc1 = canon_doc_option (&long1); -+ doc1 = long1 != NULL && canon_doc_option (&long1); - if (doc2) -- doc2 = canon_doc_option (&long2); -+ doc2 = long2 != NULL && canon_doc_option (&long2); - - if (doc1 != doc2) -- /* "documentation" options always follow normal options (or -+ /* 'documentation' options always follow normal options (or - documentation options that *look* like normal options). */ - return doc1 - doc2; - else if (!short1 && !short2 && long1 && long2) - /* Only long options. */ -- return (rc = __strcasecmp (long1, long2)) ? -- rc : HOL_ENTRY_PTRCMP (entry1, entry2); -+ return __strcasecmp (long1, long2); - else - /* Compare short/short, long/short, short/long, using the first - character of long options. Entries without *any* valid -@@ -800,22 +788,22 @@ - first, but as they're not displayed, it doesn't matter where - they are. */ - { -- unsigned char first1 = short1 ? short1 : long1 ? *long1 : 0; -- unsigned char first2 = short2 ? short2 : long2 ? *long2 : 0; -- /* Use tolower, not _tolower, since only the former is -- guaranteed to work on something already lower case. */ -+ char first1 = short1 ? short1 : long1 ? *long1 : 0; -+ char first2 = short2 ? short2 : long2 ? *long2 : 0; -+#ifdef _tolower -+ int lower_cmp = _tolower (first1) - _tolower (first2); -+#else - int lower_cmp = tolower (first1) - tolower (first2); -+#endif - /* Compare ignoring case, except when the options are both the - same letter, in which case lower-case always comes first. */ -- return lower_cmp ? lower_cmp : -- (rc = first2 - first1) ? -- rc : HOL_ENTRY_PTRCMP (entry1, entry2); -+ return lower_cmp ? lower_cmp : first2 - first1; - } - } - else - /* Within the same cluster, but not the same group, so just compare - groups. */ -- return group_cmp (group1, group2, HOL_ENTRY_PTRCMP (entry1, entry2)); -+ return group_cmp (group1, group2, 0); - } - - /* Version of hol_entry_cmp with correct signature for qsort. */ -@@ -892,8 +880,7 @@ - - /* Fix up the short options pointers from HOL. */ - for (e = entries, left = hol->num_entries; left > 0; e++, left--) -- e->short_options = -- short_options + (e->short_options - hol->short_options); -+ e->short_options += (short_options - hol->short_options); - - /* Now add the short options from MORE, fixing up its entries - too. */ -@@ -1013,7 +1000,7 @@ - filter_doc (const char *doc, int key, const struct argp *argp, - const struct argp_state *state) - { -- if (argp->help_filter) -+ if (argp && argp->help_filter) - /* We must apply a user filter to this output. */ - { - void *input = __argp_input (argp, state); -@@ -1109,13 +1096,7 @@ - int old_wm = __argp_fmtstream_wmargin (stream); - /* PEST is a state block holding some of our variables that we'd like to - share with helper functions. */ -- struct pentry_state pest; -- -- pest.entry = entry; -- pest.stream = stream; -- pest.hhstate = hhstate; -- pest.first = 1; -- pest.state = state; -+ struct pentry_state pest = { entry, stream, hhstate, 1, state }; - - if (! odoc (real)) - for (opt = real, num = entry->num; num > 0; opt++, num--) -@@ -1137,7 +1118,9 @@ - __argp_fmtstream_putc (stream, '-'); - __argp_fmtstream_putc (stream, *so); - if (!have_long_opt || uparams.dup_args) -- arg (real, " %s", "[%s]", state->root_argp->argp_domain, stream); -+ arg (real, " %s", "[%s]", -+ state == NULL ? NULL : state->root_argp->argp_domain, -+ stream); - else if (real->arg) - hhstate->suppressed_dup_arg = 1; - } -@@ -1150,35 +1133,29 @@ - { - __argp_fmtstream_set_wmargin (stream, uparams.doc_opt_col); - for (opt = real, num = entry->num; num > 0; opt++, num--) -- if (opt->name && *opt->name && ovisible (opt)) -+ if (opt->name && ovisible (opt)) - { - comma (uparams.doc_opt_col, &pest); - /* Calling dgettext here isn't quite right, since sorting will - have been done on the original; but documentation options - should be pretty rare anyway... */ - __argp_fmtstream_puts (stream, -- onotrans (opt) ? -- opt->name : -- dgettext (state->root_argp->argp_domain, -+ dgettext (state == NULL ? NULL -+ : state->root_argp->argp_domain, - opt->name)); - } - } - else - /* A real long option. */ - { -- int first_long_opt = 1; -- - __argp_fmtstream_set_wmargin (stream, uparams.long_opt_col); - for (opt = real, num = entry->num; num > 0; opt++, num--) - if (opt->name && ovisible (opt)) - { - comma (uparams.long_opt_col, &pest); - __argp_fmtstream_printf (stream, "--%s", opt->name); -- if (first_long_opt || uparams.dup_args) -- arg (real, "=%s", "[=%s]", state->root_argp->argp_domain, -- stream); -- else if (real->arg) -- hhstate->suppressed_dup_arg = 1; -+ arg (real, "=%s", "[=%s]", -+ state == NULL ? NULL : state->root_argp->argp_domain, stream); - } - } - -@@ -1197,7 +1174,8 @@ - } - else - { -- const char *tstr = real->doc ? dgettext (state->root_argp->argp_domain, -+ const char *tstr = real->doc ? dgettext (state == NULL ? NULL -+ : state->root_argp->argp_domain, - real->doc) : 0; - const char *fstr = filter_doc (tstr, real->key, entry->argp, state); - if (fstr && *fstr) -@@ -1245,7 +1223,8 @@ - - if (hhstate.suppressed_dup_arg && uparams.dup_args_note) - { -- const char *tstr = dgettext (state->root_argp->argp_domain, "\ -+ const char *tstr = dgettext (state == NULL ? NULL -+ : state->root_argp->argp_domain, "\ - Mandatory or optional arguments to long options are also mandatory or \ - optional for any corresponding short options."); - const char *fstr = filter_doc (tstr, ARGP_KEY_HELP_DUP_ARGS_NOTE, -@@ -1323,7 +1302,7 @@ - if (! arg) - arg = real->arg; - -- if (! (flags & OPTION_NO_USAGE) && !odoc (opt)) -+ if (! (flags & OPTION_NO_USAGE)) - { - if (arg) - { -@@ -1440,7 +1419,7 @@ - const char *cp = fdoc; - nl = __strchrnul (cp, '\n'); - if (*nl != '\0') -- /* This is a "multi-level" args doc; advance to the correct position -+ /* This is a 'multi-level' args doc; advance to the correct position - as determined by our state in LEVELS, and update LEVELS. */ - { - int i; -@@ -1494,55 +1473,46 @@ - { - const char *text; - const char *inp_text; -- size_t inp_text_len = 0; -- const char *trans_text; - void *input = 0; - int anything = 0; -+ size_t inp_text_limit = 0; -+ const char *doc = dgettext (argp->argp_domain, argp->doc); - const struct argp_child *child = argp->children; - -- if (argp->doc) -+ if (doc) - { -- char *vt = strchr (argp->doc, '\v'); -- if (vt) -- { -- if (post) -- { -- inp_text = vt + 1; -- if (! *inp_text) -- inp_text = 0; -- } -- else -- { -- inp_text_len = vt - argp->doc; -- inp_text = inp_text_len ? __strndup (argp->doc, inp_text_len) : 0; -- } -- } -- else -- inp_text = post ? 0 : argp->doc; -- trans_text = inp_text ? dgettext (argp->argp_domain, inp_text) : NULL; -+ char *vt = strchr (doc, '\v'); -+ inp_text = post ? (vt ? vt + 1 : 0) : doc; -+ inp_text_limit = (!post && vt) ? (vt - doc) : 0; - } - else -- trans_text = inp_text = 0; -+ inp_text = 0; - - if (argp->help_filter) - /* We have to filter the doc strings. */ - { -+ if (inp_text_limit) -+ /* Copy INP_TEXT so that it's nul-terminated. */ -+ inp_text = __strndup (inp_text, inp_text_limit); - input = __argp_input (argp, state); - text = - (*argp->help_filter) (post - ? ARGP_KEY_HELP_POST_DOC - : ARGP_KEY_HELP_PRE_DOC, -- trans_text, input); -+ inp_text, input); - } - else -- text = (const char *) trans_text; -+ text = (const char *) inp_text; - - if (text) - { - if (pre_blank) - __argp_fmtstream_putc (stream, '\n'); - -- __argp_fmtstream_puts (stream, text); -+ if (text == inp_text && inp_text_limit) -+ __argp_fmtstream_write (stream, inp_text, inp_text_limit); -+ else -+ __argp_fmtstream_puts (stream, text); - - if (__argp_fmtstream_point (stream) > __argp_fmtstream_lmargin (stream)) - __argp_fmtstream_putc (stream, '\n'); -@@ -1550,14 +1520,13 @@ - anything = 1; - } - -- if (text && text != trans_text) -+ if (text && text != inp_text) - free ((char *) text); /* Free TEXT returned from the help filter. */ -- -- if (inp_text && inp_text_len) -+ if (inp_text && inp_text_limit && argp->help_filter) - free ((char *) inp_text); /* We copied INP_TEXT, so free it now. */ - - if (post && argp->help_filter) -- /* Now see if we have to output an ARGP_KEY_HELP_EXTRA text. */ -+ /* Now see if we have to output a ARGP_KEY_HELP_EXTRA text. */ - { - text = (*argp->help_filter) (ARGP_KEY_HELP_EXTRA, 0, input); - if (text) -@@ -1584,8 +1553,8 @@ - } - - /* Output a usage message for ARGP to STREAM. If called from -- argp_state_help, STATE is the relevant parsing state. FLAGS are from the -- set ARGP_HELP_*. NAME is what to use wherever a "program name" is -+ argp_state_help, STATE is the relevent parsing state. FLAGS are from the -+ set ARGP_HELP_*. NAME is what to use wherever a 'program name' is - needed. */ - static void - _help (const struct argp *argp, const struct argp_state *state, FILE *stream, -@@ -1729,14 +1698,11 @@ - } - - /* Output a usage message for ARGP to STREAM. FLAGS are from the set -- ARGP_HELP_*. NAME is what to use wherever a "program name" is needed. */ -+ ARGP_HELP_*. NAME is what to use wherever a 'program name' is needed. */ - void __argp_help (const struct argp *argp, FILE *stream, - unsigned flags, char *name) - { -- struct argp_state state; -- memset (&state, 0, sizeof state); -- state.root_argp = argp; -- _help (argp, &state, stream, flags, name); -+ _help (argp, 0, stream, flags, name); - } - #ifdef weak_alias - weak_alias (__argp_help, argp_help) -@@ -1747,7 +1713,8 @@ - __argp_short_program_name (void) - { - # if HAVE_DECL_PROGRAM_INVOCATION_NAME -- return __argp_base_name (program_invocation_name); -+ char *name = strrchr (program_invocation_name, '/'); -+ return name ? name + 1 : program_invocation_name; - # else - /* FIXME: What now? Miles suggests that it is better to use NULL, - but currently the value is passed on directly to fputs_unlocked, -@@ -1806,33 +1773,26 @@ - - va_start (ap, fmt); - --#ifdef USE_IN_LIBIO -- if (_IO_fwide (stream, 0) > 0) -- { -- char *buf; -+#ifdef _LIBC -+ char *buf; - -- if (__asprintf (&buf, fmt, ap) < 0) -- buf = NULL; -+ if (_IO_vasprintf (&buf, fmt, ap) < 0) -+ buf = NULL; - -- __fwprintf (stream, L"%s: %s\n", -- state ? state->name : __argp_short_program_name (), -- buf); -+ __fxprintf (stream, "%s: %s\n", -+ state ? state->name : __argp_short_program_name (), buf); - -- free (buf); -- } -- else --#endif -- { -- fputs_unlocked (state -- ? state->name : __argp_short_program_name (), -- stream); -- putc_unlocked (':', stream); -- putc_unlocked (' ', stream); -+ free (buf); -+#else -+ fputs_unlocked (state ? state->name : __argp_short_program_name (), -+ stream); -+ putc_unlocked (':', stream); -+ putc_unlocked (' ', stream); - -- vfprintf (stream, fmt, ap); -+ vfprintf (stream, fmt, ap); - -- putc_unlocked ('\n', stream); -- } -+ putc_unlocked ('\n', stream); -+#endif - - __argp_state_help (state, stream, ARGP_HELP_STD_ERR); - -@@ -1870,41 +1830,34 @@ - __flockfile (stream); - #endif - --#ifdef USE_IN_LIBIO -- if (_IO_fwide (stream, 0) > 0) -- __fwprintf (stream, L"%s", -- state ? state->name : __argp_short_program_name ()); -- else -+#ifdef _LIBC -+ __fxprintf (stream, "%s", -+ state ? state->name : __argp_short_program_name ()); -+#else -+ fputs_unlocked (state ? state->name : __argp_short_program_name (), -+ stream); - #endif -- fputs_unlocked (state -- ? state->name : __argp_short_program_name (), -- stream); - - if (fmt) - { - va_list ap; - - va_start (ap, fmt); --#ifdef USE_IN_LIBIO -- if (_IO_fwide (stream, 0) > 0) -- { -- char *buf; -+#ifdef _LIBC -+ char *buf; - -- if (__asprintf (&buf, fmt, ap) < 0) -- buf = NULL; -+ if (_IO_vasprintf (&buf, fmt, ap) < 0) -+ buf = NULL; - -- __fwprintf (stream, L": %s", buf); -+ __fxprintf (stream, ": %s", buf); - -- free (buf); -- } -- else --#endif -- { -- putc_unlocked (':', stream); -- putc_unlocked (' ', stream); -+ free (buf); -+#else -+ putc_unlocked (':', stream); -+ putc_unlocked (' ', stream); - -- vfprintf (stream, fmt, ap); -- } -+ vfprintf (stream, fmt, ap); -+#endif - - va_end (ap); - } -@@ -1913,32 +1866,29 @@ - { - char buf[200]; - --#ifdef USE_IN_LIBIO -- if (_IO_fwide (stream, 0) > 0) -- __fwprintf (stream, L": %s", -- __strerror_r (errnum, buf, sizeof (buf))); -- else --#endif -- { -- char const *s = NULL; -- putc_unlocked (':', stream); -- putc_unlocked (' ', stream); --#if _LIBC || (HAVE_DECL_STRERROR_R && STRERROR_R_CHAR_P && !defined strerror_r) -- s = __strerror_r (errnum, buf, sizeof buf); --#elif HAVE_DECL_STRERROR_R -- if (__strerror_r (errnum, buf, sizeof buf) == 0) -- s = buf; --#endif --#if !_LIBC -- if (! s && ! (s = strerror (errnum))) -- s = dgettext (state->root_argp->argp_domain, -- "Unknown system error"); -+#ifdef _LIBC -+ __fxprintf (stream, ": %s", -+ __strerror_r (errnum, buf, sizeof (buf))); -+#else -+ char const *s = NULL; -+ putc_unlocked (':', stream); -+ putc_unlocked (' ', stream); -+# if GNULIB_STRERROR_R_POSIX || HAVE_DECL_STRERROR_R -+# if !GNULIB_STRERROR_R_POSIX && STRERROR_R_CHAR_P -+ s = __strerror_r (errnum, buf, sizeof buf); -+# else -+ if (__strerror_r (errnum, buf, sizeof buf) == 0) -+ s = buf; -+# endif -+# endif -+ if (! s && ! (s = strerror (errnum))) -+ s = dgettext (state->root_argp->argp_domain, -+ "Unknown system error"); -+ fputs_unlocked (s, stream); - #endif -- fputs (s, stream); -- } - } - --#ifdef USE_IN_LIBIO -+#if _LIBC - if (_IO_fwide (stream, 0) > 0) - putwc_unlocked (L'\n', stream); - else -diff -durN inetutils-1.9.4.orig/lib/argp-namefrob.h inetutils-1.9.4/lib/argp-namefrob.h ---- inetutils-1.9.4.orig/lib/argp-namefrob.h 2015-05-12 20:14:19.000000000 +0800 -+++ inetutils-1.9.4/lib/argp-namefrob.h 2017-05-15 17:50:59.500000000 +0800 -@@ -1,5 +1,5 @@ - /* Name frobnication for compiling argp outside of glibc -- Copyright (C) 1997, 2003, 2007, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 1997-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Written by Miles Bader . - -@@ -138,7 +138,7 @@ - #endif /* !_LIBC */ - - #ifndef __set_errno --# define __set_errno(e) (errno = (e)) -+#define __set_errno(e) (errno = (e)) - #endif - - #if defined GNULIB_ARGP_DISABLE_DIRNAME -diff -durN inetutils-1.9.4.orig/lib/argp-parse.c inetutils-1.9.4/lib/argp-parse.c ---- inetutils-1.9.4.orig/lib/argp-parse.c 2015-05-12 20:14:19.000000000 +0800 -+++ inetutils-1.9.4/lib/argp-parse.c 2017-05-15 17:50:59.640625000 +0800 -@@ -1,5 +1,5 @@ - /* Hierarchical argument parsing, layered over getopt -- Copyright (C) 1995-2000, 2002-2004, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 1995-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Written by Miles Bader . - -@@ -34,7 +34,7 @@ - # include - # undef dgettext - # define dgettext(domain, msgid) \ -- INTUSE(__dcgettext) (domain, msgid, LC_MESSAGES) -+ __dcgettext (domain, msgid, LC_MESSAGES) - #else - # include "gettext.h" - #endif -@@ -80,9 +80,10 @@ - { - {"help", '?', 0, 0, N_("give this help list"), -1}, - {"usage", OPT_USAGE, 0, 0, N_("give a short usage message"), 0}, -- {"program-name",OPT_PROGNAME,N_("NAME"), OPTION_HIDDEN, N_("set the program name"), 0}, -+ {"program-name",OPT_PROGNAME, N_("NAME"), OPTION_HIDDEN, -+ N_("set the program name"), 0}, - {"HANG", OPT_HANG, N_("SECS"), OPTION_ARG_OPTIONAL | OPTION_HIDDEN, -- N_("hang for SECS seconds (default 3600)"), 0}, -+ N_("hang for SECS seconds (default 3600)"), 0}, - {NULL, 0, 0, 0, NULL, 0} - }; - -diff -durN inetutils-1.9.4.orig/lib/argp-pin.c inetutils-1.9.4/lib/argp-pin.c ---- inetutils-1.9.4.orig/lib/argp-pin.c 2015-05-12 20:14:19.000000000 +0800 -+++ inetutils-1.9.4/lib/argp-pin.c 2017-05-15 17:50:59.828125000 +0800 -@@ -1,5 +1,5 @@ - /* Full and short program names for argp module -- Copyright (C) 2005, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2005, 2009-2017 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 -@@ -24,3 +24,10 @@ - #ifndef HAVE_PROGRAM_INVOCATION_NAME - char *program_invocation_name = 0; - #endif -+ -+#if (defined HAVE_PROGRAM_INVOCATION_SHORT_NAME \ -+ && defined HAVE_PROGRAM_INVOCATION_NAME) -+/* This declaration is solely to ensure that after preprocessing -+ this file is never empty. */ -+typedef int dummy; -+#endif -diff -durN inetutils-1.9.4.orig/lib/argp-pv.c inetutils-1.9.4/lib/argp-pv.c ---- inetutils-1.9.4.orig/lib/argp-pv.c 2015-03-31 15:08:14.000000000 +0800 -+++ inetutils-1.9.4/lib/argp-pv.c 2017-05-15 17:51:00.000000000 +0800 -@@ -1,6 +1,5 @@ - /* Default definition for ARGP_PROGRAM_VERSION. -- Copyright (C) 1996-1997, 1999, 2006, 2009-2015 Free Software Foundation, -- Inc. -+ Copyright (C) 1996-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Written by Miles Bader . - -diff -durN inetutils-1.9.4.orig/lib/argp-pvh.c inetutils-1.9.4/lib/argp-pvh.c ---- inetutils-1.9.4.orig/lib/argp-pvh.c 2015-05-12 20:14:19.000000000 +0800 -+++ inetutils-1.9.4/lib/argp-pvh.c 2017-05-15 17:51:00.171875000 +0800 -@@ -1,6 +1,5 @@ - /* Default definition for ARGP_PROGRAM_VERSION_HOOK. -- Copyright (C) 1996-1997, 1999, 2004, 2009-2015 Free Software Foundation, -- Inc. -+ Copyright (C) 1996-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Written by Miles Bader . - -diff -durN inetutils-1.9.4.orig/lib/argp-version-etc.c inetutils-1.9.4/lib/argp-version-etc.c ---- inetutils-1.9.4.orig/lib/argp-version-etc.c 2015-05-12 20:14:19.000000000 +0800 -+++ inetutils-1.9.4/lib/argp-version-etc.c 2017-05-15 17:51:00.359375000 +0800 -@@ -1,5 +1,5 @@ - /* Version hook for Argp. -- Copyright (C) 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/argp-version-etc.h inetutils-1.9.4/lib/argp-version-etc.h ---- inetutils-1.9.4.orig/lib/argp-version-etc.h 2015-05-12 20:14:19.000000000 +0800 -+++ inetutils-1.9.4/lib/argp-version-etc.h 2017-05-15 17:51:00.500000000 +0800 -@@ -1,5 +1,5 @@ - /* Version hook for Argp. -- Copyright (C) 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/argp-xinl.c inetutils-1.9.4/lib/argp-xinl.c ---- inetutils-1.9.4.orig/lib/argp-xinl.c 2015-05-12 20:14:19.000000000 +0800 -+++ inetutils-1.9.4/lib/argp-xinl.c 2017-05-15 17:51:00.671875000 +0800 -@@ -1,5 +1,5 @@ - /* Real definitions for extern inline functions in argp.h -- Copyright (C) 1997-1998, 2004, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 1997-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Written by Miles Bader . - -diff -durN inetutils-1.9.4.orig/lib/arpa_inet.in.h inetutils-1.9.4/lib/arpa_inet.in.h ---- inetutils-1.9.4.orig/lib/arpa_inet.in.h 2015-05-12 20:14:19.000000000 +0800 -+++ inetutils-1.9.4/lib/arpa_inet.in.h 2017-05-15 17:51:00.953125000 +0800 -@@ -1,6 +1,6 @@ - /* A GNU-like . - -- Copyright (C) 2005-2006, 2008-2015 Free Software Foundation, Inc. -+ Copyright (C) 2005-2006, 2008-2017 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 -diff -durN inetutils-1.9.4.orig/lib/asnprintf.c inetutils-1.9.4/lib/asnprintf.c ---- inetutils-1.9.4.orig/lib/asnprintf.c 2015-03-31 23:31:19.000000000 +0800 -+++ inetutils-1.9.4/lib/asnprintf.c 2017-05-15 17:51:01.093750000 +0800 -@@ -1,5 +1,5 @@ - /* Formatted output to strings. -- Copyright (C) 1999, 2002, 2006, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 1999, 2002, 2006, 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/asprintf.c inetutils-1.9.4/lib/asprintf.c ---- inetutils-1.9.4.orig/lib/asprintf.c 2015-05-12 20:14:19.000000000 +0800 -+++ inetutils-1.9.4/lib/asprintf.c 2017-05-15 17:51:01.250000000 +0800 -@@ -1,5 +1,5 @@ - /* Formatted output to strings. -- Copyright (C) 1999, 2002, 2006-2007, 2009-2015 Free Software Foundation, -+ Copyright (C) 1999, 2002, 2006-2007, 2009-2017 Free Software Foundation, - Inc. - - This program is free software; you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/assure.h inetutils-1.9.4/lib/assure.h ---- inetutils-1.9.4.orig/lib/assure.h 2015-05-12 20:14:19.000000000 +0800 -+++ inetutils-1.9.4/lib/assure.h 2017-05-15 17:51:01.453125000 +0800 -@@ -1,6 +1,6 @@ - /* Run-time assert-like macros. - -- Copyright (C) 2014-2015 Free Software Foundation, Inc. -+ Copyright (C) 2014-2017 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 -diff -durN inetutils-1.9.4.orig/lib/at-func.c inetutils-1.9.4/lib/at-func.c ---- inetutils-1.9.4.orig/lib/at-func.c 2015-05-12 20:14:19.000000000 +0800 -+++ inetutils-1.9.4/lib/at-func.c 2017-05-15 17:51:01.640625000 +0800 -@@ -1,5 +1,5 @@ - /* Define at-style functions like fstatat, unlinkat, fchownat, etc. -- Copyright (C) 2006, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2006, 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/basename-lgpl.c inetutils-1.9.4/lib/basename-lgpl.c ---- inetutils-1.9.4.orig/lib/basename-lgpl.c 2015-05-12 20:14:19.000000000 +0800 -+++ inetutils-1.9.4/lib/basename-lgpl.c 2017-05-15 17:51:01.781250000 +0800 -@@ -1,6 +1,6 @@ - /* basename.c -- return the last element in a file name - -- Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2015 Free Software -+ Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2017 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/btowc.c inetutils-1.9.4/lib/btowc.c ---- inetutils-1.9.4.orig/lib/btowc.c 2015-05-12 20:14:19.000000000 +0800 -+++ inetutils-1.9.4/lib/btowc.c 2017-05-15 17:51:01.953125000 +0800 -@@ -1,5 +1,5 @@ - /* Convert unibyte character to wide character. -- Copyright (C) 2008, 2010-2015 Free Software Foundation, Inc. -+ Copyright (C) 2008, 2010-2017 Free Software Foundation, Inc. - Written by Bruno Haible , 2008. - - This program is free software: you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/c++defs.h inetutils-1.9.4/lib/c++defs.h ---- inetutils-1.9.4.orig/lib/c++defs.h 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/lib/c++defs.h 2017-05-15 17:51:02.109375000 +0800 -@@ -0,0 +1,316 @@ -+/* C++ compatible function declaration macros. -+ Copyright (C) 2010-2017 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 the Free Software Foundation; either version 3 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, see . */ -+ -+#ifndef _GL_CXXDEFS_H -+#define _GL_CXXDEFS_H -+ -+/* Begin/end the GNULIB_NAMESPACE namespace. */ -+#if defined __cplusplus && defined GNULIB_NAMESPACE -+# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { -+# define _GL_END_NAMESPACE } -+#else -+# define _GL_BEGIN_NAMESPACE -+# define _GL_END_NAMESPACE -+#endif -+ -+/* The three most frequent use cases of these macros are: -+ -+ * For providing a substitute for a function that is missing on some -+ platforms, but is declared and works fine on the platforms on which -+ it exists: -+ -+ #if @GNULIB_FOO@ -+ # if !@HAVE_FOO@ -+ _GL_FUNCDECL_SYS (foo, ...); -+ # endif -+ _GL_CXXALIAS_SYS (foo, ...); -+ _GL_CXXALIASWARN (foo); -+ #elif defined GNULIB_POSIXCHECK -+ ... -+ #endif -+ -+ * For providing a replacement for a function that exists on all platforms, -+ but is broken/insufficient and needs to be replaced on some platforms: -+ -+ #if @GNULIB_FOO@ -+ # if @REPLACE_FOO@ -+ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) -+ # undef foo -+ # define foo rpl_foo -+ # endif -+ _GL_FUNCDECL_RPL (foo, ...); -+ _GL_CXXALIAS_RPL (foo, ...); -+ # else -+ _GL_CXXALIAS_SYS (foo, ...); -+ # endif -+ _GL_CXXALIASWARN (foo); -+ #elif defined GNULIB_POSIXCHECK -+ ... -+ #endif -+ -+ * For providing a replacement for a function that exists on some platforms -+ but is broken/insufficient and needs to be replaced on some of them and -+ is additionally either missing or undeclared on some other platforms: -+ -+ #if @GNULIB_FOO@ -+ # if @REPLACE_FOO@ -+ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) -+ # undef foo -+ # define foo rpl_foo -+ # endif -+ _GL_FUNCDECL_RPL (foo, ...); -+ _GL_CXXALIAS_RPL (foo, ...); -+ # else -+ # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ -+ _GL_FUNCDECL_SYS (foo, ...); -+ # endif -+ _GL_CXXALIAS_SYS (foo, ...); -+ # endif -+ _GL_CXXALIASWARN (foo); -+ #elif defined GNULIB_POSIXCHECK -+ ... -+ #endif -+*/ -+ -+/* _GL_EXTERN_C declaration; -+ performs the declaration with C linkage. */ -+#if defined __cplusplus -+# define _GL_EXTERN_C extern "C" -+#else -+# define _GL_EXTERN_C extern -+#endif -+ -+/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); -+ declares a replacement function, named rpl_func, with the given prototype, -+ consisting of return type, parameters, and attributes. -+ Example: -+ _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) -+ _GL_ARG_NONNULL ((1))); -+ */ -+#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ -+ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) -+#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ -+ _GL_EXTERN_C rettype rpl_func parameters_and_attributes -+ -+/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); -+ declares the system function, named func, with the given prototype, -+ consisting of return type, parameters, and attributes. -+ Example: -+ _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) -+ _GL_ARG_NONNULL ((1))); -+ */ -+#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ -+ _GL_EXTERN_C rettype func parameters_and_attributes -+ -+/* _GL_CXXALIAS_RPL (func, rettype, parameters); -+ declares a C++ alias called GNULIB_NAMESPACE::func -+ that redirects to rpl_func, if GNULIB_NAMESPACE is defined. -+ Example: -+ _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); -+ -+ Wrapping rpl_func in an object with an inline conversion operator -+ avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is -+ actually used in the program. */ -+#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ -+ _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) -+#if defined __cplusplus && defined GNULIB_NAMESPACE -+# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ -+ namespace GNULIB_NAMESPACE \ -+ { \ -+ static const struct _gl_ ## func ## _wrapper \ -+ { \ -+ typedef rettype (*type) parameters; \ -+ \ -+ inline operator type () const \ -+ { \ -+ return ::rpl_func; \ -+ } \ -+ } func = {}; \ -+ } \ -+ _GL_EXTERN_C int _gl_cxxalias_dummy -+#else -+# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ -+ _GL_EXTERN_C int _gl_cxxalias_dummy -+#endif -+ -+/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); -+ is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); -+ except that the C function rpl_func may have a slightly different -+ declaration. A cast is used to silence the "invalid conversion" error -+ that would otherwise occur. */ -+#if defined __cplusplus && defined GNULIB_NAMESPACE -+# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ -+ namespace GNULIB_NAMESPACE \ -+ { \ -+ static const struct _gl_ ## func ## _wrapper \ -+ { \ -+ typedef rettype (*type) parameters; \ -+ \ -+ inline operator type () const \ -+ { \ -+ return reinterpret_cast(::rpl_func); \ -+ } \ -+ } func = {}; \ -+ } \ -+ _GL_EXTERN_C int _gl_cxxalias_dummy -+#else -+# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ -+ _GL_EXTERN_C int _gl_cxxalias_dummy -+#endif -+ -+/* _GL_CXXALIAS_SYS (func, rettype, parameters); -+ declares a C++ alias called GNULIB_NAMESPACE::func -+ that redirects to the system provided function func, if GNULIB_NAMESPACE -+ is defined. -+ Example: -+ _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); -+ -+ Wrapping func in an object with an inline conversion operator -+ avoids a reference to func unless GNULIB_NAMESPACE::func is -+ actually used in the program. */ -+#if defined __cplusplus && defined GNULIB_NAMESPACE -+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ -+ namespace GNULIB_NAMESPACE \ -+ { \ -+ static const struct _gl_ ## func ## _wrapper \ -+ { \ -+ typedef rettype (*type) parameters; \ -+ \ -+ inline operator type () const \ -+ { \ -+ return ::func; \ -+ } \ -+ } func = {}; \ -+ } \ -+ _GL_EXTERN_C int _gl_cxxalias_dummy -+#else -+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ -+ _GL_EXTERN_C int _gl_cxxalias_dummy -+#endif -+ -+/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); -+ is like _GL_CXXALIAS_SYS (func, rettype, parameters); -+ except that the C function func may have a slightly different declaration. -+ A cast is used to silence the "invalid conversion" error that would -+ otherwise occur. */ -+#if defined __cplusplus && defined GNULIB_NAMESPACE -+# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ -+ namespace GNULIB_NAMESPACE \ -+ { \ -+ static const struct _gl_ ## func ## _wrapper \ -+ { \ -+ typedef rettype (*type) parameters; \ -+ \ -+ inline operator type () const \ -+ { \ -+ return reinterpret_cast(::func); \ -+ } \ -+ } func = {}; \ -+ } \ -+ _GL_EXTERN_C int _gl_cxxalias_dummy -+#else -+# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ -+ _GL_EXTERN_C int _gl_cxxalias_dummy -+#endif -+ -+/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); -+ is like _GL_CXXALIAS_SYS (func, rettype, parameters); -+ except that the C function is picked among a set of overloaded functions, -+ namely the one with rettype2 and parameters2. Two consecutive casts -+ are used to silence the "cannot find a match" and "invalid conversion" -+ errors that would otherwise occur. */ -+#if defined __cplusplus && defined GNULIB_NAMESPACE -+ /* The outer cast must be a reinterpret_cast. -+ The inner cast: When the function is defined as a set of overloaded -+ functions, it works as a static_cast<>, choosing the designated variant. -+ When the function is defined as a single variant, it works as a -+ reinterpret_cast<>. The parenthesized cast syntax works both ways. */ -+# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ -+ namespace GNULIB_NAMESPACE \ -+ { \ -+ static const struct _gl_ ## func ## _wrapper \ -+ { \ -+ typedef rettype (*type) parameters; \ -+ \ -+ inline operator type () const \ -+ { \ -+ return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ -+ } \ -+ } func = {}; \ -+ } \ -+ _GL_EXTERN_C int _gl_cxxalias_dummy -+#else -+# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ -+ _GL_EXTERN_C int _gl_cxxalias_dummy -+#endif -+ -+/* _GL_CXXALIASWARN (func); -+ causes a warning to be emitted when ::func is used but not when -+ GNULIB_NAMESPACE::func is used. func must be defined without overloaded -+ variants. */ -+#if defined __cplusplus && defined GNULIB_NAMESPACE -+# define _GL_CXXALIASWARN(func) \ -+ _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) -+# define _GL_CXXALIASWARN_1(func,namespace) \ -+ _GL_CXXALIASWARN_2 (func, namespace) -+/* To work around GCC bug , -+ we enable the warning only when not optimizing. */ -+# if !__OPTIMIZE__ -+# define _GL_CXXALIASWARN_2(func,namespace) \ -+ _GL_WARN_ON_USE (func, \ -+ "The symbol ::" #func " refers to the system function. " \ -+ "Use " #namespace "::" #func " instead.") -+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -+# define _GL_CXXALIASWARN_2(func,namespace) \ -+ extern __typeof__ (func) func -+# else -+# define _GL_CXXALIASWARN_2(func,namespace) \ -+ _GL_EXTERN_C int _gl_cxxalias_dummy -+# endif -+#else -+# define _GL_CXXALIASWARN(func) \ -+ _GL_EXTERN_C int _gl_cxxalias_dummy -+#endif -+ -+/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); -+ causes a warning to be emitted when the given overloaded variant of ::func -+ is used but not when GNULIB_NAMESPACE::func is used. */ -+#if defined __cplusplus && defined GNULIB_NAMESPACE -+# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ -+ _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ -+ GNULIB_NAMESPACE) -+# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ -+ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) -+/* To work around GCC bug , -+ we enable the warning only when not optimizing. */ -+# if !__OPTIMIZE__ -+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ -+ _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ -+ "The symbol ::" #func " refers to the system function. " \ -+ "Use " #namespace "::" #func " instead.") -+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ -+ extern __typeof__ (func) func -+# else -+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ -+ _GL_EXTERN_C int _gl_cxxalias_dummy -+# endif -+#else -+# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ -+ _GL_EXTERN_C int _gl_cxxalias_dummy -+#endif -+ -+#endif /* _GL_CXXDEFS_H */ -diff -durN inetutils-1.9.4.orig/lib/chdir-long.c inetutils-1.9.4/lib/chdir-long.c ---- inetutils-1.9.4.orig/lib/chdir-long.c 2015-05-12 20:14:19.000000000 +0800 -+++ inetutils-1.9.4/lib/chdir-long.c 2017-05-15 17:51:02.265625000 +0800 -@@ -1,5 +1,5 @@ - /* provide a chdir function that tries not to fail due to ENAMETOOLONG -- Copyright (C) 2004-2015 Free Software Foundation, Inc. -+ Copyright (C) 2004-2017 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 -@@ -212,8 +212,6 @@ - # include "closeout.h" - # include "error.h" - --char *program_name; -- - int - main (int argc, char *argv[]) - { -@@ -221,7 +219,6 @@ - size_t n = 0; - int len; - -- program_name = argv[0]; - atexit (close_stdout); - - len = getline (&line, &n, stdin); -diff -durN inetutils-1.9.4.orig/lib/chdir-long.h inetutils-1.9.4/lib/chdir-long.h ---- inetutils-1.9.4.orig/lib/chdir-long.h 2015-05-12 20:14:19.000000000 +0800 -+++ inetutils-1.9.4/lib/chdir-long.h 2017-05-15 17:51:02.390625000 +0800 -@@ -1,5 +1,5 @@ - /* provide a chdir function that tries not to fail due to ENAMETOOLONG -- Copyright (C) 2004-2005, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2004-2005, 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/cloexec.c inetutils-1.9.4/lib/cloexec.c ---- inetutils-1.9.4.orig/lib/cloexec.c 2015-05-12 20:14:19.000000000 +0800 -+++ inetutils-1.9.4/lib/cloexec.c 2017-05-15 17:51:02.546875000 +0800 -@@ -1,6 +1,6 @@ - /* closexec.c - set or clear the close-on-exec descriptor flag - -- Copyright (C) 1991, 2004-2006, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 1991, 2004-2006, 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/cloexec.h inetutils-1.9.4/lib/cloexec.h ---- inetutils-1.9.4.orig/lib/cloexec.h 2015-03-31 15:08:14.000000000 +0800 -+++ inetutils-1.9.4/lib/cloexec.h 2017-05-15 17:51:02.703125000 +0800 -@@ -1,6 +1,6 @@ - /* closexec.c - set or clear the close-on-exec descriptor flag - -- Copyright (C) 2004, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2004, 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/close.c inetutils-1.9.4/lib/close.c ---- inetutils-1.9.4.orig/lib/close.c 2015-05-12 20:14:19.000000000 +0800 -+++ inetutils-1.9.4/lib/close.c 2017-05-15 17:51:02.890625000 +0800 -@@ -1,5 +1,5 @@ - /* close replacement. -- Copyright (C) 2008-2015 Free Software Foundation, Inc. -+ Copyright (C) 2008-2017 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 -@@ -22,7 +22,9 @@ - #include - - #include "fd-hook.h" --#include "msvc-inval.h" -+#if HAVE_MSVC_INVALID_PARAMETER_HANDLER -+# include "msvc-inval.h" -+#endif - - #undef close - -diff -durN inetutils-1.9.4.orig/lib/closedir.c inetutils-1.9.4/lib/closedir.c ---- inetutils-1.9.4.orig/lib/closedir.c 2015-05-12 20:14:19.000000000 +0800 -+++ inetutils-1.9.4/lib/closedir.c 2017-05-15 17:51:03.046875000 +0800 -@@ -1,5 +1,5 @@ - /* Stop reading the entries of a directory. -- Copyright (C) 2006-2015 Free Software Foundation, Inc. -+ Copyright (C) 2006-2017 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 -@@ -39,7 +39,7 @@ - int - closedir (DIR *dirp) - { --# if REPLACE_FCHDIR -+# if REPLACE_FCHDIR || REPLACE_DIRFD - int fd = dirfd (dirp); - # endif - int retval; -@@ -49,6 +49,10 @@ - - retval = closedir (dirp); - -+# ifdef __KLIBC__ -+ if (!retval) -+ _gl_unregister_dirp_fd (fd); -+# endif - #else - - if (dirp->current != INVALID_HANDLE_VALUE) -diff -durN inetutils-1.9.4.orig/lib/config.charset inetutils-1.9.4/lib/config.charset ---- inetutils-1.9.4.orig/lib/config.charset 2015-03-31 15:08:15.000000000 +0800 -+++ inetutils-1.9.4/lib/config.charset 2017-05-15 17:51:03.187500000 +0800 -@@ -1,7 +1,7 @@ - #! /bin/sh - # Output a system dependent table of character encoding aliases. - # --# Copyright (C) 2000-2004, 2006-2015 Free Software Foundation, Inc. -+# Copyright (C) 2000-2004, 2006-2017 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 -diff -durN inetutils-1.9.4.orig/lib/dirent.in.h inetutils-1.9.4/lib/dirent.in.h ---- inetutils-1.9.4.orig/lib/dirent.in.h 2015-05-12 20:14:19.000000000 +0800 -+++ inetutils-1.9.4/lib/dirent.in.h 2017-05-15 17:51:03.562500000 +0800 -@@ -1,5 +1,5 @@ - /* A GNU-like . -- Copyright (C) 2006-2015 Free Software Foundation, Inc. -+ Copyright (C) 2006-2017 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 -@@ -158,6 +158,13 @@ - # endif - _GL_FUNCDECL_RPL (dirfd, int, (DIR *) _GL_ARG_NONNULL ((1))); - _GL_CXXALIAS_RPL (dirfd, int, (DIR *)); -+ -+# ifdef __KLIBC__ -+/* Gnulib internal hooks needed to maintain the dirfd metadata. */ -+_GL_EXTERN_C int _gl_register_dirp_fd (int fd, DIR *dirp) -+ _GL_ARG_NONNULL ((2)); -+_GL_EXTERN_C void _gl_unregister_dirp_fd (int fd); -+# endif - # else - # if defined __cplusplus && defined GNULIB_NAMESPACE && defined dirfd - /* dirfd is defined as a macro and not as a function. -diff -durN inetutils-1.9.4.orig/lib/dirent-private.h inetutils-1.9.4/lib/dirent-private.h ---- inetutils-1.9.4.orig/lib/dirent-private.h 2015-03-31 15:08:15.000000000 +0800 -+++ inetutils-1.9.4/lib/dirent-private.h 2017-05-15 17:51:03.328125000 +0800 -@@ -1,5 +1,5 @@ - /* Private details of the DIR type. -- Copyright (C) 2011-2015 Free Software Foundation, Inc. -+ Copyright (C) 2011-2017 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 -diff -durN inetutils-1.9.4.orig/lib/dirfd.c inetutils-1.9.4/lib/dirfd.c ---- inetutils-1.9.4.orig/lib/dirfd.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/dirfd.c 2017-05-15 17:51:03.750000000 +0800 -@@ -1,6 +1,6 @@ - /* dirfd.c -- return the file descriptor associated with an open DIR* - -- Copyright (C) 2001, 2006, 2008-2015 Free Software Foundation, Inc. -+ Copyright (C) 2001, 2006, 2008-2017 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 -@@ -22,11 +22,77 @@ - #include - #include - -+#ifdef __KLIBC__ -+# include -+# include -+ -+static struct dirp_fd_list -+{ -+ DIR *dirp; -+ int fd; -+ struct dirp_fd_list *next; -+} *dirp_fd_start = NULL; -+ -+/* Register fd associated with dirp to dirp_fd_list. */ -+int -+_gl_register_dirp_fd (int fd, DIR *dirp) -+{ -+ struct dirp_fd_list *new_dirp_fd = malloc (sizeof *new_dirp_fd); -+ if (!new_dirp_fd) -+ return -1; -+ -+ new_dirp_fd->dirp = dirp; -+ new_dirp_fd->fd = fd; -+ new_dirp_fd->next = dirp_fd_start; -+ -+ dirp_fd_start = new_dirp_fd; -+ -+ return 0; -+} -+ -+/* Unregister fd from dirp_fd_list with closing it */ -+void -+_gl_unregister_dirp_fd (int fd) -+{ -+ struct dirp_fd_list *dirp_fd; -+ struct dirp_fd_list *dirp_fd_prev; -+ -+ for (dirp_fd_prev = NULL, dirp_fd = dirp_fd_start; dirp_fd; -+ dirp_fd_prev = dirp_fd, dirp_fd = dirp_fd->next) -+ { -+ if (dirp_fd->fd == fd) -+ { -+ if (dirp_fd_prev) -+ dirp_fd_prev->next = dirp_fd->next; -+ else /* dirp_fd == dirp_fd_start */ -+ dirp_fd_start = dirp_fd_start->next; -+ -+ close (fd); -+ free (dirp_fd); -+ break; -+ } -+ } -+} -+#endif -+ - int - dirfd (DIR *dir_p) - { - int fd = DIR_TO_FD (dir_p); - if (fd == -1) -+#ifndef __KLIBC__ - errno = ENOTSUP; -+#else -+ { -+ struct dirp_fd_list *dirp_fd; -+ -+ for (dirp_fd = dirp_fd_start; dirp_fd; dirp_fd = dirp_fd->next) -+ if (dirp_fd->dirp == dir_p) -+ return dirp_fd->fd; -+ -+ errno = EINVAL; -+ } -+#endif -+ - return fd; - } -diff -durN inetutils-1.9.4.orig/lib/dirname.h inetutils-1.9.4/lib/dirname.h ---- inetutils-1.9.4.orig/lib/dirname.h 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/dirname.h 2017-05-15 17:51:04.093750000 +0800 -@@ -1,6 +1,6 @@ - /* Take file names apart into directory and base names. - -- Copyright (C) 1998, 2001, 2003-2006, 2009-2015 Free Software Foundation, -+ Copyright (C) 1998, 2001, 2003-2006, 2009-2017 Free Software Foundation, - Inc. - - This program is free software: you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/dirname-lgpl.c inetutils-1.9.4/lib/dirname-lgpl.c ---- inetutils-1.9.4.orig/lib/dirname-lgpl.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/dirname-lgpl.c 2017-05-15 17:51:03.906250000 +0800 -@@ -1,6 +1,6 @@ - /* dirname.c -- return all but the last element in a file name - -- Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2015 Free Software -+ Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2017 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/dosname.h inetutils-1.9.4/lib/dosname.h ---- inetutils-1.9.4.orig/lib/dosname.h 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/dosname.h 2017-05-15 17:51:04.265625000 +0800 -@@ -1,6 +1,6 @@ - /* File names on MS-DOS/Windows systems. - -- Copyright (C) 2000-2001, 2004-2006, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2000-2001, 2004-2006, 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/dup.c inetutils-1.9.4/lib/dup.c ---- inetutils-1.9.4.orig/lib/dup.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/dup.c 2017-05-15 17:51:04.593750000 +0800 -@@ -1,6 +1,6 @@ - /* Duplicate an open file descriptor. - -- Copyright (C) 2011-2015 Free Software Foundation, Inc. -+ Copyright (C) 2011-2017 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 -@@ -22,7 +22,9 @@ - - #include - --#include "msvc-inval.h" -+#if HAVE_MSVC_INVALID_PARAMETER_HANDLER -+# include "msvc-inval.h" -+#endif - - #undef dup - -@@ -45,6 +47,31 @@ - - return result; - } -+#elif defined __KLIBC__ -+# include -+# include -+ -+# include -+ -+static int -+dup_nothrow (int fd) -+{ -+ int dupfd; -+ struct stat sbuf; -+ -+ dupfd = dup (fd); -+ if (dupfd == -1 && errno == ENOTSUP \ -+ && !fstat (fd, &sbuf) && S_ISDIR (sbuf.st_mode)) -+ { -+ char path[_MAX_PATH]; -+ -+ /* Get a path from fd */ -+ if (!__libc_Back_ioFHToPath (fd, path, sizeof (path))) -+ dupfd = open (path, O_RDONLY); -+ } -+ -+ return dupfd; -+} - #else - # define dup_nothrow dup - #endif -diff -durN inetutils-1.9.4.orig/lib/dup2.c inetutils-1.9.4/lib/dup2.c ---- inetutils-1.9.4.orig/lib/dup2.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/dup2.c 2017-05-15 17:51:04.750000000 +0800 -@@ -1,6 +1,6 @@ - /* Duplicate an open file descriptor to a specified file descriptor. - -- Copyright (C) 1999, 2004-2007, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 1999, 2004-2007, 2009-2017 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 -@@ -35,10 +35,39 @@ - # define WIN32_LEAN_AND_MEAN - # include - --# include "msvc-inval.h" -+# if HAVE_MSVC_INVALID_PARAMETER_HANDLER -+# include "msvc-inval.h" -+# endif - - /* Get _get_osfhandle. */ --# include "msvc-nothrow.h" -+# if GNULIB_MSVC_NOTHROW -+# include "msvc-nothrow.h" -+# else -+# include -+# endif -+ -+# if HAVE_MSVC_INVALID_PARAMETER_HANDLER -+static int -+dup2_nothrow (int fd, int desired_fd) -+{ -+ int result; -+ -+ TRY_MSVC_INVAL -+ { -+ result = dup2 (fd, desired_fd); -+ } -+ CATCH_MSVC_INVAL -+ { -+ errno = EBADF; -+ result = -1; -+ } -+ DONE_MSVC_INVAL; -+ -+ return result; -+} -+# else -+# define dup2_nothrow dup2 -+# endif - - static int - ms_windows_dup2 (int fd, int desired_fd) -@@ -66,16 +95,7 @@ - return -1; - } - -- TRY_MSVC_INVAL -- { -- result = dup2 (fd, desired_fd); -- } -- CATCH_MSVC_INVAL -- { -- errno = EBADF; -- result = -1; -- } -- DONE_MSVC_INVAL; -+ result = dup2_nothrow (fd, desired_fd); - - if (result == 0) - result = desired_fd; -@@ -85,6 +105,57 @@ - - # define dup2 ms_windows_dup2 - -+# elif defined __KLIBC__ -+ -+# include -+ -+static int -+klibc_dup2dirfd (int fd, int desired_fd) -+{ -+ int tempfd; -+ int dupfd; -+ -+ tempfd = open ("NUL", O_RDONLY); -+ if (tempfd == -1) -+ return -1; -+ -+ if (tempfd == desired_fd) -+ { -+ close (tempfd); -+ -+ char path[_MAX_PATH]; -+ if (__libc_Back_ioFHToPath (fd, path, sizeof (path))) -+ return -1; -+ -+ return open(path, O_RDONLY); -+ } -+ -+ dupfd = klibc_dup2dirfd (fd, desired_fd); -+ -+ close (tempfd); -+ -+ return dupfd; -+} -+ -+static int -+klibc_dup2 (int fd, int desired_fd) -+{ -+ int dupfd; -+ struct stat sbuf; -+ -+ dupfd = dup2 (fd, desired_fd); -+ if (dupfd == -1 && errno == ENOTSUP \ -+ && !fstat (fd, &sbuf) && S_ISDIR (sbuf.st_mode)) -+ { -+ close (desired_fd); -+ -+ return klibc_dup2dirfd (fd, desired_fd); -+ } -+ -+ return dupfd; -+} -+ -+# define dup2 klibc_dup2 - # endif - - int -diff -durN inetutils-1.9.4.orig/lib/dup-safer.c inetutils-1.9.4/lib/dup-safer.c ---- inetutils-1.9.4.orig/lib/dup-safer.c 2015-03-31 15:08:15.000000000 +0800 -+++ inetutils-1.9.4/lib/dup-safer.c 2017-05-15 17:51:04.437500000 +0800 -@@ -1,6 +1,6 @@ - /* Invoke dup, but avoid some glitches. - -- Copyright (C) 2001, 2004-2006, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2001, 2004-2006, 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/errno.in.h inetutils-1.9.4/lib/errno.in.h ---- inetutils-1.9.4.orig/lib/errno.in.h 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/errno.in.h 2017-05-15 17:51:04.875000000 +0800 -@@ -1,6 +1,6 @@ - /* A POSIX-like . - -- Copyright (C) 2008-2015 Free Software Foundation, Inc. -+ Copyright (C) 2008-2017 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 -diff -durN inetutils-1.9.4.orig/lib/error.c inetutils-1.9.4/lib/error.c ---- inetutils-1.9.4.orig/lib/error.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/error.c 2017-05-15 17:51:05.031250000 +0800 -@@ -1,5 +1,5 @@ - /* Error handler for noninteractive utilities -- Copyright (C) 1990-1998, 2000-2007, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 1990-1998, 2000-2007, 2009-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - This program is free software: you can redistribute it and/or modify -@@ -42,6 +42,8 @@ - # define USE_UNLOCKED_IO 0 - # define _GL_ATTRIBUTE_FORMAT_PRINTF(a, b) - # define _GL_ARG_NONNULL(a) -+#else -+# include "getprogname.h" - #endif - - #if USE_UNLOCKED_IO -@@ -96,30 +98,32 @@ - # define WIN32_LEAN_AND_MEAN - # include - /* Get _get_osfhandle. */ --# include "msvc-nothrow.h" -+# if GNULIB_MSVC_NOTHROW -+# include "msvc-nothrow.h" -+# else -+# include -+# endif - # endif - - /* The gnulib override of fcntl is not needed in this file. */ - # undef fcntl - --# if !HAVE_DECL_STRERROR_R -+# if !(GNULIB_STRERROR_R_POSIX || HAVE_DECL_STRERROR_R) - # ifndef HAVE_DECL_STRERROR_R - "this configure-time declaration test was not run" - # endif - # if STRERROR_R_CHAR_P --char *strerror_r (); -+char *strerror_r (int errnum, char *buf, size_t buflen); - # else --int strerror_r (); -+int strerror_r (int errnum, char *buf, size_t buflen); - # endif - # endif - --/* The calling program should define program_name and set it to the -- name of the executing program. */ --extern char *program_name; -+#define program_name getprogname () - --# if HAVE_STRERROR_R || defined strerror_r -+# if GNULIB_STRERROR_R_POSIX || HAVE_STRERROR_R || defined strerror_r - # define __strerror_r strerror_r --# endif /* HAVE_STRERROR_R || defined strerror_r */ -+# endif /* GNULIB_STRERROR_R_POSIX || HAVE_STRERROR_R || defined strerror_r */ - #endif /* not _LIBC */ - - #if !_LIBC -@@ -172,9 +176,9 @@ - { - char const *s; - --#if defined HAVE_STRERROR_R || _LIBC -+#if _LIBC || GNULIB_STRERROR_R_POSIX || defined HAVE_STRERROR_R - char errbuf[1024]; --# if _LIBC || STRERROR_R_CHAR_P -+# if _LIBC || (!GNULIB_STRERROR_R_POSIX && STRERROR_R_CHAR_P) - s = __strerror_r (errnum, errbuf, sizeof errbuf); - # else - if (__strerror_r (errnum, errbuf, sizeof errbuf) == 0) -@@ -379,10 +383,10 @@ - } - - #if _LIBC -- __fxprintf (NULL, file_name != NULL ? "%s:%d: " : " ", -+ __fxprintf (NULL, file_name != NULL ? "%s:%u: " : " ", - file_name, line_number); - #else -- fprintf (stderr, file_name != NULL ? "%s:%d: " : " ", -+ fprintf (stderr, file_name != NULL ? "%s:%u: " : " ", - file_name, line_number); - #endif - -diff -durN inetutils-1.9.4.orig/lib/error.h inetutils-1.9.4/lib/error.h ---- inetutils-1.9.4.orig/lib/error.h 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/error.h 2017-05-15 17:51:05.171875000 +0800 -@@ -1,5 +1,5 @@ - /* Declaration for error-reporting function -- Copyright (C) 1995-1997, 2003, 2006, 2008-2015 Free Software Foundation, -+ Copyright (C) 1995-1997, 2003, 2006, 2008-2017 Free Software Foundation, - Inc. - This file is part of the GNU C Library. - -@@ -31,6 +31,16 @@ - # define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ - #endif - -+/* On mingw, the flavor of printf depends on whether the extensions module -+ * is in use; the check for determines the witness macro. */ -+#ifndef _GL_ATTRIBUTE_SPEC_PRINTF -+# if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU -+# define _GL_ATTRIBUTE_SPEC_PRINTF __gnu_printf__ -+# else -+# define _GL_ATTRIBUTE_SPEC_PRINTF __printf__ -+# endif -+#endif -+ - #ifdef __cplusplus - extern "C" { - #endif -@@ -40,11 +50,11 @@ - If STATUS is nonzero, terminate the program with 'exit (STATUS)'. */ - - extern void error (int __status, int __errnum, const char *__format, ...) -- _GL_ATTRIBUTE_FORMAT ((__printf__, 3, 4)); -+ _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF, 3, 4)); - - extern void error_at_line (int __status, int __errnum, const char *__fname, - unsigned int __lineno, const char *__format, ...) -- _GL_ATTRIBUTE_FORMAT ((__printf__, 5, 6)); -+ _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF, 5, 6)); - - /* If NULL, error will flush stdout, then print on stderr the program - name, a colon and a space. Otherwise, error will call this -diff -durN inetutils-1.9.4.orig/lib/exitfail.c inetutils-1.9.4/lib/exitfail.c ---- inetutils-1.9.4.orig/lib/exitfail.c 2015-03-31 15:08:15.000000000 +0800 -+++ inetutils-1.9.4/lib/exitfail.c 2017-05-15 17:51:05.312500000 +0800 -@@ -1,6 +1,6 @@ - /* Failure exit status - -- Copyright (C) 2002-2003, 2005-2007, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2002-2003, 2005-2007, 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/exitfail.h inetutils-1.9.4/lib/exitfail.h ---- inetutils-1.9.4.orig/lib/exitfail.h 2015-03-31 15:08:15.000000000 +0800 -+++ inetutils-1.9.4/lib/exitfail.h 2017-05-15 17:51:05.484375000 +0800 -@@ -1,6 +1,6 @@ - /* Failure exit status - -- Copyright (C) 2002, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2002, 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/fchdir.c inetutils-1.9.4/lib/fchdir.c ---- inetutils-1.9.4.orig/lib/fchdir.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/fchdir.c 2017-05-15 17:51:05.625000000 +0800 -@@ -1,5 +1,5 @@ - /* fchdir replacement. -- Copyright (C) 2006-2015 Free Software Foundation, Inc. -+ Copyright (C) 2006-2017 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 -diff -durN inetutils-1.9.4.orig/lib/fcntl.c inetutils-1.9.4/lib/fcntl.c ---- inetutils-1.9.4.orig/lib/fcntl.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/fcntl.c 2017-05-15 17:51:05.843750000 +0800 -@@ -1,6 +1,6 @@ - /* Provide file descriptor control. - -- Copyright (C) 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2009-2017 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 -@@ -38,7 +38,11 @@ - # include - - /* Get _get_osfhandle. */ --# include "msvc-nothrow.h" -+# if GNULIB_MSVC_NOTHROW -+# include "msvc-nothrow.h" -+# else -+# include -+# endif - - /* Upper bound on getdtablesize(). See lib/getdtablesize.c. */ - # define OPEN_MAX_MAX 0x10000 -@@ -162,6 +166,93 @@ - } - #endif /* W32 */ - -+#ifdef __KLIBC__ -+ -+# define INCL_DOS -+# include -+ -+static int -+klibc_fcntl (int fd, int action, /* arg */...) -+{ -+ va_list arg_ptr; -+ int arg; -+ struct stat sbuf; -+ int result = -1; -+ -+ va_start (arg_ptr, action); -+ arg = va_arg (arg_ptr, int); -+ result = fcntl (fd, action, arg); -+ /* EPERM for F_DUPFD, ENOTSUP for others */ -+ if (result == -1 && (errno == EPERM || errno == ENOTSUP) -+ && !fstat (fd, &sbuf) && S_ISDIR (sbuf.st_mode)) -+ { -+ ULONG ulMode; -+ -+ switch (action) -+ { -+ case F_DUPFD: -+ /* Find available fd */ -+ while (fcntl (arg, F_GETFL) != -1 || errno != EBADF) -+ arg++; -+ -+ result = dup2 (fd, arg); -+ break; -+ -+ /* Using underlying APIs is right ? */ -+ case F_GETFD: -+ if (DosQueryFHState (fd, &ulMode)) -+ break; -+ -+ result = (ulMode & OPEN_FLAGS_NOINHERIT) ? FD_CLOEXEC : 0; -+ break; -+ -+ case F_SETFD: -+ if (arg & ~FD_CLOEXEC) -+ break; -+ -+ if (DosQueryFHState (fd, &ulMode)) -+ break; -+ -+ if (arg & FD_CLOEXEC) -+ ulMode |= OPEN_FLAGS_NOINHERIT; -+ else -+ ulMode &= ~OPEN_FLAGS_NOINHERIT; -+ -+ /* Filter supported flags. */ -+ ulMode &= (OPEN_FLAGS_WRITE_THROUGH | OPEN_FLAGS_FAIL_ON_ERROR -+ | OPEN_FLAGS_NO_CACHE | OPEN_FLAGS_NOINHERIT); -+ -+ if (DosSetFHState (fd, ulMode)) -+ break; -+ -+ result = 0; -+ break; -+ -+ case F_GETFL: -+ result = 0; -+ break; -+ -+ case F_SETFL: -+ if (arg != 0) -+ break; -+ -+ result = 0; -+ break; -+ -+ default : -+ errno = EINVAL; -+ break; -+ } -+ } -+ -+ va_end (arg_ptr); -+ -+ return result; -+} -+ -+# define fcntl klibc_fcntl -+#endif -+ - /* Perform the specified ACTION on the file descriptor FD, possibly - using the argument ARG further described below. This replacement - handles the following actions, and forwards all others on to the -diff -durN inetutils-1.9.4.orig/lib/fcntl.in.h inetutils-1.9.4/lib/fcntl.in.h ---- inetutils-1.9.4.orig/lib/fcntl.in.h 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/fcntl.in.h 2017-05-15 17:51:05.984375000 +0800 -@@ -1,6 +1,6 @@ - /* Like , but with non-working flags defined to 0. - -- Copyright (C) 2006-2015 Free Software Foundation, Inc. -+ Copyright (C) 2006-2017 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 -diff -durN inetutils-1.9.4.orig/lib/fd-hook.c inetutils-1.9.4/lib/fd-hook.c ---- inetutils-1.9.4.orig/lib/fd-hook.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/fd-hook.c 2017-05-15 17:51:06.125000000 +0800 -@@ -1,5 +1,5 @@ - /* Hook for making making file descriptor functions close(), ioctl() extensible. -- Copyright (C) 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2009-2017 Free Software Foundation, Inc. - Written by Bruno Haible , 2009. - - This program is free software: you can redistribute it and/or modify it -diff -durN inetutils-1.9.4.orig/lib/fd-hook.h inetutils-1.9.4/lib/fd-hook.h ---- inetutils-1.9.4.orig/lib/fd-hook.h 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/fd-hook.h 2017-05-15 17:51:06.281250000 +0800 -@@ -1,5 +1,5 @@ - /* Hook for making making file descriptor functions close(), ioctl() extensible. -- Copyright (C) 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/fdopendir.c inetutils-1.9.4/lib/fdopendir.c ---- inetutils-1.9.4.orig/lib/fdopendir.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/fdopendir.c 2017-05-15 17:51:06.578125000 +0800 -@@ -1,5 +1,5 @@ - /* provide a replacement fdopendir function -- Copyright (C) 2004-2015 Free Software Foundation, Inc. -+ Copyright (C) 2004-2017 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 -@@ -62,6 +62,41 @@ - If this function returns successfully, FD is under control of the - dirent.h system, and the caller should not close or modify the state of - FD other than by the dirent.h functions. */ -+# ifdef __KLIBC__ -+# include -+ -+DIR * -+fdopendir (int fd) -+{ -+ char path[_MAX_PATH]; -+ DIR *dirp; -+ -+ /* Get a path from fd */ -+ if (__libc_Back_ioFHToPath (fd, path, sizeof (path))) -+ return NULL; -+ -+ dirp = opendir (path); -+ if (!dirp) -+ return NULL; -+ -+ /* Unregister fd registered by opendir() */ -+ _gl_unregister_dirp_fd (dirfd (dirp)); -+ -+ /* Register our fd */ -+ if (_gl_register_dirp_fd (fd, dirp)) -+ { -+ int saved_errno = errno; -+ -+ closedir (dirp); -+ -+ errno = saved_errno; -+ -+ dirp = NULL; -+ } -+ -+ return dirp; -+} -+# else - DIR * - fdopendir (int fd) - { -@@ -84,6 +119,7 @@ - - return dir; - } -+# endif - - /* Like fdopendir, except that if OLDER_DUPFD is not -1, it is known - to be a dup of FD which is less than FD - 1 and which will be -diff -durN inetutils-1.9.4.orig/lib/fd-safer.c inetutils-1.9.4/lib/fd-safer.c ---- inetutils-1.9.4.orig/lib/fd-safer.c 2015-03-31 15:08:15.000000000 +0800 -+++ inetutils-1.9.4/lib/fd-safer.c 2017-05-15 17:51:06.421875000 +0800 -@@ -1,6 +1,6 @@ - /* Return a safer copy of a file descriptor. - -- Copyright (C) 2005-2006, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2005-2006, 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/filemode.c inetutils-1.9.4/lib/filemode.c ---- inetutils-1.9.4.orig/lib/filemode.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/filemode.c 2017-05-15 17:51:06.750000000 +0800 -@@ -1,6 +1,6 @@ - /* filemode.c -- make a string describing file modes - -- Copyright (C) 1985, 1990, 1993, 1998-2000, 2004, 2006, 2009-2015 Free -+ Copyright (C) 1985, 1990, 1993, 1998-2000, 2004, 2006, 2009-2017 Free - Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/filemode.h inetutils-1.9.4/lib/filemode.h ---- inetutils-1.9.4.orig/lib/filemode.h 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/filemode.h 2017-05-15 17:51:06.890625000 +0800 -@@ -1,6 +1,6 @@ - /* Make a string describing file modes. - -- Copyright (C) 1998-1999, 2003, 2006, 2009-2015 Free Software Foundation, -+ Copyright (C) 1998-1999, 2003, 2006, 2009-2017 Free Software Foundation, - Inc. - - This program is free software: you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/filename.h inetutils-1.9.4/lib/filename.h ---- inetutils-1.9.4.orig/lib/filename.h 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/filename.h 2017-05-15 17:51:07.031250000 +0800 -@@ -1,5 +1,5 @@ - /* Basic filename support macros. -- Copyright (C) 2001-2004, 2007-2015 Free Software Foundation, Inc. -+ Copyright (C) 2001-2004, 2007-2017 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 -diff -durN inetutils-1.9.4.orig/lib/filenamecat.h inetutils-1.9.4/lib/filenamecat.h ---- inetutils-1.9.4.orig/lib/filenamecat.h 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/filenamecat.h 2017-05-15 17:51:07.375000000 +0800 -@@ -1,6 +1,6 @@ - /* Concatenate two arbitrary file names. - -- Copyright (C) 1996-1997, 2003, 2005, 2007, 2009-2015 Free Software -+ Copyright (C) 1996-1997, 2003, 2005, 2007, 2009-2017 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/filenamecat-lgpl.c inetutils-1.9.4/lib/filenamecat-lgpl.c ---- inetutils-1.9.4.orig/lib/filenamecat-lgpl.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/filenamecat-lgpl.c 2017-05-15 17:51:07.171875000 +0800 -@@ -1,6 +1,6 @@ - /* Concatenate two arbitrary file names. - -- Copyright (C) 1996-2007, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 1996-2007, 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/flexmember.h inetutils-1.9.4/lib/flexmember.h ---- inetutils-1.9.4.orig/lib/flexmember.h 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/lib/flexmember.h 2017-05-15 17:51:07.546875000 +0800 -@@ -0,0 +1,42 @@ -+/* Sizes of structs with flexible array members. -+ -+ Copyright 2016-2017 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 -+ the Free Software Foundation; either version 3 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, see . -+ -+ Written by Paul Eggert. */ -+ -+#include -+ -+/* Nonzero multiple of alignment of TYPE, suitable for FLEXSIZEOF below. -+ On older platforms without _Alignof, use a pessimistic bound that is -+ safe in practice even if FLEXIBLE_ARRAY_MEMBER is 1. -+ On newer platforms, use _Alignof to get a tighter bound. */ -+ -+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 -+# define FLEXALIGNOF(type) (sizeof (type) & ~ (sizeof (type) - 1)) -+#else -+# define FLEXALIGNOF(type) _Alignof (type) -+#endif -+ -+/* Upper bound on the size of a struct of type TYPE with a flexible -+ array member named MEMBER that is followed by N bytes of other data. -+ This is not simply sizeof (TYPE) + N, since it may require -+ alignment on unusually picky C11 platforms, and -+ FLEXIBLE_ARRAY_MEMBER may be 1 on pre-C11 platforms. -+ Yield a value less than N if and only if arithmetic overflow occurs. */ -+ -+#define FLEXSIZEOF(type, member, n) \ -+ ((offsetof (type, member) + FLEXALIGNOF (type) - 1 + (n)) \ -+ & ~ (FLEXALIGNOF (type) - 1)) -diff -durN inetutils-1.9.4.orig/lib/float.c inetutils-1.9.4/lib/float.c ---- inetutils-1.9.4.orig/lib/float.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/float.c 2017-05-15 17:51:07.875000000 +0800 -@@ -1,5 +1,5 @@ - /* Auxiliary definitions for . -- Copyright (C) 2011-2015 Free Software Foundation, Inc. -+ Copyright (C) 2011-2017 Free Software Foundation, Inc. - Written by Bruno Haible , 2011. - - This program is free software: you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/float.in.h inetutils-1.9.4/lib/float.in.h ---- inetutils-1.9.4.orig/lib/float.in.h 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/float.in.h 2017-05-15 17:51:08.062500000 +0800 -@@ -1,6 +1,6 @@ - /* A correct . - -- Copyright (C) 2007-2015 Free Software Foundation, Inc. -+ Copyright (C) 2007-2017 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 -diff -durN inetutils-1.9.4.orig/lib/float+.h inetutils-1.9.4/lib/float+.h ---- inetutils-1.9.4.orig/lib/float+.h 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/float+.h 2017-05-15 17:51:07.703125000 +0800 -@@ -1,5 +1,5 @@ - /* Supplemental information about the floating-point formats. -- Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. - Written by Bruno Haible , 2007. - - This program is free software; you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/fnmatch.c inetutils-1.9.4/lib/fnmatch.c ---- inetutils-1.9.4.orig/lib/fnmatch.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/fnmatch.c 2017-05-15 17:51:08.203125000 +0800 -@@ -1,4 +1,4 @@ --/* Copyright (C) 1991-1993, 1996-2007, 2009-2015 Free Software Foundation, Inc. -+/* Copyright (C) 1991-1993, 1996-2007, 2009-2017 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 -@@ -22,10 +22,6 @@ - # define _GNU_SOURCE 1 - #endif - --#if ! defined __builtin_expect && __GNUC__ < 3 --# define __builtin_expect(expr, expected) (expr) --#endif -- - #include - - #include -@@ -67,6 +63,8 @@ - # define SIZE_MAX ((size_t) -1) - #endif - -+#include "flexmember.h" -+ - /* We often have to test for FNM_FILE_NAME and FNM_PERIOD being both set. */ - #define NO_LEADING_PERIOD(flags) \ - ((flags & (FNM_FILE_NAME | FNM_PERIOD)) == (FNM_FILE_NAME | FNM_PERIOD)) -diff -durN inetutils-1.9.4.orig/lib/fnmatch.in.h inetutils-1.9.4/lib/fnmatch.in.h ---- inetutils-1.9.4.orig/lib/fnmatch.in.h 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/fnmatch.in.h 2017-05-15 17:51:08.359375000 +0800 -@@ -1,4 +1,4 @@ --/* Copyright (C) 1991-1993, 1996-1999, 2001-2003, 2005, 2007, 2009-2015 Free -+/* Copyright (C) 1991-1993, 1996-1999, 2001-2003, 2005, 2007, 2009-2017 Free - Software Foundation, Inc. - - This file is part of the GNU C Library. -diff -durN inetutils-1.9.4.orig/lib/fnmatch_loop.c inetutils-1.9.4/lib/fnmatch_loop.c ---- inetutils-1.9.4.orig/lib/fnmatch_loop.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/fnmatch_loop.c 2017-05-15 17:51:08.531250000 +0800 -@@ -1,4 +1,4 @@ --/* Copyright (C) 1991-1993, 1996-2006, 2009-2015 Free Software Foundation, Inc. -+/* Copyright (C) 1991-1993, 1996-2006, 2009-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - This program is free software; you can redistribute it and/or modify -@@ -1031,7 +1031,7 @@ - struct patternlist - { - struct patternlist *next; -- CHAR str[1]; -+ CHAR str[FLEXIBLE_ARRAY_MEMBER]; - } *list = NULL; - struct patternlist **lastp = &list; - size_t pattern_len = STRLEN (pattern); -@@ -1083,7 +1083,7 @@ - ? pattern_len \ - : p - startp + 1UL); \ - plensize = plen * sizeof (CHAR); \ -- newpsize = offsetof (struct patternlist, str) + plensize; \ -+ newpsize = FLEXSIZEOF (struct patternlist, str, plensize); \ - if ((size_t) -1 / sizeof (CHAR) < plen \ - || newpsize < offsetof (struct patternlist, str) \ - || ALLOCA_LIMIT <= newpsize) \ -diff -durN inetutils-1.9.4.orig/lib/fopen.c inetutils-1.9.4/lib/fopen.c ---- inetutils-1.9.4.orig/lib/fopen.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/fopen.c 2017-05-15 17:51:08.828125000 +0800 -@@ -1,5 +1,5 @@ - /* Open a stream to a file. -- Copyright (C) 2007-2015 Free Software Foundation, Inc. -+ Copyright (C) 2007-2017 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 -diff -durN inetutils-1.9.4.orig/lib/fopen-safer.c inetutils-1.9.4/lib/fopen-safer.c ---- inetutils-1.9.4.orig/lib/fopen-safer.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/fopen-safer.c 2017-05-15 17:51:08.671875000 +0800 -@@ -1,6 +1,6 @@ - /* Invoke fopen, but avoid some glitches. - -- Copyright (C) 2001, 2004-2006, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2001, 2004-2006, 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/forkpty.c inetutils-1.9.4/lib/forkpty.c ---- inetutils-1.9.4.orig/lib/forkpty.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/forkpty.c 2017-05-15 17:51:08.968750000 +0800 -@@ -1,5 +1,5 @@ - /* Fork a child process attached to the slave of a pseudo-terminal. -- Copyright (C) 2010-2015 Free Software Foundation, Inc. -+ Copyright (C) 2010-2017 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 -diff -durN inetutils-1.9.4.orig/lib/fseek.c inetutils-1.9.4/lib/fseek.c ---- inetutils-1.9.4.orig/lib/fseek.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/fseek.c 2017-05-15 17:51:09.156250000 +0800 -@@ -1,5 +1,5 @@ - /* An fseek() function that, together with fflush(), is POSIX compliant. -- Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2007, 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/fseeko.c inetutils-1.9.4/lib/fseeko.c ---- inetutils-1.9.4.orig/lib/fseeko.c 2015-05-12 20:15:28.000000000 +0800 -+++ inetutils-1.9.4/lib/fseeko.c 2017-05-15 17:51:09.343750000 +0800 -@@ -1,5 +1,5 @@ - /* An fseeko() function that, together with fflush(), is POSIX compliant. -- Copyright (C) 2007-2015 Free Software Foundation, Inc. -+ Copyright (C) 2007-2017 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 -@@ -52,7 +52,7 @@ - && fp->_IO_write_ptr == fp->_IO_write_base - && fp->_IO_save_base == NULL) - #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ -- /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */ -+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ - # if defined __SL64 && defined __SCLE /* Cygwin */ - if ((fp->_flags & __SL64) == 0) - { -@@ -80,7 +80,7 @@ - #elif defined __minix /* Minix */ - if (fp_->_ptr == fp_->_buf - && (fp_->_ptr == NULL || fp_->_count == 0)) --#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */ -+#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel */ - if (fp_->_ptr == fp_->_base - && (fp_->_ptr == NULL || fp_->_cnt == 0)) - #elif defined __UCLIBC__ /* uClibc */ -@@ -117,7 +117,7 @@ - if (pos == -1) - { - #if defined __sferror || defined __DragonFly__ || defined __ANDROID__ -- /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */ -+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ - fp_->_flags &= ~__SOFF; - #endif - return -1; -@@ -127,8 +127,8 @@ - fp->_flags &= ~_IO_EOF_SEEN; - fp->_offset = pos; - #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ -- /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */ --# if defined __CYGWIN__ || (defined __NetBSD__ && __NetBSD_Version__ >= 600000000) -+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ -+# if defined __CYGWIN__ || (defined __NetBSD__ && __NetBSD_Version__ >= 600000000) || defined __minix - /* fp_->_offset is typed as an integer. */ - fp_->_offset = pos; - # else -@@ -150,8 +150,8 @@ - fp_->_flags &= ~__SEOF; - #elif defined __EMX__ /* emx+gcc */ - fp->_flags &= ~_IOEOF; --#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */ -- fp->_flag &= ~_IOEOF; -+#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel */ -+ fp_->_flag &= ~_IOEOF; - #elif defined __MINT__ /* Atari FreeMiNT */ - fp->__offset = pos; - fp->__eof = 0; -diff -durN inetutils-1.9.4.orig/lib/fstat.c inetutils-1.9.4/lib/fstat.c ---- inetutils-1.9.4.orig/lib/fstat.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/fstat.c 2017-05-15 17:51:09.500000000 +0800 -@@ -1,5 +1,5 @@ - /* fstat() replacement. -- Copyright (C) 2011-2015 Free Software Foundation, Inc. -+ Copyright (C) 2011-2017 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 -@@ -23,20 +23,22 @@ - /* Get the original definition of fstat. It might be defined as a macro. */ - #include - #include --#if _GL_WINDOWS_64_BIT_ST_SIZE --# undef stat /* avoid warning on mingw64 with _FILE_OFFSET_BITS=64 */ --# define stat _stati64 --# undef fstat /* avoid warning on mingw64 with _FILE_OFFSET_BITS=64 */ --# define fstat _fstati64 --#endif - #undef __need_system_sys_stat_h - -+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -+# define WINDOWS_NATIVE -+#endif -+ -+#if !defined WINDOWS_NATIVE -+ - static int - orig_fstat (int fd, struct stat *buf) - { - return fstat (fd, buf); - } - -+#endif -+ - /* Specification. */ - /* Write "sys/stat.h" here, not , otherwise OSF/1 5.1 DTK cc - eliminates this include because of the preliminary #include -@@ -45,32 +47,15 @@ - - #include - #include -- --#if HAVE_MSVC_INVALID_PARAMETER_HANDLER --# include "msvc-inval.h" --#endif -- --#if HAVE_MSVC_INVALID_PARAMETER_HANDLER --static int --fstat_nothrow (int fd, struct stat *buf) --{ -- int result; -- -- TRY_MSVC_INVAL -- { -- result = orig_fstat (fd, buf); -- } -- CATCH_MSVC_INVAL -- { -- result = -1; -- errno = EBADF; -- } -- DONE_MSVC_INVAL; -- -- return result; --} --#else --# define fstat_nothrow orig_fstat -+#ifdef WINDOWS_NATIVE -+# define WIN32_LEAN_AND_MEAN -+# include -+# if GNULIB_MSVC_NOTHROW -+# include "msvc-nothrow.h" -+# else -+# include -+# endif -+# include "stat-w32.h" - #endif - - int -@@ -84,5 +69,20 @@ - return stat (name, buf); - #endif - -- return fstat_nothrow (fd, buf); -+#ifdef WINDOWS_NATIVE -+ /* Fill the fields ourselves, because the original fstat function returns -+ values for st_atime, st_mtime, st_ctime that depend on the current time -+ zone. See -+ */ -+ HANDLE h = (HANDLE) _get_osfhandle (fd); -+ -+ if (h == INVALID_HANDLE_VALUE) -+ { -+ errno = EBADF; -+ return -1; -+ } -+ return _gl_fstat_by_handle (h, NULL, buf); -+#else -+ return orig_fstat (fd, buf); -+#endif - } -diff -durN inetutils-1.9.4.orig/lib/fstatat.c inetutils-1.9.4/lib/fstatat.c ---- inetutils-1.9.4.orig/lib/fstatat.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/fstatat.c 2017-05-15 17:51:09.750000000 +0800 -@@ -1,6 +1,6 @@ - /* Work around an fstatat bug on Solaris 9. - -- Copyright (C) 2006, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2006, 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/ftell.c inetutils-1.9.4/lib/ftell.c ---- inetutils-1.9.4.orig/lib/ftell.c 2015-03-31 23:31:19.000000000 +0800 -+++ inetutils-1.9.4/lib/ftell.c 2017-05-15 17:51:09.890625000 +0800 -@@ -1,5 +1,5 @@ - /* An ftell() function that works around platform bugs. -- Copyright (C) 2007-2015 Free Software Foundation, Inc. -+ Copyright (C) 2007-2017 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 -diff -durN inetutils-1.9.4.orig/lib/ftello.c inetutils-1.9.4/lib/ftello.c ---- inetutils-1.9.4.orig/lib/ftello.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/ftello.c 2017-05-15 17:51:10.046875000 +0800 -@@ -1,5 +1,5 @@ - /* An ftello() function that works around platform bugs. -- Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2007, 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/gai_strerror.c inetutils-1.9.4/lib/gai_strerror.c ---- inetutils-1.9.4.orig/lib/gai_strerror.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/gai_strerror.c 2017-05-15 17:51:10.234375000 +0800 -@@ -1,4 +1,4 @@ --/* Copyright (C) 1997, 2001-2002, 2004-2006, 2008-2015 Free Software -+/* Copyright (C) 1997, 2001-2002, 2004-2006, 2008-2017 Free Software - Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Philip Blundell , 1997. -diff -durN inetutils-1.9.4.orig/lib/getaddrinfo.c inetutils-1.9.4/lib/getaddrinfo.c ---- inetutils-1.9.4.orig/lib/getaddrinfo.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/getaddrinfo.c 2017-05-15 17:51:10.437500000 +0800 -@@ -1,5 +1,5 @@ - /* Get address information (partial implementation). -- Copyright (C) 1997, 2001-2002, 2004-2015 Free Software Foundation, Inc. -+ Copyright (C) 1997, 2001-2002, 2004-2017 Free Software Foundation, Inc. - Contributed by Simon Josefsson . - - This program is free software; you can redistribute it and/or modify -@@ -54,7 +54,7 @@ - # define PF_UNSPEC 0 - #endif - --#if defined _WIN32 || defined __WIN32__ -+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - # define WINDOWS_NATIVE - #endif - -diff -durN inetutils-1.9.4.orig/lib/getcwd.c inetutils-1.9.4/lib/getcwd.c ---- inetutils-1.9.4.orig/lib/getcwd.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/getcwd.c 2017-05-15 17:51:10.765625000 +0800 -@@ -1,4 +1,4 @@ --/* Copyright (C) 1991-1999, 2004-2015 Free Software Foundation, Inc. -+/* Copyright (C) 1991-1999, 2004-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - This program is free software: you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/getcwd-lgpl.c inetutils-1.9.4/lib/getcwd-lgpl.c ---- inetutils-1.9.4.orig/lib/getcwd-lgpl.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/getcwd-lgpl.c 2017-05-15 17:51:10.609375000 +0800 -@@ -1,4 +1,4 @@ --/* Copyright (C) 2011-2015 Free Software Foundation, Inc. -+/* Copyright (C) 2011-2017 Free Software Foundation, Inc. - This file is part of gnulib. - - This program is free software: you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/getdelim.c inetutils-1.9.4/lib/getdelim.c ---- inetutils-1.9.4.orig/lib/getdelim.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/getdelim.c 2017-05-15 17:51:10.921875000 +0800 -@@ -1,5 +1,5 @@ - /* getdelim.c --- Implementation of replacement getdelim function. -- Copyright (C) 1994, 1996-1998, 2001, 2003, 2005-2015 Free Software -+ Copyright (C) 1994, 1996-1998, 2001, 2003, 2005-2017 Free Software - Foundation, Inc. - - This program is free software; you can redistribute it and/or -@@ -47,6 +47,16 @@ - # define getc_maybe_unlocked(fp) getc_unlocked(fp) - #endif - -+static void -+alloc_failed (void) -+{ -+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -+ /* Avoid errno problem without using the realloc module; see: -+ http://lists.gnu.org/archive/html/bug-gnulib/2016-08/msg00025.html */ -+ errno = ENOMEM; -+#endif -+} -+ - /* Read up to (and including) a DELIMITER from FP into *LINEPTR (and - NUL-terminate it). *LINEPTR is a pointer returned from malloc (or - NULL), pointing to *N characters of space. It is realloc'ed as -@@ -74,6 +84,7 @@ - new_lineptr = (char *) realloc (*lineptr, *n); - if (new_lineptr == NULL) - { -+ alloc_failed (); - result = -1; - goto unlock_return; - } -@@ -111,6 +122,7 @@ - new_lineptr = (char *) realloc (*lineptr, needed); - if (new_lineptr == NULL) - { -+ alloc_failed (); - result = -1; - goto unlock_return; - } -diff -durN inetutils-1.9.4.orig/lib/getdomainname.c inetutils-1.9.4/lib/getdomainname.c ---- inetutils-1.9.4.orig/lib/getdomainname.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/getdomainname.c 2017-05-15 17:51:11.109375000 +0800 -@@ -1,6 +1,6 @@ - /* getdomainname emulation for systems that doesn't have it. - -- Copyright (C) 2003, 2006, 2008, 2010-2015 Free Software Foundation, Inc. -+ Copyright (C) 2003, 2006, 2008, 2010-2017 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 -diff -durN inetutils-1.9.4.orig/lib/getdtablesize.c inetutils-1.9.4/lib/getdtablesize.c ---- inetutils-1.9.4.orig/lib/getdtablesize.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/getdtablesize.c 2017-05-15 17:51:11.281250000 +0800 -@@ -1,5 +1,5 @@ - /* getdtablesize() function for platforms that don't have it. -- Copyright (C) 2008-2015 Free Software Foundation, Inc. -+ Copyright (C) 2008-2017 Free Software Foundation, Inc. - Written by Bruno Haible , 2008. - - This program is free software: you can redistribute it and/or modify -@@ -24,7 +24,9 @@ - - # include - --# include "msvc-inval.h" -+# if HAVE_MSVC_INVALID_PARAMETER_HANDLER -+# include "msvc-inval.h" -+# endif - - # if HAVE_MSVC_INVALID_PARAMETER_HANDLER - static int -@@ -44,7 +46,8 @@ - - return result; - } --# define _setmaxstdio _setmaxstdio_nothrow -+# else -+# define _setmaxstdio_nothrow _setmaxstdio - # endif - - /* Cache for the previous getdtablesize () result. Safe to cache because -@@ -76,9 +79,9 @@ - freed when we call _setmaxstdio with the original value. */ - int orig_max_stdio = _getmaxstdio (); - unsigned int bound; -- for (bound = 0x10000; _setmaxstdio (bound) < 0; bound = bound / 2) -+ for (bound = 0x10000; _setmaxstdio_nothrow (bound) < 0; bound = bound / 2) - ; -- _setmaxstdio (orig_max_stdio); -+ _setmaxstdio_nothrow (orig_max_stdio); - dtablesize = bound; - } - return dtablesize; -diff -durN inetutils-1.9.4.orig/lib/getgroups.c inetutils-1.9.4/lib/getgroups.c ---- inetutils-1.9.4.orig/lib/getgroups.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/getgroups.c 2017-05-15 17:51:11.437500000 +0800 -@@ -1,6 +1,6 @@ - /* provide consistent interface to getgroups for systems that don't allow N==0 - -- Copyright (C) 1996, 1999, 2003, 2006-2015 Free Software Foundation, Inc. -+ Copyright (C) 1996, 1999, 2003, 2006-2017 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 -diff -durN inetutils-1.9.4.orig/lib/gethostname.c inetutils-1.9.4/lib/gethostname.c ---- inetutils-1.9.4.orig/lib/gethostname.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/gethostname.c 2017-05-15 17:51:11.593750000 +0800 -@@ -1,6 +1,6 @@ - /* gethostname emulation for SysV and POSIX.1. - -- Copyright (C) 1992, 2003, 2006, 2008-2015 Free Software Foundation, Inc. -+ Copyright (C) 1992, 2003, 2006, 2008-2017 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 -diff -durN inetutils-1.9.4.orig/lib/getline.c inetutils-1.9.4/lib/getline.c ---- inetutils-1.9.4.orig/lib/getline.c 2015-03-31 23:31:19.000000000 +0800 -+++ inetutils-1.9.4/lib/getline.c 2017-05-15 17:51:11.796875000 +0800 -@@ -1,5 +1,5 @@ - /* getline.c --- Implementation of replacement getline function. -- Copyright (C) 2005-2007, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2005-2007, 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/getlogin_r.c inetutils-1.9.4/lib/getlogin_r.c ---- inetutils-1.9.4.orig/lib/getlogin_r.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/getlogin_r.c 2017-05-15 17:51:11.953125000 +0800 -@@ -1,6 +1,6 @@ - /* Provide a working getlogin_r for systems which lack it. - -- Copyright (C) 2005-2007, 2010-2015 Free Software Foundation, Inc. -+ Copyright (C) 2005-2007, 2010-2017 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 -@@ -25,6 +25,8 @@ - #include - #include - -+#include "malloca.h" -+ - #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - # define WIN32_LEAN_AND_MEAN - # include -@@ -63,9 +65,27 @@ - /* Platform with a getlogin_r() function. */ - int ret = getlogin_r (name, size); - -- if (ret == 0 && memchr (name, '\0', size) == NULL) -- /* name contains a truncated result. */ -- return ERANGE; -+ if (ret == 0) -+ { -+ const char *nul = memchr (name, '\0', size); -+ if (nul == NULL) -+ /* name contains a truncated result. */ -+ return ERANGE; -+ if (size > 0 && nul == name + size - 1) -+ { -+ /* strlen(name) == size-1. Determine whether the untruncated result -+ would have had length size-1 or size. */ -+ char *room = (char *) malloca (size + 1); -+ if (room == NULL) -+ return ENOMEM; -+ ret = getlogin_r (room, size + 1); -+ /* The untruncated result should be the same as in the first call. */ -+ if (ret == 0 && memcmp (name, room, size) != 0) -+ /* The untruncated result would have been different. */ -+ ret = ERANGE; -+ freea (room); -+ } -+ } - return ret; - #else - /* Platform with a getlogin() function. */ -diff -durN inetutils-1.9.4.orig/lib/getopt.c inetutils-1.9.4/lib/getopt.c ---- inetutils-1.9.4.orig/lib/getopt.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/getopt.c 2017-05-15 17:51:12.906250000 +0800 -@@ -1,23 +1,21 @@ - /* Getopt for GNU. -- NOTE: getopt is part of the C library, so if you don't know what -- "Keep this file name-space clean" means, talk to drepper@gnu.org -- before changing it! -- Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2015 Free Software -- Foundation, Inc. -- This file is part of the GNU C Library. -+ Copyright (C) 1987-2017 Free Software Foundation, Inc. -+ This file is part of the GNU C Library and is also part of gnulib. -+ Patches to this file should be submitted to both projects. - -- 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 3 of the License, or -- (at your option) any later version. -+ The GNU C Library 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 3 of the License, or (at your option) any later version. - -- This program is distributed in the hope that it will be useful, -+ The GNU C Library 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. -+ 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, see . */ -+ You should have received a copy of the GNU General Public -+ License along with the GNU C Library; if not, see -+ . */ - - #ifndef _LIBC - # include -@@ -31,30 +29,54 @@ - #include - - #ifdef _LIBC -+/* When used as part of glibc, error printing must be done differently -+ for standards compliance. getopt is not a cancellation point, so -+ it must not call functions that are, and it is specified by an -+ older standard than stdio locking, so it must not refer to -+ functions in the "user namespace" related to stdio locking. -+ Finally, it must use glibc's internal message translation so that -+ the messages are looked up in the proper text domain. */ - # include -+# define fprintf __fxprintf_nocancel -+# define flockfile(fp) _IO_flockfile (fp) -+# define funlockfile(fp) _IO_funlockfile (fp) - #else - # include "gettext.h" - # define _(msgid) gettext (msgid) -+/* When used standalone, flockfile and funlockfile might not be -+ available. */ -+# if (!defined _POSIX_THREAD_SAFE_FUNCTIONS \ -+ || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) -+# define flockfile(fp) /* nop */ -+# define funlockfile(fp) /* nop */ -+# endif -+/* When used standalone, do not attempt to use alloca. */ -+# define __libc_use_alloca(size) 0 -+# undef alloca -+# define alloca(size) (abort (), (void *)0) - #endif - --#if defined _LIBC && defined USE_IN_LIBIO --# include --#endif -- --/* This version of 'getopt' appears to the caller like standard Unix 'getopt' -- but it behaves differently for the user, since it allows the user -- to intersperse the options with the other arguments. -- -- As 'getopt_long' works, it permutes the elements of ARGV so that, -- when it is done, all the options precede everything else. Thus -- all application programs are extended to handle flexible argument order. -+/* This implementation of 'getopt' has three modes for handling -+ options interspersed with non-option arguments. It can stop -+ scanning for options at the first non-option argument encountered, -+ as POSIX specifies. It can continue scanning for options after the -+ first non-option argument, but permute 'argv' as it goes so that, -+ after 'getopt' is done, all the options precede all the non-option -+ arguments and 'optind' points to the first non-option argument. -+ Or, it can report non-option arguments as if they were arguments to -+ the option character '\x01'. - -- Using 'getopt' or setting the environment variable POSIXLY_CORRECT -+ The default behavior of 'getopt_long' is to permute the argument list. -+ When this implementation is used standalone, the default behavior of -+ 'getopt' is to stop at the first non-option argument, but when it is -+ used as part of GNU libc it also permutes the argument list. In both -+ cases, setting the environment variable POSIXLY_CORRECT to any value - disables permutation. -- Then the behavior is completely standard. - -- GNU application programs can use a third alternative mode in which -- they can distinguish the relative order of options and other arguments. */ -+ If the first character of the OPTSTRING argument to 'getopt' or -+ 'getopt_long' is '+', both functions will stop at the first -+ non-option argument. If it is '-', both functions will report -+ non-option arguments as arguments to the option character '\x01'. */ - - #include "getopt_int.h" - -@@ -95,42 +117,7 @@ - /* Keep a global copy of all internal members of getopt_data. */ - - static struct _getopt_data getopt_data; -- - --#if defined HAVE_DECL_GETENV && !HAVE_DECL_GETENV --extern char *getenv (); --#endif -- --#ifdef _LIBC --/* Stored original parameters. -- XXX This is no good solution. We should rather copy the args so -- that we can compare them later. But we must not use malloc(3). */ --extern int __libc_argc; --extern char **__libc_argv; -- --/* Bash 2.0 gives us an environment variable containing flags -- indicating ARGV elements that should not be considered arguments. */ -- --# ifdef USE_NONOPTION_FLAGS --/* Defined in getopt_init.c */ --extern char *__getopt_nonoption_flags; --# endif -- --# ifdef USE_NONOPTION_FLAGS --# define SWAP_FLAGS(ch1, ch2) \ -- if (d->__nonoption_flags_len > 0) \ -- { \ -- char __tmp = __getopt_nonoption_flags[ch1]; \ -- __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \ -- __getopt_nonoption_flags[ch2] = __tmp; \ -- } --# else --# define SWAP_FLAGS(ch1, ch2) --# endif --#else /* !_LIBC */ --# define SWAP_FLAGS(ch1, ch2) --#endif /* _LIBC */ -- - /* Exchange two adjacent subsequences of ARGV. - One subsequence is elements [first_nonopt,last_nonopt) - which contains all the non-options that have been skipped so far. -@@ -153,64 +140,40 @@ - It leaves the longer segment in the right place overall, - but it consists of two parts that need to be swapped next. */ - --#if defined _LIBC && defined USE_NONOPTION_FLAGS -- /* First make sure the handling of the '__getopt_nonoption_flags' -- string can work normally. Our top argument must be in the range -- of the string. */ -- if (d->__nonoption_flags_len > 0 && top >= d->__nonoption_flags_max_len) -- { -- /* We must extend the array. The user plays games with us and -- presents new arguments. */ -- char *new_str = malloc (top + 1); -- if (new_str == NULL) -- d->__nonoption_flags_len = d->__nonoption_flags_max_len = 0; -- else -- { -- memset (__mempcpy (new_str, __getopt_nonoption_flags, -- d->__nonoption_flags_max_len), -- '\0', top + 1 - d->__nonoption_flags_max_len); -- d->__nonoption_flags_max_len = top + 1; -- __getopt_nonoption_flags = new_str; -- } -- } --#endif -- - while (top > middle && middle > bottom) - { - if (top - middle > middle - bottom) -- { -- /* Bottom segment is the short one. */ -- int len = middle - bottom; -- register int i; -+ { -+ /* Bottom segment is the short one. */ -+ int len = middle - bottom; -+ int i; - -- /* Swap it with the top part of the top segment. */ -- for (i = 0; i < len; i++) -- { -- tem = argv[bottom + i]; -- argv[bottom + i] = argv[top - (middle - bottom) + i]; -- argv[top - (middle - bottom) + i] = tem; -- SWAP_FLAGS (bottom + i, top - (middle - bottom) + i); -- } -- /* Exclude the moved bottom segment from further swapping. */ -- top -= len; -- } -+ /* Swap it with the top part of the top segment. */ -+ for (i = 0; i < len; i++) -+ { -+ tem = argv[bottom + i]; -+ argv[bottom + i] = argv[top - (middle - bottom) + i]; -+ argv[top - (middle - bottom) + i] = tem; -+ } -+ /* Exclude the moved bottom segment from further swapping. */ -+ top -= len; -+ } - else -- { -- /* Top segment is the short one. */ -- int len = top - middle; -- register int i; -+ { -+ /* Top segment is the short one. */ -+ int len = top - middle; -+ int i; - -- /* Swap it with the bottom part of the bottom segment. */ -- for (i = 0; i < len; i++) -- { -- tem = argv[bottom + i]; -- argv[bottom + i] = argv[middle + i]; -- argv[middle + i] = tem; -- SWAP_FLAGS (bottom + i, middle + i); -- } -- /* Exclude the moved top segment from further swapping. */ -- bottom += len; -- } -+ /* Swap it with the bottom part of the bottom segment. */ -+ for (i = 0; i < len; i++) -+ { -+ tem = argv[bottom + i]; -+ argv[bottom + i] = argv[middle + i]; -+ argv[middle + i] = tem; -+ } -+ /* Exclude the moved top segment from further swapping. */ -+ bottom += len; -+ } - } - - /* Update records for the slots the non-options now occupy. */ -@@ -219,25 +182,216 @@ - d->__last_nonopt = d->optind; - } - --/* Initialize the internal data when the first call is made. */ -+/* Process the argument starting with d->__nextchar as a long option. -+ d->optind should *not* have been advanced over this argument. -+ -+ If the value returned is -1, it was not actually a long option, the -+ state is unchanged, and the argument should be processed as a set -+ of short options (this can only happen when long_only is true). -+ Otherwise, the option (and its argument, if any) have been consumed -+ and the return value is the value to return from _getopt_internal_r. */ -+static int -+process_long_option (int argc, char **argv, const char *optstring, -+ const struct option *longopts, int *longind, -+ int long_only, struct _getopt_data *d, -+ int print_errors, const char *prefix) -+{ -+ char *nameend; -+ size_t namelen; -+ const struct option *p; -+ const struct option *pfound = NULL; -+ int n_options; -+ int option_index; -+ -+ for (nameend = d->__nextchar; *nameend && *nameend != '='; nameend++) -+ /* Do nothing. */ ; -+ namelen = nameend - d->__nextchar; -+ -+ /* First look for an exact match, counting the options as a side -+ effect. */ -+ for (p = longopts, n_options = 0; p->name; p++, n_options++) -+ if (!strncmp (p->name, d->__nextchar, namelen) -+ && namelen == strlen (p->name)) -+ { -+ /* Exact match found. */ -+ pfound = p; -+ option_index = n_options; -+ break; -+ } -+ -+ if (pfound == NULL) -+ { -+ /* Didn't find an exact match, so look for abbreviations. */ -+ unsigned char *ambig_set = NULL; -+ int ambig_malloced = 0; -+ int ambig_fallback = 0; -+ int indfound = -1; -+ -+ for (p = longopts, option_index = 0; p->name; p++, option_index++) -+ if (!strncmp (p->name, d->__nextchar, namelen)) -+ { -+ if (pfound == NULL) -+ { -+ /* First nonexact match found. */ -+ pfound = p; -+ indfound = option_index; -+ } -+ else if (long_only -+ || pfound->has_arg != p->has_arg -+ || pfound->flag != p->flag -+ || pfound->val != p->val) -+ { -+ /* Second or later nonexact match found. */ -+ if (!ambig_fallback) -+ { -+ if (!print_errors) -+ /* Don't waste effort tracking the ambig set if -+ we're not going to print it anyway. */ -+ ambig_fallback = 1; -+ else if (!ambig_set) -+ { -+ if (__libc_use_alloca (n_options)) -+ ambig_set = alloca (n_options); -+ else if ((ambig_set = malloc (n_options)) == NULL) -+ /* Fall back to simpler error message. */ -+ ambig_fallback = 1; -+ else -+ ambig_malloced = 1; -+ -+ if (ambig_set) -+ { -+ memset (ambig_set, 0, n_options); -+ ambig_set[indfound] = 1; -+ } -+ } -+ if (ambig_set) -+ ambig_set[option_index] = 1; -+ } -+ } -+ } -+ -+ if (ambig_set || ambig_fallback) -+ { -+ if (print_errors) -+ { -+ if (ambig_fallback) -+ fprintf (stderr, _("%s: option '%s%s' is ambiguous\n"), -+ argv[0], prefix, d->__nextchar); -+ else -+ { -+ flockfile (stderr); -+ fprintf (stderr, -+ _("%s: option '%s%s' is ambiguous; possibilities:"), -+ argv[0], prefix, d->__nextchar); -+ -+ for (option_index = 0; option_index < n_options; option_index++) -+ if (ambig_set[option_index]) -+ fprintf (stderr, " '%s%s'", -+ prefix, longopts[option_index].name); -+ -+ /* This must use 'fprintf' even though it's only -+ printing a single character, so that it goes through -+ __fxprintf_nocancel when compiled as part of glibc. */ -+ fprintf (stderr, "\n"); -+ funlockfile (stderr); -+ } -+ } -+ if (ambig_malloced) -+ free (ambig_set); -+ d->__nextchar += strlen (d->__nextchar); -+ d->optind++; -+ d->optopt = 0; -+ return '?'; -+ } -+ -+ option_index = indfound; -+ } -+ -+ if (pfound == NULL) -+ { -+ /* Can't find it as a long option. If this is not getopt_long_only, -+ or the option starts with '--' or is not a valid short option, -+ then it's an error. */ -+ if (!long_only || argv[d->optind][1] == '-' -+ || strchr (optstring, *d->__nextchar) == NULL) -+ { -+ if (print_errors) -+ fprintf (stderr, _("%s: unrecognized option '%s%s'\n"), -+ argv[0], prefix, d->__nextchar); -+ -+ d->__nextchar = NULL; -+ d->optind++; -+ d->optopt = 0; -+ return '?'; -+ } -+ -+ /* Otherwise interpret it as a short option. */ -+ return -1; -+ } -+ -+ /* We have found a matching long option. Consume it. */ -+ d->optind++; -+ d->__nextchar = NULL; -+ if (*nameend) -+ { -+ /* Don't test has_arg with >, because some C compilers don't -+ allow it to be used on enums. */ -+ if (pfound->has_arg) -+ d->optarg = nameend + 1; -+ else -+ { -+ if (print_errors) -+ fprintf (stderr, -+ _("%s: option '%s%s' doesn't allow an argument\n"), -+ argv[0], prefix, pfound->name); -+ -+ d->optopt = pfound->val; -+ return '?'; -+ } -+ } -+ else if (pfound->has_arg == 1) -+ { -+ if (d->optind < argc) -+ d->optarg = argv[d->optind++]; -+ else -+ { -+ if (print_errors) -+ fprintf (stderr, -+ _("%s: option '%s%s' requires an argument\n"), -+ argv[0], prefix, pfound->name); -+ -+ d->optopt = pfound->val; -+ return optstring[0] == ':' ? ':' : '?'; -+ } -+ } -+ -+ if (longind != NULL) -+ *longind = option_index; -+ if (pfound->flag) -+ { -+ *(pfound->flag) = pfound->val; -+ return 0; -+ } -+ return pfound->val; -+} -+ -+/* Initialize internal data upon the first call to getopt. */ - - static const char * - _getopt_initialize (int argc _GL_UNUSED, -- char **argv _GL_UNUSED, const char *optstring, -- struct _getopt_data *d, int posixly_correct) -+ char **argv _GL_UNUSED, const char *optstring, -+ struct _getopt_data *d, int posixly_correct) - { - /* Start processing options with ARGV-element 1 (since ARGV-element 0 - is the program name); the sequence of previously skipped - non-option ARGV-elements is empty. */ -+ if (d->optind == 0) -+ d->optind = 1; - - d->__first_nonopt = d->__last_nonopt = d->optind; -- - d->__nextchar = NULL; - -- d->__posixly_correct = posixly_correct || !!getenv ("POSIXLY_CORRECT"); -- - /* Determine how to handle the ordering of options and nonoptions. */ -- - if (optstring[0] == '-') - { - d->__ordering = RETURN_IN_ORDER; -@@ -248,41 +402,12 @@ - d->__ordering = REQUIRE_ORDER; - ++optstring; - } -- else if (d->__posixly_correct) -+ else if (posixly_correct || !!getenv ("POSIXLY_CORRECT")) - d->__ordering = REQUIRE_ORDER; - else - d->__ordering = PERMUTE; - --#if defined _LIBC && defined USE_NONOPTION_FLAGS -- if (!d->__posixly_correct -- && argc == __libc_argc && argv == __libc_argv) -- { -- if (d->__nonoption_flags_max_len == 0) -- { -- if (__getopt_nonoption_flags == NULL -- || __getopt_nonoption_flags[0] == '\0') -- d->__nonoption_flags_max_len = -1; -- else -- { -- const char *orig_str = __getopt_nonoption_flags; -- int len = d->__nonoption_flags_max_len = strlen (orig_str); -- if (d->__nonoption_flags_max_len < argc) -- d->__nonoption_flags_max_len = argc; -- __getopt_nonoption_flags = -- (char *) malloc (d->__nonoption_flags_max_len); -- if (__getopt_nonoption_flags == NULL) -- d->__nonoption_flags_max_len = -1; -- else -- memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), -- '\0', d->__nonoption_flags_max_len - len); -- } -- } -- d->__nonoption_flags_len = d->__nonoption_flags_max_len; -- } -- else -- d->__nonoption_flags_len = 0; --#endif -- -+ d->__initialized = 1; - return optstring; - } - -@@ -344,8 +469,8 @@ - - int - _getopt_internal_r (int argc, char **argv, const char *optstring, -- const struct option *longopts, int *longind, -- int long_only, struct _getopt_data *d, int posixly_correct) -+ const struct option *longopts, int *longind, -+ int long_only, struct _getopt_data *d, int posixly_correct) - { - int print_errors = d->opterr; - -@@ -355,461 +480,129 @@ - d->optarg = NULL; - - if (d->optind == 0 || !d->__initialized) -- { -- if (d->optind == 0) -- d->optind = 1; /* Don't scan ARGV[0], the program name. */ -- optstring = _getopt_initialize (argc, argv, optstring, d, -- posixly_correct); -- d->__initialized = 1; -- } -+ optstring = _getopt_initialize (argc, argv, optstring, d, posixly_correct); - else if (optstring[0] == '-' || optstring[0] == '+') - optstring++; -+ - if (optstring[0] == ':') - print_errors = 0; - -- /* Test whether ARGV[optind] points to a non-option argument. -- Either it does not have option syntax, or there is an environment flag -- from the shell indicating it is not an option. The later information -- is only used when the used in the GNU libc. */ --#if defined _LIBC && defined USE_NONOPTION_FLAGS --# define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0' \ -- || (d->optind < d->__nonoption_flags_len \ -- && __getopt_nonoption_flags[d->optind] == '1')) --#else --# define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0') --#endif -+ /* Test whether ARGV[optind] points to a non-option argument. */ -+#define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0') - - if (d->__nextchar == NULL || *d->__nextchar == '\0') - { - /* Advance to the next ARGV-element. */ - - /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been -- moved back by the user (who may also have changed the arguments). */ -+ moved back by the user (who may also have changed the arguments). */ - if (d->__last_nonopt > d->optind) -- d->__last_nonopt = d->optind; -+ d->__last_nonopt = d->optind; - if (d->__first_nonopt > d->optind) -- d->__first_nonopt = d->optind; -+ d->__first_nonopt = d->optind; - - if (d->__ordering == PERMUTE) -- { -- /* If we have just processed some options following some non-options, -- exchange them so that the options come first. */ -+ { -+ /* If we have just processed some options following some non-options, -+ exchange them so that the options come first. */ - -- if (d->__first_nonopt != d->__last_nonopt -- && d->__last_nonopt != d->optind) -- exchange ((char **) argv, d); -- else if (d->__last_nonopt != d->optind) -- d->__first_nonopt = d->optind; -+ if (d->__first_nonopt != d->__last_nonopt -+ && d->__last_nonopt != d->optind) -+ exchange (argv, d); -+ else if (d->__last_nonopt != d->optind) -+ d->__first_nonopt = d->optind; - -- /* Skip any additional non-options -- and extend the range of non-options previously skipped. */ -+ /* Skip any additional non-options -+ and extend the range of non-options previously skipped. */ - -- while (d->optind < argc && NONOPTION_P) -- d->optind++; -- d->__last_nonopt = d->optind; -- } -+ while (d->optind < argc && NONOPTION_P) -+ d->optind++; -+ d->__last_nonopt = d->optind; -+ } - - /* The special ARGV-element '--' means premature end of options. -- Skip it like a null option, -- then exchange with previous non-options as if it were an option, -- then skip everything else like a non-option. */ -+ Skip it like a null option, -+ then exchange with previous non-options as if it were an option, -+ then skip everything else like a non-option. */ - - if (d->optind != argc && !strcmp (argv[d->optind], "--")) -- { -- d->optind++; -+ { -+ d->optind++; - -- if (d->__first_nonopt != d->__last_nonopt -- && d->__last_nonopt != d->optind) -- exchange ((char **) argv, d); -- else if (d->__first_nonopt == d->__last_nonopt) -- d->__first_nonopt = d->optind; -- d->__last_nonopt = argc; -+ if (d->__first_nonopt != d->__last_nonopt -+ && d->__last_nonopt != d->optind) -+ exchange (argv, d); -+ else if (d->__first_nonopt == d->__last_nonopt) -+ d->__first_nonopt = d->optind; -+ d->__last_nonopt = argc; - -- d->optind = argc; -- } -+ d->optind = argc; -+ } - - /* If we have done all the ARGV-elements, stop the scan -- and back over any non-options that we skipped and permuted. */ -+ and back over any non-options that we skipped and permuted. */ - - if (d->optind == argc) -- { -- /* Set the next-arg-index to point at the non-options -- that we previously skipped, so the caller will digest them. */ -- if (d->__first_nonopt != d->__last_nonopt) -- d->optind = d->__first_nonopt; -- return -1; -- } -+ { -+ /* Set the next-arg-index to point at the non-options -+ that we previously skipped, so the caller will digest them. */ -+ if (d->__first_nonopt != d->__last_nonopt) -+ d->optind = d->__first_nonopt; -+ return -1; -+ } - - /* If we have come to a non-option and did not permute it, -- either stop the scan or describe it to the caller and pass it by. */ -+ either stop the scan or describe it to the caller and pass it by. */ - - if (NONOPTION_P) -- { -- if (d->__ordering == REQUIRE_ORDER) -- return -1; -- d->optarg = argv[d->optind++]; -- return 1; -- } -+ { -+ if (d->__ordering == REQUIRE_ORDER) -+ return -1; -+ d->optarg = argv[d->optind++]; -+ return 1; -+ } - - /* We have found another option-ARGV-element. -- Skip the initial punctuation. */ -- -- d->__nextchar = (argv[d->optind] + 1 -- + (longopts != NULL && argv[d->optind][1] == '-')); -- } -- -- /* Decode the current option-ARGV-element. */ -- -- /* Check whether the ARGV-element is a long option. -- -- If long_only and the ARGV-element has the form "-f", where f is -- a valid short option, don't consider it an abbreviated form of -- a long option that starts with f. Otherwise there would be no -- way to give the -f short option. -- -- On the other hand, if there's a long option "fubar" and -- the ARGV-element is "-fu", do consider that an abbreviation of -- the long option, just like "--fu", and not "-f" with arg "u". -- -- This distinction seems to be the most useful approach. */ -- -- if (longopts != NULL -- && (argv[d->optind][1] == '-' -- || (long_only && (argv[d->optind][2] -- || !strchr (optstring, argv[d->optind][1]))))) -- { -- char *nameend; -- unsigned int namelen; -- const struct option *p; -- const struct option *pfound = NULL; -- struct option_list -- { -- const struct option *p; -- struct option_list *next; -- } *ambig_list = NULL; --#ifdef _LIBC --/* malloc() not used for _LIBC to simplify failure messages. */ --# define free_option_list(l) --#else --# define free_option_list(l) \ -- while (l != NULL) \ -- { \ -- struct option_list *pn = l->next; \ -- free (l); \ -- l = pn; \ -- } --#endif -- int exact = 0; -- int ambig = 0; -- int indfound = -1; -- int option_index; -- -- for (nameend = d->__nextchar; *nameend && *nameend != '='; nameend++) -- /* Do nothing. */ ; -- namelen = nameend - d->__nextchar; -- -- /* Test all long options for either exact match -- or abbreviated matches. */ -- for (p = longopts, option_index = 0; p->name; p++, option_index++) -- if (!strncmp (p->name, d->__nextchar, namelen)) -- { -- if (namelen == (unsigned int) strlen (p->name)) -- { -- /* Exact match found. */ -- pfound = p; -- indfound = option_index; -- exact = 1; -- break; -- } -- else if (pfound == NULL) -- { -- /* First nonexact match found. */ -- pfound = p; -- indfound = option_index; -- } -- else if (ambig) -- ; /* Taking simpler path to handling ambiguities. */ -- else if (long_only -- || pfound->has_arg != p->has_arg -- || pfound->flag != p->flag -- || pfound->val != p->val) -- { -- /* Second or later nonexact match found. */ --#ifdef _LIBC -- struct option_list *newp = alloca (sizeof (*newp)); --#else -- struct option_list *newp = malloc (sizeof (*newp)); -- if (newp == NULL) -- { -- free_option_list (ambig_list); -- ambig_list = NULL; -- ambig = 1; /* Use simpler fallback message. */ -- } -- else --#endif -- { -- newp->p = p; -- newp->next = ambig_list; -- ambig_list = newp; -- } -- } -- } -- -- if ((ambig || ambig_list) && !exact) -- { -- if (print_errors && ambig_list) -- { -- struct option_list first; -- first.p = pfound; -- first.next = ambig_list; -- ambig_list = &first; -- --#if defined _LIBC && defined USE_IN_LIBIO -- char *buf = NULL; -- size_t buflen = 0; -- -- FILE *fp = open_memstream (&buf, &buflen); -- if (fp != NULL) -- { -- fprintf (fp, -- _("%s: option '%s' is ambiguous; possibilities:"), -- argv[0], argv[d->optind]); -- -- do -- { -- fprintf (fp, " '--%s'", ambig_list->p->name); -- ambig_list = ambig_list->next; -- } -- while (ambig_list != NULL); -- -- fputc_unlocked ('\n', fp); -- -- if (__builtin_expect (fclose (fp) != EOF, 1)) -- { -- _IO_flockfile (stderr); -- -- int old_flags2 = ((_IO_FILE *) stderr)->_flags2; -- ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; -- -- __fxprintf (NULL, "%s", buf); -- -- ((_IO_FILE *) stderr)->_flags2 = old_flags2; -- _IO_funlockfile (stderr); -- -- free (buf); -- } -- } --#else -- fprintf (stderr, -- _("%s: option '%s' is ambiguous; possibilities:"), -- argv[0], argv[d->optind]); -- do -- { -- fprintf (stderr, " '--%s'", ambig_list->p->name); -- ambig_list = ambig_list->next; -- } -- while (ambig_list != NULL); -- -- fputc ('\n', stderr); --#endif -- } -- else if (print_errors && ambig) -- { -- fprintf (stderr, -- _("%s: option '%s' is ambiguous\n"), -- argv[0], argv[d->optind]); -- } -- d->__nextchar += strlen (d->__nextchar); -- d->optind++; -- d->optopt = 0; -- free_option_list (ambig_list); -- return '?'; -- } -- -- free_option_list (ambig_list); -- -- if (pfound != NULL) -- { -- option_index = indfound; -- d->optind++; -- if (*nameend) -- { -- /* Don't test has_arg with >, because some C compilers don't -- allow it to be used on enums. */ -- if (pfound->has_arg) -- d->optarg = nameend + 1; -- else -- { -- if (print_errors) -- { --#if defined _LIBC && defined USE_IN_LIBIO -- char *buf; -- int n; --#endif -- -- if (argv[d->optind - 1][1] == '-') -- { -- /* --option */ --#if defined _LIBC && defined USE_IN_LIBIO -- n = __asprintf (&buf, _("\ --%s: option '--%s' doesn't allow an argument\n"), -- argv[0], pfound->name); --#else -- fprintf (stderr, _("\ --%s: option '--%s' doesn't allow an argument\n"), -- argv[0], pfound->name); --#endif -- } -- else -- { -- /* +option or -option */ --#if defined _LIBC && defined USE_IN_LIBIO -- n = __asprintf (&buf, _("\ --%s: option '%c%s' doesn't allow an argument\n"), -- argv[0], argv[d->optind - 1][0], -- pfound->name); --#else -- fprintf (stderr, _("\ --%s: option '%c%s' doesn't allow an argument\n"), -- argv[0], argv[d->optind - 1][0], -- pfound->name); --#endif -- } -- --#if defined _LIBC && defined USE_IN_LIBIO -- if (n >= 0) -- { -- _IO_flockfile (stderr); -- -- int old_flags2 = ((_IO_FILE *) stderr)->_flags2; -- ((_IO_FILE *) stderr)->_flags2 -- |= _IO_FLAGS2_NOTCANCEL; -- -- __fxprintf (NULL, "%s", buf); -- -- ((_IO_FILE *) stderr)->_flags2 = old_flags2; -- _IO_funlockfile (stderr); -- -- free (buf); -- } --#endif -- } -- -- d->__nextchar += strlen (d->__nextchar); -- -- d->optopt = pfound->val; -- return '?'; -- } -- } -- else if (pfound->has_arg == 1) -- { -- if (d->optind < argc) -- d->optarg = argv[d->optind++]; -- else -- { -- if (print_errors) -- { --#if defined _LIBC && defined USE_IN_LIBIO -- char *buf; -- -- if (__asprintf (&buf, _("\ --%s: option '--%s' requires an argument\n"), -- argv[0], pfound->name) >= 0) -- { -- _IO_flockfile (stderr); -- -- int old_flags2 = ((_IO_FILE *) stderr)->_flags2; -- ((_IO_FILE *) stderr)->_flags2 -- |= _IO_FLAGS2_NOTCANCEL; -- -- __fxprintf (NULL, "%s", buf); -- -- ((_IO_FILE *) stderr)->_flags2 = old_flags2; -- _IO_funlockfile (stderr); -- -- free (buf); -- } --#else -- fprintf (stderr, -- _("%s: option '--%s' requires an argument\n"), -- argv[0], pfound->name); --#endif -- } -- d->__nextchar += strlen (d->__nextchar); -- d->optopt = pfound->val; -- return optstring[0] == ':' ? ':' : '?'; -- } -- } -- d->__nextchar += strlen (d->__nextchar); -- if (longind != NULL) -- *longind = option_index; -- if (pfound->flag) -- { -- *(pfound->flag) = pfound->val; -- return 0; -- } -- return pfound->val; -- } -- -- /* Can't find it as a long option. If this is not getopt_long_only, -- or the option starts with '--' or is not a valid short -- option, then it's an error. -- Otherwise interpret it as a short option. */ -- if (!long_only || argv[d->optind][1] == '-' -- || strchr (optstring, *d->__nextchar) == NULL) -- { -- if (print_errors) -- { --#if defined _LIBC && defined USE_IN_LIBIO -- char *buf; -- int n; --#endif -- -- if (argv[d->optind][1] == '-') -- { -- /* --option */ --#if defined _LIBC && defined USE_IN_LIBIO -- n = __asprintf (&buf, _("%s: unrecognized option '--%s'\n"), -- argv[0], d->__nextchar); --#else -- fprintf (stderr, _("%s: unrecognized option '--%s'\n"), -- argv[0], d->__nextchar); --#endif -- } -- else -- { -- /* +option or -option */ --#if defined _LIBC && defined USE_IN_LIBIO -- n = __asprintf (&buf, _("%s: unrecognized option '%c%s'\n"), -- argv[0], argv[d->optind][0], d->__nextchar); --#else -- fprintf (stderr, _("%s: unrecognized option '%c%s'\n"), -- argv[0], argv[d->optind][0], d->__nextchar); --#endif -- } -- --#if defined _LIBC && defined USE_IN_LIBIO -- if (n >= 0) -- { -- _IO_flockfile (stderr); -+ Check whether it might be a long option. */ -+ if (longopts) -+ { -+ if (argv[d->optind][1] == '-') -+ { -+ /* "--foo" is always a long option. The special option -+ "--" was handled above. */ -+ d->__nextchar = argv[d->optind] + 2; -+ return process_long_option (argc, argv, optstring, longopts, -+ longind, long_only, d, -+ print_errors, "--"); -+ } - -- int old_flags2 = ((_IO_FILE *) stderr)->_flags2; -- ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; -+ /* If long_only and the ARGV-element has the form "-f", -+ where f is a valid short option, don't consider it an -+ abbreviated form of a long option that starts with f. -+ Otherwise there would be no way to give the -f short -+ option. - -- __fxprintf (NULL, "%s", buf); -+ On the other hand, if there's a long option "fubar" and -+ the ARGV-element is "-fu", do consider that an -+ abbreviation of the long option, just like "--fu", and -+ not "-f" with arg "u". - -- ((_IO_FILE *) stderr)->_flags2 = old_flags2; -- _IO_funlockfile (stderr); -+ This distinction seems to be the most useful approach. */ -+ if (long_only && (argv[d->optind][2] -+ || !strchr (optstring, argv[d->optind][1]))) -+ { -+ int code; -+ d->__nextchar = argv[d->optind] + 1; -+ code = process_long_option (argc, argv, optstring, longopts, -+ longind, long_only, d, -+ print_errors, "-"); -+ if (code != -1) -+ return code; -+ } -+ } - -- free (buf); -- } --#endif -- } -- d->__nextchar = (char *) ""; -- d->optind++; -- d->optopt = 0; -- return '?'; -- } -+ /* It is not a long option. Skip the initial punctuation. */ -+ d->__nextchar = argv[d->optind] + 1; - } - - /* Look at and handle the next short option-character. */ -@@ -824,331 +617,83 @@ - - if (temp == NULL || c == ':' || c == ';') - { -- if (print_errors) -- { --#if defined _LIBC && defined USE_IN_LIBIO -- char *buf; -- int n; --#endif -- --#if defined _LIBC && defined USE_IN_LIBIO -- n = __asprintf (&buf, _("%s: invalid option -- '%c'\n"), -- argv[0], c); --#else -- fprintf (stderr, _("%s: invalid option -- '%c'\n"), argv[0], c); --#endif -- --#if defined _LIBC && defined USE_IN_LIBIO -- if (n >= 0) -- { -- _IO_flockfile (stderr); -- -- int old_flags2 = ((_IO_FILE *) stderr)->_flags2; -- ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; -- -- __fxprintf (NULL, "%s", buf); -- -- ((_IO_FILE *) stderr)->_flags2 = old_flags2; -- _IO_funlockfile (stderr); -- -- free (buf); -- } --#endif -- } -- d->optopt = c; -- return '?'; -+ if (print_errors) -+ fprintf (stderr, _("%s: invalid option -- '%c'\n"), argv[0], c); -+ d->optopt = c; -+ return '?'; - } -+ - /* Convenience. Treat POSIX -W foo same as long option --foo */ -- if (temp[0] == 'W' && temp[1] == ';') -+ if (temp[0] == 'W' && temp[1] == ';' && longopts != NULL) - { -- char *nameend; -- const struct option *p; -- const struct option *pfound = NULL; -- int exact = 0; -- int ambig = 0; -- int indfound = 0; -- int option_index; -- -- if (longopts == NULL) -- goto no_longs; -- -- /* This is an option that requires an argument. */ -- if (*d->__nextchar != '\0') -- { -- d->optarg = d->__nextchar; -- /* If we end this ARGV-element by taking the rest as an arg, -- we must advance to the next element now. */ -- d->optind++; -- } -- else if (d->optind == argc) -- { -- if (print_errors) -- { --#if defined _LIBC && defined USE_IN_LIBIO -- char *buf; -- -- if (__asprintf (&buf, -- _("%s: option requires an argument -- '%c'\n"), -- argv[0], c) >= 0) -- { -- _IO_flockfile (stderr); -- -- int old_flags2 = ((_IO_FILE *) stderr)->_flags2; -- ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; -- -- __fxprintf (NULL, "%s", buf); -- -- ((_IO_FILE *) stderr)->_flags2 = old_flags2; -- _IO_funlockfile (stderr); -- -- free (buf); -- } --#else -- fprintf (stderr, -- _("%s: option requires an argument -- '%c'\n"), -- argv[0], c); --#endif -- } -- d->optopt = c; -- if (optstring[0] == ':') -- c = ':'; -- else -- c = '?'; -- return c; -- } -- else -- /* We already incremented 'd->optind' once; -- increment it again when taking next ARGV-elt as argument. */ -- d->optarg = argv[d->optind++]; -- -- /* optarg is now the argument, see if it's in the -- table of longopts. */ -- -- for (d->__nextchar = nameend = d->optarg; *nameend && *nameend != '='; -- nameend++) -- /* Do nothing. */ ; -- -- /* Test all long options for either exact match -- or abbreviated matches. */ -- for (p = longopts, option_index = 0; p->name; p++, option_index++) -- if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar)) -- { -- if ((unsigned int) (nameend - d->__nextchar) == strlen (p->name)) -- { -- /* Exact match found. */ -- pfound = p; -- indfound = option_index; -- exact = 1; -- break; -- } -- else if (pfound == NULL) -- { -- /* First nonexact match found. */ -- pfound = p; -- indfound = option_index; -- } -- else if (long_only -- || pfound->has_arg != p->has_arg -- || pfound->flag != p->flag -- || pfound->val != p->val) -- /* Second or later nonexact match found. */ -- ambig = 1; -- } -- if (ambig && !exact) -- { -- if (print_errors) -- { --#if defined _LIBC && defined USE_IN_LIBIO -- char *buf; -- -- if (__asprintf (&buf, _("%s: option '-W %s' is ambiguous\n"), -- argv[0], d->optarg) >= 0) -- { -- _IO_flockfile (stderr); -- -- int old_flags2 = ((_IO_FILE *) stderr)->_flags2; -- ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; -- -- __fxprintf (NULL, "%s", buf); -- -- ((_IO_FILE *) stderr)->_flags2 = old_flags2; -- _IO_funlockfile (stderr); -- -- free (buf); -- } --#else -- fprintf (stderr, _("%s: option '-W %s' is ambiguous\n"), -- argv[0], d->optarg); --#endif -- } -- d->__nextchar += strlen (d->__nextchar); -- d->optind++; -- return '?'; -- } -- if (pfound != NULL) -- { -- option_index = indfound; -- if (*nameend) -- { -- /* Don't test has_arg with >, because some C compilers don't -- allow it to be used on enums. */ -- if (pfound->has_arg) -- d->optarg = nameend + 1; -- else -- { -- if (print_errors) -- { --#if defined _LIBC && defined USE_IN_LIBIO -- char *buf; -- -- if (__asprintf (&buf, _("\ --%s: option '-W %s' doesn't allow an argument\n"), -- argv[0], pfound->name) >= 0) -- { -- _IO_flockfile (stderr); -- -- int old_flags2 = ((_IO_FILE *) stderr)->_flags2; -- ((_IO_FILE *) stderr)->_flags2 -- |= _IO_FLAGS2_NOTCANCEL; -- -- __fxprintf (NULL, "%s", buf); -- -- ((_IO_FILE *) stderr)->_flags2 = old_flags2; -- _IO_funlockfile (stderr); -- -- free (buf); -- } --#else -- fprintf (stderr, _("\ --%s: option '-W %s' doesn't allow an argument\n"), -- argv[0], pfound->name); --#endif -- } -- -- d->__nextchar += strlen (d->__nextchar); -- return '?'; -- } -- } -- else if (pfound->has_arg == 1) -- { -- if (d->optind < argc) -- d->optarg = argv[d->optind++]; -- else -- { -- if (print_errors) -- { --#if defined _LIBC && defined USE_IN_LIBIO -- char *buf; -- -- if (__asprintf (&buf, _("\ --%s: option '-W %s' requires an argument\n"), -- argv[0], pfound->name) >= 0) -- { -- _IO_flockfile (stderr); -- -- int old_flags2 = ((_IO_FILE *) stderr)->_flags2; -- ((_IO_FILE *) stderr)->_flags2 -- |= _IO_FLAGS2_NOTCANCEL; -- -- __fxprintf (NULL, "%s", buf); -- -- ((_IO_FILE *) stderr)->_flags2 = old_flags2; -- _IO_funlockfile (stderr); -+ /* This is an option that requires an argument. */ -+ if (*d->__nextchar != '\0') -+ d->optarg = d->__nextchar; -+ else if (d->optind == argc) -+ { -+ if (print_errors) -+ fprintf (stderr, -+ _("%s: option requires an argument -- '%c'\n"), -+ argv[0], c); - -- free (buf); -- } --#else -- fprintf (stderr, _("\ --%s: option '-W %s' requires an argument\n"), -- argv[0], pfound->name); --#endif -- } -- d->__nextchar += strlen (d->__nextchar); -- return optstring[0] == ':' ? ':' : '?'; -- } -- } -- else -- d->optarg = NULL; -- d->__nextchar += strlen (d->__nextchar); -- if (longind != NULL) -- *longind = option_index; -- if (pfound->flag) -- { -- *(pfound->flag) = pfound->val; -- return 0; -- } -- return pfound->val; -- } -+ d->optopt = c; -+ if (optstring[0] == ':') -+ c = ':'; -+ else -+ c = '?'; -+ return c; -+ } -+ else -+ d->optarg = argv[d->optind]; - -- no_longs: -- d->__nextchar = NULL; -- return 'W'; /* Let the application handle it. */ -+ d->__nextchar = d->optarg; -+ d->optarg = NULL; -+ return process_long_option (argc, argv, optstring, longopts, longind, -+ 0 /* long_only */, d, print_errors, "-W "); - } - if (temp[1] == ':') - { -- if (temp[2] == ':') -- { -- /* This is an option that accepts an argument optionally. */ -- if (*d->__nextchar != '\0') -- { -- d->optarg = d->__nextchar; -- d->optind++; -- } -- else -- d->optarg = NULL; -- d->__nextchar = NULL; -- } -- else -- { -- /* This is an option that requires an argument. */ -- if (*d->__nextchar != '\0') -- { -- d->optarg = d->__nextchar; -- /* If we end this ARGV-element by taking the rest as an arg, -- we must advance to the next element now. */ -- d->optind++; -- } -- else if (d->optind == argc) -- { -- if (print_errors) -- { --#if defined _LIBC && defined USE_IN_LIBIO -- char *buf; -- -- if (__asprintf (&buf, _("\ --%s: option requires an argument -- '%c'\n"), -- argv[0], c) >= 0) -- { -- _IO_flockfile (stderr); -- -- int old_flags2 = ((_IO_FILE *) stderr)->_flags2; -- ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; -- -- __fxprintf (NULL, "%s", buf); -- -- ((_IO_FILE *) stderr)->_flags2 = old_flags2; -- _IO_funlockfile (stderr); -+ if (temp[2] == ':') -+ { -+ /* This is an option that accepts an argument optionally. */ -+ if (*d->__nextchar != '\0') -+ { -+ d->optarg = d->__nextchar; -+ d->optind++; -+ } -+ else -+ d->optarg = NULL; -+ d->__nextchar = NULL; -+ } -+ else -+ { -+ /* This is an option that requires an argument. */ -+ if (*d->__nextchar != '\0') -+ { -+ d->optarg = d->__nextchar; -+ /* If we end this ARGV-element by taking the rest as an arg, -+ we must advance to the next element now. */ -+ d->optind++; -+ } -+ else if (d->optind == argc) -+ { -+ if (print_errors) -+ fprintf (stderr, -+ _("%s: option requires an argument -- '%c'\n"), -+ argv[0], c); - -- free (buf); -- } --#else -- fprintf (stderr, -- _("%s: option requires an argument -- '%c'\n"), -- argv[0], c); --#endif -- } -- d->optopt = c; -- if (optstring[0] == ':') -- c = ':'; -- else -- c = '?'; -- } -- else -- /* We already incremented 'optind' once; -- increment it again when taking next ARGV-elt as argument. */ -- d->optarg = argv[d->optind++]; -- d->__nextchar = NULL; -- } -+ d->optopt = c; -+ if (optstring[0] == ':') -+ c = ':'; -+ else -+ c = '?'; -+ } -+ else -+ /* We already incremented 'optind' once; -+ increment it again when taking next ARGV-elt as argument. */ -+ d->optarg = argv[d->optind++]; -+ d->__nextchar = NULL; -+ } - } - return c; - } -@@ -1156,8 +701,8 @@ - - int - _getopt_internal (int argc, char **argv, const char *optstring, -- const struct option *longopts, int *longind, int long_only, -- int posixly_correct) -+ const struct option *longopts, int *longind, int long_only, -+ int posixly_correct) - { - int result; - -@@ -1165,8 +710,8 @@ - getopt_data.opterr = opterr; - - result = _getopt_internal_r (argc, argv, optstring, longopts, -- longind, long_only, &getopt_data, -- posixly_correct); -+ longind, long_only, &getopt_data, -+ posixly_correct); - - optind = getopt_data.optind; - optarg = getopt_data.optarg; -@@ -1175,32 +720,23 @@ - return result; - } - --/* glibc gets a LSB-compliant getopt. -- Standalone applications get a POSIX-compliant getopt. */ --#if _LIBC --enum { POSIXLY_CORRECT = 0 }; --#else --enum { POSIXLY_CORRECT = 1 }; --#endif -- --int --getopt (int argc, char *const *argv, const char *optstring) --{ -- return _getopt_internal (argc, (char **) argv, optstring, -- (const struct option *) 0, -- (int *) 0, -- 0, POSIXLY_CORRECT); --} -+/* glibc gets a LSB-compliant getopt and a POSIX-complaint __posix_getopt. -+ Standalone applications just get a POSIX-compliant getopt. -+ POSIX and LSB both require these functions to take 'char *const *argv' -+ even though this is incorrect (because of the permutation). */ -+#define GETOPT_ENTRY(NAME, POSIXLY_CORRECT) \ -+ int \ -+ NAME (int argc, char *const *argv, const char *optstring) \ -+ { \ -+ return _getopt_internal (argc, (char **)argv, optstring, \ -+ 0, 0, 0, POSIXLY_CORRECT); \ -+ } - - #ifdef _LIBC --int --__posix_getopt (int argc, char *const *argv, const char *optstring) --{ -- return _getopt_internal (argc, argv, optstring, -- (const struct option *) 0, -- (int *) 0, -- 0, 1); --} -+GETOPT_ENTRY(getopt, 0) -+GETOPT_ENTRY(__posix_getopt, 1) -+#else -+GETOPT_ENTRY(getopt, 1) - #endif - - -@@ -1221,51 +757,51 @@ - - c = getopt (argc, argv, "abc:d:0123456789"); - if (c == -1) -- break; -+ break; - - switch (c) -- { -- case '0': -- case '1': -- case '2': -- case '3': -- case '4': -- case '5': -- case '6': -- case '7': -- case '8': -- case '9': -- if (digit_optind != 0 && digit_optind != this_option_optind) -- printf ("digits occur in two different argv-elements.\n"); -- digit_optind = this_option_optind; -- printf ("option %c\n", c); -- break; -+ { -+ case '0': -+ case '1': -+ case '2': -+ case '3': -+ case '4': -+ case '5': -+ case '6': -+ case '7': -+ case '8': -+ case '9': -+ if (digit_optind != 0 && digit_optind != this_option_optind) -+ printf ("digits occur in two different argv-elements.\n"); -+ digit_optind = this_option_optind; -+ printf ("option %c\n", c); -+ break; - -- case 'a': -- printf ("option a\n"); -- break; -+ case 'a': -+ printf ("option a\n"); -+ break; - -- case 'b': -- printf ("option b\n"); -- break; -+ case 'b': -+ printf ("option b\n"); -+ break; - -- case 'c': -- printf ("option c with value '%s'\n", optarg); -- break; -+ case 'c': -+ printf ("option c with value '%s'\n", optarg); -+ break; - -- case '?': -- break; -+ case '?': -+ break; - -- default: -- printf ("?? getopt returned character code 0%o ??\n", c); -- } -+ default: -+ printf ("?? getopt returned character code 0%o ??\n", c); -+ } - } - - if (optind < argc) - { - printf ("non-option ARGV-elements: "); - while (optind < argc) -- printf ("%s ", argv[optind++]); -+ printf ("%s ", argv[optind++]); - printf ("\n"); - } - -diff -durN inetutils-1.9.4.orig/lib/getopt.in.h inetutils-1.9.4/lib/getopt.in.h ---- inetutils-1.9.4.orig/lib/getopt.in.h 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/getopt.in.h 2017-05-15 17:51:13.078125000 +0800 -@@ -1,20 +1,22 @@ - /* Declarations for getopt. -- Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2015 Free Software -- Foundation, Inc. -- This file is part of the GNU C Library. -+ Copyright (C) 1989-2017 Free Software Foundation, Inc. -+ This file is part of gnulib. -+ Unlike most of the getopt implementation, it is NOT shared -+ with the GNU C Library, which supplies a different version of -+ this file. - -- 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 3 of the License, or -- (at your option) any later version. -+ gnulib 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 3 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. -+ gnulib 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, see . */ -+ You should have received a copy of the GNU General Public -+ License along with gnulib; if not, see . */ - - #ifndef _@GUARD_PREFIX@_GETOPT_H - -@@ -32,22 +34,15 @@ - # undef _GL_SYSTEM_GETOPT - #endif - --#ifndef _@GUARD_PREFIX@_GETOPT_H -- --#ifndef __need_getopt --# define _@GUARD_PREFIX@_GETOPT_H 1 --#endif -+#define _@GUARD_PREFIX@_GETOPT_H 1 - - /* Standalone applications should #define __GETOPT_PREFIX to an - identifier that prefixes the external functions and variables -- defined in this header. When this happens, include the -- headers that might declare getopt so that they will not cause -- confusion if included after this file (if the system had , -- we have already included it). Then systematically rename -- identifiers so that they do not collide with the system functions -- and variables. Renaming avoids problems with some compilers and -- linkers. */ --#if defined __GETOPT_PREFIX && !defined __need_getopt -+ defined in getopt-core.h and getopt-ext.h. When this happens, -+ include the headers that might declare getopt so that they will not -+ cause confusion if included after this file (if the system had -+ , we have already included it). */ -+#if defined __GETOPT_PREFIX - # if !@HAVE_GETOPT_H@ - # define __need_system_stdlib_h - # include -@@ -55,201 +50,12 @@ - # include - # include - # endif --# undef __need_getopt --# undef getopt --# undef getopt_long --# undef getopt_long_only --# undef optarg --# undef opterr --# undef optind --# undef optopt --# undef option --# define __GETOPT_CONCAT(x, y) x ## y --# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y) --# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y) --# define getopt __GETOPT_ID (getopt) --# define getopt_long __GETOPT_ID (getopt_long) --# define getopt_long_only __GETOPT_ID (getopt_long_only) --# define optarg __GETOPT_ID (optarg) --# define opterr __GETOPT_ID (opterr) --# define optind __GETOPT_ID (optind) --# define optopt __GETOPT_ID (optopt) --# define option __GETOPT_ID (option) --# define _getopt_internal __GETOPT_ID (getopt_internal) --#endif -- --/* Standalone applications get correct prototypes for getopt_long and -- getopt_long_only; they declare "char **argv". libc uses prototypes -- with "char *const *argv" that are incorrect because getopt_long and -- getopt_long_only can permute argv; this is required for backward -- compatibility (e.g., for LSB 2.0.1). -- -- This used to be '#if defined __GETOPT_PREFIX && !defined __need_getopt', -- but it caused redefinition warnings if both unistd.h and getopt.h were -- included, since unistd.h includes getopt.h having previously defined -- __need_getopt. -- -- The only place where __getopt_argv_const is used is in definitions -- of getopt_long and getopt_long_only below, but these are visible -- only if __need_getopt is not defined, so it is quite safe to rewrite -- the conditional as follows: --*/ --#if !defined __need_getopt --# if defined __GETOPT_PREFIX --# define __getopt_argv_const /* empty */ --# else --# define __getopt_argv_const const --# endif --#endif -- --/* If __GNU_LIBRARY__ is not already defined, either we are being used -- standalone, or this is the first header included in the source file. -- If we are being used with glibc, we need to include , but -- that does not exist if we are standalone. So: if __GNU_LIBRARY__ is -- not defined, include , which will pull in for us -- if it's from glibc. (Why ctype.h? It's guaranteed to exist and it -- doesn't flood the namespace with stuff the way some other headers do.) */ --#if !defined __GNU_LIBRARY__ --# include --#endif -- --#ifndef __THROW --# ifndef __GNUC_PREREQ --# define __GNUC_PREREQ(maj, min) (0) --# endif --# if defined __cplusplus && __GNUC_PREREQ (2,8) --# define __THROW throw () --# else --# define __THROW --# endif - #endif - - /* The definition of _GL_ARG_NONNULL is copied here. */ - --#ifdef __cplusplus --extern "C" { --#endif -- --/* For communication from 'getopt' to the caller. -- When 'getopt' finds an option that takes an argument, -- the argument value is returned here. -- Also, when 'ordering' is RETURN_IN_ORDER, -- each non-option ARGV-element is returned here. */ -- --extern char *optarg; -- --/* Index in ARGV of the next element to be scanned. -- This is used for communication to and from the caller -- and for communication between successive calls to 'getopt'. -- -- On entry to 'getopt', zero means this is the first call; initialize. -- -- When 'getopt' returns -1, this is the index of the first of the -- non-option elements that the caller should itself scan. -- -- Otherwise, 'optind' communicates from one call to the next -- how much of ARGV has been scanned so far. */ -- --extern int optind; -- --/* Callers store zero here to inhibit the error message 'getopt' prints -- for unrecognized options. */ -- --extern int opterr; -- --/* Set to an option character which was unrecognized. */ -- --extern int optopt; -- --#ifndef __need_getopt --/* Describe the long-named options requested by the application. -- The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector -- of 'struct option' terminated by an element containing a name which is -- zero. -- -- The field 'has_arg' is: -- no_argument (or 0) if the option does not take an argument, -- required_argument (or 1) if the option requires an argument, -- optional_argument (or 2) if the option takes an optional argument. -- -- If the field 'flag' is not NULL, it points to a variable that is set -- to the value given in the field 'val' when the option is found, but -- left unchanged if the option is not found. -- -- To have a long-named option do something other than set an 'int' to -- a compiled-in constant, such as set a value from 'optarg', set the -- option's 'flag' field to zero and its 'val' field to a nonzero -- value (the equivalent single-letter option character, if there is -- one). For long options that have a zero 'flag' field, 'getopt' -- returns the contents of the 'val' field. */ -- --# if !GNULIB_defined_struct_option --struct option --{ -- const char *name; -- /* has_arg can't be an enum because some compilers complain about -- type mismatches in all the code that assumes it is an int. */ -- int has_arg; -- int *flag; -- int val; --}; --# define GNULIB_defined_struct_option 1 --# endif -- --/* Names for the values of the 'has_arg' field of 'struct option'. */ -- --# define no_argument 0 --# define required_argument 1 --# define optional_argument 2 --#endif /* need getopt */ -- -- --/* Get definitions and prototypes for functions to process the -- arguments in ARGV (ARGC of them, minus the program name) for -- options given in OPTS. -- -- Return the option character from OPTS just read. Return -1 when -- there are no more options. For unrecognized options, or options -- missing arguments, 'optopt' is set to the option letter, and '?' is -- returned. -- -- The OPTS string is a list of characters which are recognized option -- letters, optionally followed by colons, specifying that that letter -- takes an argument, to be placed in 'optarg'. -- -- If a letter in OPTS is followed by two colons, its argument is -- optional. This behavior is specific to the GNU 'getopt'. -- -- The argument '--' causes premature termination of argument -- scanning, explicitly telling 'getopt' that there are no more -- options. -- -- If OPTS begins with '-', then non-option arguments are treated as -- arguments to the option '\1'. This behavior is specific to the GNU -- 'getopt'. If OPTS begins with '+', or POSIXLY_CORRECT is set in -- the environment, then do not permute arguments. */ -- --extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) -- __THROW _GL_ARG_NONNULL ((2, 3)); -- --#ifndef __need_getopt --extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv, -- const char *__shortopts, -- const struct option *__longopts, int *__longind) -- __THROW _GL_ARG_NONNULL ((2, 3)); --extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv, -- const char *__shortopts, -- const struct option *__longopts, int *__longind) -- __THROW _GL_ARG_NONNULL ((2, 3)); -- --#endif -- --#ifdef __cplusplus --} --#endif -- --/* Make sure we later can get all the definitions and declarations. */ --#undef __need_getopt -+#include -+#include -+#include - - #endif /* _@GUARD_PREFIX@_GETOPT_H */ --#endif /* _@GUARD_PREFIX@_GETOPT_H */ -diff -durN inetutils-1.9.4.orig/lib/getopt_int.h inetutils-1.9.4/lib/getopt_int.h ---- inetutils-1.9.4.orig/lib/getopt_int.h 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/getopt_int.h 2017-05-15 17:51:13.390625000 +0800 -@@ -1,30 +1,31 @@ - /* Internal declarations for getopt. -- Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2015 Free Software -- Foundation, Inc. -- This file is part of the GNU C Library. -+ Copyright (C) 1989-2017 Free Software Foundation, Inc. -+ This file is part of the GNU C Library and is also part of gnulib. -+ Patches to this file should be submitted to both projects. - -- 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 3 of the License, or -- (at your option) any later version. -+ The GNU C Library 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 3 of the License, or (at your option) any later version. - -- This program is distributed in the hope that it will be useful, -+ The GNU C Library 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. -+ 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, see . */ -+ You should have received a copy of the GNU General Public -+ License along with the GNU C Library; if not, see -+ . */ - - #ifndef _GETOPT_INT_H --#define _GETOPT_INT_H 1 -+#define _GETOPT_INT_H 1 - - #include - - extern int _getopt_internal (int ___argc, char **___argv, -- const char *__shortopts, -- const struct option *__longopts, int *__longind, -- int __long_only, int __posixly_correct); -+ const char *__shortopts, -+ const struct option *__longopts, int *__longind, -+ int __long_only, int __posixly_correct); - - - /* Reentrant versions which can handle parsing multiple argument -@@ -32,28 +33,20 @@ - - /* Describe how to deal with options that follow non-option ARGV-elements. - -- If the caller did not specify anything, -- the default is REQUIRE_ORDER if the environment variable -- POSIXLY_CORRECT is defined, PERMUTE otherwise. -- -- REQUIRE_ORDER means don't recognize them as options; -- stop option processing when the first non-option is seen. -- This is what Unix does. -- This mode of operation is selected by either setting the environment -- variable POSIXLY_CORRECT, or using '+' as the first character -- of the list of option characters, or by calling getopt. -+ REQUIRE_ORDER means don't recognize them as options; stop option -+ processing when the first non-option is seen. This is what POSIX -+ specifies should happen. - -- PERMUTE is the default. We permute the contents of ARGV as we -- scan, so that eventually all the non-options are at the end. -- This allows options to be given in any order, even with programs -- that were not written to expect this. -+ PERMUTE means permute the contents of ARGV as we scan, so that -+ eventually all the non-options are at the end. This allows options -+ to be given in any order, even with programs that were not written -+ to expect this. - - RETURN_IN_ORDER is an option available to programs that were - written to expect options and other ARGV-elements in any order - and that care about the ordering of the two. We describe each - non-option ARGV-element as if it were the argument of an option -- with character code 1. Using '-' as the first character of the -- list of option characters selects this mode of operation. -+ with character code 1. - - The special argument '--' forces an end of option-scanning regardless - of the value of 'ordering'. In the case of RETURN_IN_ORDER, only -@@ -91,11 +84,6 @@ - /* See __ord above. */ - enum __ord __ordering; - -- /* If the POSIXLY_CORRECT environment variable is set -- or getopt was called. */ -- int __posixly_correct; -- -- - /* Handle permutation of arguments. */ - - /* Describe the part of ARGV that contains non-options that have -@@ -104,32 +92,27 @@ - - int __first_nonopt; - int __last_nonopt; -- --#if defined _LIBC && defined USE_NONOPTION_FLAGS -- int __nonoption_flags_max_len; -- int __nonoption_flags_len; --#endif - }; - - /* The initializer is necessary to set OPTIND and OPTERR to their - default values and to clear the initialization flag. */ --#define _GETOPT_DATA_INITIALIZER { 1, 1 } -+#define _GETOPT_DATA_INITIALIZER { 1, 1 } - - extern int _getopt_internal_r (int ___argc, char **___argv, -- const char *__shortopts, -- const struct option *__longopts, int *__longind, -- int __long_only, struct _getopt_data *__data, -- int __posixly_correct); -+ const char *__shortopts, -+ const struct option *__longopts, int *__longind, -+ int __long_only, struct _getopt_data *__data, -+ int __posixly_correct); - - extern int _getopt_long_r (int ___argc, char **___argv, -- const char *__shortopts, -- const struct option *__longopts, int *__longind, -- struct _getopt_data *__data); -+ const char *__shortopts, -+ const struct option *__longopts, int *__longind, -+ struct _getopt_data *__data); - - extern int _getopt_long_only_r (int ___argc, char **___argv, -- const char *__shortopts, -- const struct option *__longopts, -- int *__longind, -- struct _getopt_data *__data); -+ const char *__shortopts, -+ const struct option *__longopts, -+ int *__longind, -+ struct _getopt_data *__data); - - #endif /* getopt_int.h */ -diff -durN inetutils-1.9.4.orig/lib/getopt1.c inetutils-1.9.4/lib/getopt1.c ---- inetutils-1.9.4.orig/lib/getopt1.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/getopt1.c 2017-05-15 17:51:13.218750000 +0800 -@@ -1,56 +1,44 @@ - /* getopt_long and getopt_long_only entry points for GNU getopt. -- Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2015 Free Software -- Foundation, Inc. -- This file is part of the GNU C Library. -+ Copyright (C) 1987-2017 Free Software Foundation, Inc. -+ This file is part of the GNU C Library and is also part of gnulib. -+ Patches to this file should be submitted to both projects. - -- 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 3 of the License, or -- (at your option) any later version. -+ The GNU C Library 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 3 of the License, or (at your option) any later version. - -- This program is distributed in the hope that it will be useful, -+ The GNU C Library 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. -+ 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, see . */ -+ You should have received a copy of the GNU General Public -+ License along with the GNU C Library; if not, see -+ . */ - --#ifdef _LIBC --# include --#else -+#ifndef _LIBC - # include --# include "getopt.h" - #endif --#include "getopt_int.h" - --#include -- --/* This needs to come after some library #include -- to get __GNU_LIBRARY__ defined. */ --#ifdef __GNU_LIBRARY__ --#include --#endif -- --#ifndef NULL --#define NULL 0 --#endif -+#include "getopt.h" -+#include "getopt_int.h" - - int - getopt_long (int argc, char *__getopt_argv_const *argv, const char *options, -- const struct option *long_options, int *opt_index) -+ const struct option *long_options, int *opt_index) - { - return _getopt_internal (argc, (char **) argv, options, long_options, -- opt_index, 0, 0); -+ opt_index, 0, 0); - } - - int - _getopt_long_r (int argc, char **argv, const char *options, -- const struct option *long_options, int *opt_index, -- struct _getopt_data *d) -+ const struct option *long_options, int *opt_index, -+ struct _getopt_data *d) - { - return _getopt_internal_r (argc, argv, options, long_options, opt_index, -- 0, d, 0); -+ 0, d, 0); - } - - /* Like getopt_long, but '-' as well as '--' can indicate a long option. -@@ -60,26 +48,27 @@ - - int - getopt_long_only (int argc, char *__getopt_argv_const *argv, -- const char *options, -- const struct option *long_options, int *opt_index) -+ const char *options, -+ const struct option *long_options, int *opt_index) - { - return _getopt_internal (argc, (char **) argv, options, long_options, -- opt_index, 1, 0); -+ opt_index, 1, 0); - } - - int - _getopt_long_only_r (int argc, char **argv, const char *options, -- const struct option *long_options, int *opt_index, -- struct _getopt_data *d) -+ const struct option *long_options, int *opt_index, -+ struct _getopt_data *d) - { - return _getopt_internal_r (argc, argv, options, long_options, opt_index, -- 1, d, 0); -+ 1, d, 0); - } - - - #ifdef TEST - - #include -+#include - - int - main (int argc, char **argv) -@@ -93,74 +82,74 @@ - int option_index = 0; - static const struct option long_options[] = - { -- {"add", 1, 0, 0}, -- {"append", 0, 0, 0}, -- {"delete", 1, 0, 0}, -- {"verbose", 0, 0, 0}, -- {"create", 0, 0, 0}, -- {"file", 1, 0, 0}, -- {0, 0, 0, 0} -+ {"add", 1, 0, 0}, -+ {"append", 0, 0, 0}, -+ {"delete", 1, 0, 0}, -+ {"verbose", 0, 0, 0}, -+ {"create", 0, 0, 0}, -+ {"file", 1, 0, 0}, -+ {0, 0, 0, 0} - }; - - c = getopt_long (argc, argv, "abc:d:0123456789", -- long_options, &option_index); -+ long_options, &option_index); - if (c == -1) -- break; -+ break; - - switch (c) -- { -- case 0: -- printf ("option %s", long_options[option_index].name); -- if (optarg) -- printf (" with arg %s", optarg); -- printf ("\n"); -- break; -+ { -+ case 0: -+ printf ("option %s", long_options[option_index].name); -+ if (optarg) -+ printf (" with arg %s", optarg); -+ printf ("\n"); -+ break; - -- case '0': -- case '1': -- case '2': -- case '3': -- case '4': -- case '5': -- case '6': -- case '7': -- case '8': -- case '9': -- if (digit_optind != 0 && digit_optind != this_option_optind) -- printf ("digits occur in two different argv-elements.\n"); -- digit_optind = this_option_optind; -- printf ("option %c\n", c); -- break; -+ case '0': -+ case '1': -+ case '2': -+ case '3': -+ case '4': -+ case '5': -+ case '6': -+ case '7': -+ case '8': -+ case '9': -+ if (digit_optind != 0 && digit_optind != this_option_optind) -+ printf ("digits occur in two different argv-elements.\n"); -+ digit_optind = this_option_optind; -+ printf ("option %c\n", c); -+ break; - -- case 'a': -- printf ("option a\n"); -- break; -+ case 'a': -+ printf ("option a\n"); -+ break; - -- case 'b': -- printf ("option b\n"); -- break; -+ case 'b': -+ printf ("option b\n"); -+ break; - -- case 'c': -- printf ("option c with value '%s'\n", optarg); -- break; -+ case 'c': -+ printf ("option c with value '%s'\n", optarg); -+ break; - -- case 'd': -- printf ("option d with value '%s'\n", optarg); -- break; -+ case 'd': -+ printf ("option d with value '%s'\n", optarg); -+ break; - -- case '?': -- break; -+ case '?': -+ break; - -- default: -- printf ("?? getopt returned character code 0%o ??\n", c); -- } -+ default: -+ printf ("?? getopt returned character code 0%o ??\n", c); -+ } - } - - if (optind < argc) - { - printf ("non-option ARGV-elements: "); - while (optind < argc) -- printf ("%s ", argv[optind++]); -+ printf ("%s ", argv[optind++]); - printf ("\n"); - } - -diff -durN inetutils-1.9.4.orig/lib/getopt-cdefs.in.h inetutils-1.9.4/lib/getopt-cdefs.in.h ---- inetutils-1.9.4.orig/lib/getopt-cdefs.in.h 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/lib/getopt-cdefs.in.h 2017-05-15 17:51:12.125000000 +0800 -@@ -0,0 +1,67 @@ -+/* getopt-on-non-glibc compatibility macros. -+ Copyright (C) 1989-2017 Free Software Foundation, Inc. -+ This file is part of gnulib. -+ Unlike most of the getopt implementation, it is NOT shared -+ with the GNU C Library. -+ -+ gnulib 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 3 of -+ the License, or (at your option) any later version. -+ -+ gnulib 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 gnulib; if not, see -+ . */ -+ -+#ifndef _GETOPT_CDEFS_H -+#define _GETOPT_CDEFS_H 1 -+ -+/* This header should not be used directly; include getopt.h or -+ unistd.h instead. It does not have a protective #error, because -+ the guard macro for getopt.h in gnulib is not fixed. */ -+ -+/* getopt-core.h and getopt-ext.h are shared with GNU libc, and expect -+ a number of the internal macros supplied to GNU libc's headers by -+ sys/cdefs.h. Provide fallback definitions for all of them. */ -+#if @HAVE_SYS_CDEFS_H@ -+# include -+#endif -+ -+#ifndef __BEGIN_DECLS -+# ifdef __cplusplus -+# define __BEGIN_DECLS extern "C" { -+# else -+# define __BEGIN_DECLS /* nothing */ -+# endif -+#endif -+#ifndef __END_DECLS -+# ifdef __cplusplus -+# define __END_DECLS } -+# else -+# define __END_DECLS /* nothing */ -+# endif -+#endif -+ -+#ifndef __GNUC_PREREQ -+# if defined __GNUC__ && defined __GNUC_VERSION__ -+# define __GNUC_PREREQ(maj, min) \ -+ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) -+# else -+# define __GNUC_PREREQ(maj, min) 0 -+# endif -+#endif -+ -+#ifndef __THROW -+# if defined __cplusplus && __GNUC_PREREQ (2,8) -+# define __THROW throw () -+# else -+# define __THROW -+# endif -+#endif -+ -+#endif /* _GETOPT_CDEFS_H */ -diff -durN inetutils-1.9.4.orig/lib/getopt-core.h inetutils-1.9.4/lib/getopt-core.h ---- inetutils-1.9.4.orig/lib/getopt-core.h 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/lib/getopt-core.h 2017-05-15 17:51:12.296875000 +0800 -@@ -0,0 +1,96 @@ -+/* Declarations for getopt (basic, portable features only). -+ Copyright (C) 1989-2017 Free Software Foundation, Inc. -+ This file is part of the GNU C Library and is also part of gnulib. -+ Patches to this file should be submitted to both projects. -+ -+ The GNU C Library 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 3 of the License, or (at your option) any later version. -+ -+ The GNU C Library 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 the GNU C Library; if not, see -+ . */ -+ -+#ifndef _GETOPT_CORE_H -+#define _GETOPT_CORE_H 1 -+ -+/* This header should not be used directly; include getopt.h or -+ unistd.h instead. Unlike most bits headers, it does not have -+ a protective #error, because the guard macro for getopt.h in -+ gnulib is not fixed. */ -+ -+__BEGIN_DECLS -+ -+/* For communication from 'getopt' to the caller. -+ When 'getopt' finds an option that takes an argument, -+ the argument value is returned here. -+ Also, when 'ordering' is RETURN_IN_ORDER, -+ each non-option ARGV-element is returned here. */ -+ -+extern char *optarg; -+ -+/* Index in ARGV of the next element to be scanned. -+ This is used for communication to and from the caller -+ and for communication between successive calls to 'getopt'. -+ -+ On entry to 'getopt', zero means this is the first call; initialize. -+ -+ When 'getopt' returns -1, this is the index of the first of the -+ non-option elements that the caller should itself scan. -+ -+ Otherwise, 'optind' communicates from one call to the next -+ how much of ARGV has been scanned so far. */ -+ -+extern int optind; -+ -+/* Callers store zero here to inhibit the error message 'getopt' prints -+ for unrecognized options. */ -+ -+extern int opterr; -+ -+/* Set to an option character which was unrecognized. */ -+ -+extern int optopt; -+ -+/* Get definitions and prototypes for functions to process the -+ arguments in ARGV (ARGC of them, minus the program name) for -+ options given in OPTS. -+ -+ Return the option character from OPTS just read. Return -1 when -+ there are no more options. For unrecognized options, or options -+ missing arguments, 'optopt' is set to the option letter, and '?' is -+ returned. -+ -+ The OPTS string is a list of characters which are recognized option -+ letters, optionally followed by colons, specifying that that letter -+ takes an argument, to be placed in 'optarg'. -+ -+ If a letter in OPTS is followed by two colons, its argument is -+ optional. This behavior is specific to the GNU 'getopt'. -+ -+ The argument '--' causes premature termination of argument -+ scanning, explicitly telling 'getopt' that there are no more -+ options. -+ -+ If OPTS begins with '-', then non-option arguments are treated as -+ arguments to the option '\1'. This behavior is specific to the GNU -+ 'getopt'. If OPTS begins with '+', or POSIXLY_CORRECT is set in -+ the environment, then do not permute arguments. -+ -+ For standards compliance, the 'argv' argument has the type -+ char *const *, but this is inaccurate; if argument permutation is -+ enabled, the argv array (not the strings it points to) must be -+ writable. */ -+ -+extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) -+ __THROW _GL_ARG_NONNULL ((2, 3)); -+ -+__END_DECLS -+ -+#endif /* _GETOPT_CORE_H */ -diff -durN inetutils-1.9.4.orig/lib/getopt-ext.h inetutils-1.9.4/lib/getopt-ext.h ---- inetutils-1.9.4.orig/lib/getopt-ext.h 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/lib/getopt-ext.h 2017-05-15 17:51:12.453125000 +0800 -@@ -0,0 +1,77 @@ -+/* Declarations for getopt (GNU extensions). -+ Copyright (C) 1989-2017 Free Software Foundation, Inc. -+ This file is part of the GNU C Library and is also part of gnulib. -+ Patches to this file should be submitted to both projects. -+ -+ The GNU C Library 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 3 of the License, or (at your option) any later version. -+ -+ The GNU C Library 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 the GNU C Library; if not, see -+ . */ -+ -+#ifndef _GETOPT_EXT_H -+#define _GETOPT_EXT_H 1 -+ -+/* This header should not be used directly; include getopt.h instead. -+ Unlike most bits headers, it does not have a protective #error, -+ because the guard macro for getopt.h in gnulib is not fixed. */ -+ -+__BEGIN_DECLS -+ -+/* Describe the long-named options requested by the application. -+ The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector -+ of 'struct option' terminated by an element containing a name which is -+ zero. -+ -+ The field 'has_arg' is: -+ no_argument (or 0) if the option does not take an argument, -+ required_argument (or 1) if the option requires an argument, -+ optional_argument (or 2) if the option takes an optional argument. -+ -+ If the field 'flag' is not NULL, it points to a variable that is set -+ to the value given in the field 'val' when the option is found, but -+ left unchanged if the option is not found. -+ -+ To have a long-named option do something other than set an 'int' to -+ a compiled-in constant, such as set a value from 'optarg', set the -+ option's 'flag' field to zero and its 'val' field to a nonzero -+ value (the equivalent single-letter option character, if there is -+ one). For long options that have a zero 'flag' field, 'getopt' -+ returns the contents of the 'val' field. */ -+ -+struct option -+{ -+ const char *name; -+ /* has_arg can't be an enum because some compilers complain about -+ type mismatches in all the code that assumes it is an int. */ -+ int has_arg; -+ int *flag; -+ int val; -+}; -+ -+/* Names for the values of the 'has_arg' field of 'struct option'. */ -+ -+#define no_argument 0 -+#define required_argument 1 -+#define optional_argument 2 -+ -+extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv, -+ const char *__shortopts, -+ const struct option *__longopts, int *__longind) -+ __THROW _GL_ARG_NONNULL ((2, 3)); -+extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv, -+ const char *__shortopts, -+ const struct option *__longopts, int *__longind) -+ __THROW _GL_ARG_NONNULL ((2, 3)); -+ -+__END_DECLS -+ -+#endif /* _GETOPT_EXT_H */ -diff -durN inetutils-1.9.4.orig/lib/getopt-pfx-core.h inetutils-1.9.4/lib/getopt-pfx-core.h ---- inetutils-1.9.4.orig/lib/getopt-pfx-core.h 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/lib/getopt-pfx-core.h 2017-05-15 17:51:12.593750000 +0800 -@@ -0,0 +1,54 @@ -+/* getopt (basic, portable features) gnulib wrapper header. -+ Copyright (C) 1989-2017 Free Software Foundation, Inc. -+ This file is part of gnulib. -+ Unlike most of the getopt implementation, it is NOT shared -+ with the GNU C Library. -+ -+ gnulib 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 3 of -+ the License, or (at your option) any later version. -+ -+ gnulib 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 gnulib; if not, see -+ . */ -+ -+#ifndef _GETOPT_PFX_CORE_H -+#define _GETOPT_PFX_CORE_H 1 -+ -+/* This header should not be used directly; include getopt.h or -+ unistd.h instead. It does not have a protective #error, because -+ the guard macro for getopt.h in gnulib is not fixed. */ -+ -+/* Standalone applications should #define __GETOPT_PREFIX to an -+ identifier that prefixes the external functions and variables -+ defined in getopt-core.h and getopt-ext.h. Systematically -+ rename identifiers so that they do not collide with the system -+ functions and variables. Renaming avoids problems with some -+ compilers and linkers. */ -+#ifdef __GETOPT_PREFIX -+# ifndef __GETOPT_ID -+# define __GETOPT_CONCAT(x, y) x ## y -+# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y) -+# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y) -+# endif -+# undef getopt -+# undef optarg -+# undef opterr -+# undef optind -+# undef optopt -+# define getopt __GETOPT_ID (getopt) -+# define optarg __GETOPT_ID (optarg) -+# define opterr __GETOPT_ID (opterr) -+# define optind __GETOPT_ID (optind) -+# define optopt __GETOPT_ID (optopt) -+#endif -+ -+#include -+ -+#endif /* _GETOPT_PFX_CORE_H */ -diff -durN inetutils-1.9.4.orig/lib/getopt-pfx-ext.h inetutils-1.9.4/lib/getopt-pfx-ext.h ---- inetutils-1.9.4.orig/lib/getopt-pfx-ext.h 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/lib/getopt-pfx-ext.h 2017-05-15 17:51:12.750000000 +0800 -@@ -0,0 +1,66 @@ -+/* getopt (GNU extensions) gnulib wrapper header. -+ Copyright (C) 1989-2017 Free Software Foundation, Inc. -+ This file is part of gnulib. -+ Unlike most of the getopt implementation, it is NOT shared -+ with the GNU C Library. -+ -+ gnulib 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 3 of -+ the License, or (at your option) any later version. -+ -+ gnulib 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 gnulib; if not, see -+ . */ -+ -+#ifndef _GETOPT_PFX_EXT_H -+#define _GETOPT_PFX_EXT_H 1 -+ -+/* This header should not be used directly; include getopt.h instead. -+ It does not have a protective #error, because the guard macro for -+ getopt.h in gnulib is not fixed. */ -+ -+/* Standalone applications should #define __GETOPT_PREFIX to an -+ identifier that prefixes the external functions and variables -+ defined in getopt-core.h and getopt-ext.h. Systematically -+ rename identifiers so that they do not collide with the system -+ functions and variables. Renaming avoids problems with some -+ compilers and linkers. */ -+#ifdef __GETOPT_PREFIX -+# ifndef __GETOPT_ID -+# define __GETOPT_CONCAT(x, y) x ## y -+# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y) -+# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y) -+# endif -+# undef getopt_long -+# undef getopt_long_only -+# undef option -+# undef _getopt_internal -+# define getopt_long __GETOPT_ID (getopt_long) -+# define getopt_long_only __GETOPT_ID (getopt_long_only) -+# define option __GETOPT_ID (option) -+# define _getopt_internal __GETOPT_ID (getopt_internal) -+#endif -+ -+/* Standalone applications get correct prototypes for getopt_long and -+ getopt_long_only; they declare "char **argv". For backward -+ compatibility with old applications, if __GETOPT_PREFIX is not -+ defined, we supply GNU-libc-compatible, but incorrect, prototypes -+ using "char *const *argv". (GNU libc is stuck with the incorrect -+ prototypes, as they are baked into older versions of LSB.) */ -+#ifndef __getopt_argv_const -+# if defined __GETOPT_PREFIX -+# define __getopt_argv_const /* empty */ -+# else -+# define __getopt_argv_const const -+# endif -+#endif -+ -+#include -+ -+#endif /* _GETOPT_PFX_EXT_H */ -diff -durN inetutils-1.9.4.orig/lib/getpass.c inetutils-1.9.4/lib/getpass.c ---- inetutils-1.9.4.orig/lib/getpass.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/getpass.c 2017-05-15 17:51:13.546875000 +0800 -@@ -1,4 +1,4 @@ --/* Copyright (C) 1992-2001, 2003-2007, 2009-2015 Free Software Foundation, Inc. -+/* Copyright (C) 1992-2001, 2003-2007, 2009-2017 Free Software Foundation, Inc. - - This file is part of the GNU C Library. - -diff -durN inetutils-1.9.4.orig/lib/getpass.h inetutils-1.9.4/lib/getpass.h ---- inetutils-1.9.4.orig/lib/getpass.h 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/getpass.h 2017-05-15 17:51:13.703125000 +0800 -@@ -1,5 +1,5 @@ - /* getpass.h -- Read a password of arbitrary length from /dev/tty or stdin. -- Copyright (C) 2004, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2004, 2009-2017 Free Software Foundation, Inc. - Contributed by Simon Josefsson , 2004. - - This program is free software; you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/getprogname.c inetutils-1.9.4/lib/getprogname.c ---- inetutils-1.9.4.orig/lib/getprogname.c 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/lib/getprogname.c 2017-05-15 17:51:13.859375000 +0800 -@@ -0,0 +1,185 @@ -+/* Program name management. -+ Copyright (C) 2016-2017 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 -+ the Free Software Foundation; either version 3 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, see . */ -+ -+#include -+ -+/* Specification. */ -+#include "getprogname.h" -+ -+#include /* get program_invocation_name declaration */ -+#include /* get __argv declaration */ -+ -+#ifdef _AIX -+# include -+# include -+# include -+#endif -+ -+#ifdef __MVS__ -+# ifndef _OPEN_SYS -+# define _OPEN_SYS -+# endif -+# include -+# include -+#endif -+ -+#ifdef __hpux -+# include -+# include -+# include -+# include -+#endif -+ -+#ifdef __sgi -+# include -+# include -+# include -+# include -+# include -+#endif -+ -+#include "dirname.h" -+ -+#ifndef HAVE_GETPROGNAME /* not Mac OS X, FreeBSD, NetBSD, OpenBSD >= 5.4, Cygwin */ -+char const * -+getprogname (void) -+{ -+# if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME /* glibc, BeOS */ -+ /* https://www.gnu.org/software/libc/manual/html_node/Error-Messages.html */ -+ return program_invocation_short_name; -+# elif HAVE_DECL_PROGRAM_INVOCATION_NAME /* glibc, BeOS */ -+ /* https://www.gnu.org/software/libc/manual/html_node/Error-Messages.html */ -+ return last_component (program_invocation_name); -+# elif HAVE_GETEXECNAME /* Solaris */ -+ /* http://docs.oracle.com/cd/E19253-01/816-5168/6mbb3hrb1/index.html */ -+ const char *p = getexecname (); -+ if (!p) -+ p = "?"; -+ return last_component (p); -+# elif HAVE_DECL___ARGV /* mingw, MSVC */ -+ /* https://msdn.microsoft.com/en-us/library/dn727674.aspx */ -+ const char *p = __argv && __argv[0] ? __argv[0] : "?"; -+ return last_component (p); -+# elif HAVE_VAR___PROGNAME /* OpenBSD, QNX */ -+ /* http://man.openbsd.org/style.9 */ -+ /* http://www.qnx.de/developers/docs/6.5.0/index.jsp?topic=%2Fcom.qnx.doc.neutrino_lib_ref%2Fp%2F__progname.html */ -+ /* Be careful to declare this only when we absolutely need it -+ (OpenBSD 5.1), rather than when it's available. Otherwise, -+ its mere declaration makes program_invocation_short_name -+ malfunction (have zero length) with Fedora 25's glibc. */ -+ extern char *__progname; -+ const char *p = __progname; -+ return p && p[0] ? p : "?"; -+# elif _AIX /* AIX */ -+ /* Idea by Bastien ROUCARIÈS, -+ http://lists.gnu.org/archive/html/bug-gnulib/2010-12/msg00095.html -+ Reference: http:// -+ ibm.biz/knowctr#ssw_aix_53/com.ibm.aix.basetechref/doc/basetrf1/getprocs.htm -+ */ -+ static char *p; -+ static int first = 1; -+ if (first) -+ { -+ first = 0; -+ pid_t pid = getpid (); -+ struct procentry64 procs; -+ p = (0 < getprocs64 (&procs, sizeof procs, NULL, 0, &pid, 1) -+ ? strdup (procs.pi_comm) -+ : NULL); -+ if (!p) -+ p = "?"; -+ } -+ return p; -+# elif defined __hpux -+ static char *p; -+ static int first = 1; -+ if (first) -+ { -+ first = 0; -+ pid_t pid = getpid (); -+ struct pst_status status; -+ p = (0 < pstat_getproc (&status, sizeof status, 0, pid) -+ ? strdup (status.pst_ucomm) -+ : NULL); -+ if (!p) -+ p = "?"; -+ } -+ return p; -+# elif __MVS__ /* z/OS */ -+ /* https://www.ibm.com/support/knowledgecenter/SSLTBW_2.1.0/com.ibm.zos.v2r1.bpxbd00/rtwgetp.htm */ -+ static char *p = "?"; -+ static int first = 1; -+ if (first) -+ { -+ pid_t pid = getpid (); -+ int token; -+ W_PSPROC buf; -+ first = 0; -+ memset (&buf, 0, sizeof(buf)); -+ buf.ps_cmdptr = (char *) malloc (buf.ps_cmdlen = PS_CMDBLEN_LONG); -+ buf.ps_conttyptr = (char *) malloc (buf.ps_conttylen = PS_CONTTYBLEN); -+ buf.ps_pathptr = (char *) malloc (buf.ps_pathlen = PS_PATHBLEN); -+ if (buf.ps_cmdptr && buf.ps_conttyptr && buf.ps_pathptr) -+ { -+ for (token = 0; token >= 0; -+ token = w_getpsent (token, &buf, sizeof(buf))) -+ { -+ if (token > 0 && buf.ps_pid == pid) -+ { -+ char *s = strdup (last_component (buf.ps_pathptr)); -+ if (s) -+ p = s; -+ break; -+ } -+ } -+ } -+ free (buf.ps_cmdptr); -+ free (buf.ps_conttyptr); -+ free (buf.ps_pathptr); -+ } -+ return p; -+# elif defined __sgi /* IRIX */ -+ char filename[50]; -+ int fd; -+ -+ sprintf (filename, "/proc/pinfo/%d", (int) getpid ()); -+ fd = open (filename, O_RDONLY); -+ if (0 <= fd) -+ { -+ prpsinfo_t buf; -+ int ioctl_ok = 0 <= ioctl (fd, PIOCPSINFO, &buf); -+ close (fd); -+ if (ioctl_ok) -+ { -+ char *name = buf.pr_fname; -+ char *namesize = sizeof buf.pr_fname; -+ char *namenul = memchr (name, '\0', namesize); -+ size_t namelen = namenul ? namenul - name : namesize; -+ char *namecopy = malloc (namelen + 1); -+ if (namecopy) -+ { -+ namecopy[namelen] = 0; -+ return memcpy (namecopy, name, namelen); -+ } -+ } -+ } -+ return NULL; -+# else -+# error "getprogname module not ported to this OS" -+# endif -+} -+ -+#endif -diff -durN inetutils-1.9.4.orig/lib/getprogname.h inetutils-1.9.4/lib/getprogname.h ---- inetutils-1.9.4.orig/lib/getprogname.h 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/lib/getprogname.h 2017-05-15 17:51:14.000000000 +0800 -@@ -0,0 +1,40 @@ -+/* Program name management. -+ Copyright (C) 2016-2017 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 -+ the Free Software Foundation; either version 3 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, see . */ -+ -+#ifndef _GL_GETPROGNAME_H -+#define _GL_GETPROGNAME_H -+ -+#include -+ -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+/* Return the base name of the executing program. -+ On native Windows this will usually end in ".exe" or ".EXE". */ -+#ifndef HAVE_GETPROGNAME -+extern char const *getprogname (void) -+# ifdef HAVE_DECL_PROGRAM_INVOCATION_NAME -+ _GL_ATTRIBUTE_PURE -+# endif -+ ; -+#endif -+ -+#ifdef __cplusplus -+} -+#endif -+ -+#endif -diff -durN inetutils-1.9.4.orig/lib/gettext.h inetutils-1.9.4/lib/gettext.h ---- inetutils-1.9.4.orig/lib/gettext.h 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/gettext.h 2017-05-15 17:51:14.187500000 +0800 -@@ -1,5 +1,5 @@ - /* Convenience header for conditional use of GNU . -- Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2015 Free Software -+ Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2017 Free Software - Foundation, Inc. - - This program is free software; you can redistribute it and/or modify -@@ -18,8 +18,9 @@ - #ifndef _LIBGETTEXT_H - #define _LIBGETTEXT_H 1 - --/* NLS can be disabled through the configure --disable-nls option. */ --#if ENABLE_NLS -+/* NLS can be disabled through the configure --disable-nls option -+ or through "#define ENABLE NLS 0" before including this file. */ -+#if defined ENABLE_NLS && ENABLE_NLS - - /* Get declarations of GNU message catalog functions. */ - # include -@@ -225,15 +226,17 @@ - if (msg_ctxt_id != NULL) - #endif - { -+ int found_translation; - memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); - msg_ctxt_id[msgctxt_len - 1] = '\004'; - memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); - translation = dcgettext (domain, msg_ctxt_id, category); -+ found_translation = (translation != msg_ctxt_id); - #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS - if (msg_ctxt_id != buf) - free (msg_ctxt_id); - #endif -- if (translation != msg_ctxt_id) -+ if (found_translation) - return translation; - } - return msgid; -@@ -271,15 +274,17 @@ - if (msg_ctxt_id != NULL) - #endif - { -+ int found_translation; - memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); - msg_ctxt_id[msgctxt_len - 1] = '\004'; - memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); - translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); -+ found_translation = !(translation == msg_ctxt_id || translation == msgid_plural); - #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS - if (msg_ctxt_id != buf) - free (msg_ctxt_id); - #endif -- if (!(translation == msg_ctxt_id || translation == msgid_plural)) -+ if (found_translation) - return translation; - } - return (n == 1 ? msgid : msgid_plural); -diff -durN inetutils-1.9.4.orig/lib/gettimeofday.c inetutils-1.9.4/lib/gettimeofday.c ---- inetutils-1.9.4.orig/lib/gettimeofday.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/gettimeofday.c 2017-05-15 17:51:14.343750000 +0800 -@@ -1,6 +1,6 @@ - /* Provide gettimeofday for systems that don't have it or for which it's broken. - -- Copyright (C) 2001-2003, 2005-2007, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2001-2003, 2005-2007, 2009-2017 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 -@@ -24,93 +24,95 @@ - - #include - --#if HAVE_SYS_TIMEB_H --# include -+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -+# define WINDOWS_NATIVE -+# include - #endif - --#if GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME -- --/* Work around the bug in some systems whereby gettimeofday clobbers -- the static buffer that localtime uses for its return value. The -- gettimeofday function from Mac OS X 10.0.4 (i.e., Darwin 1.3.7) has -- this problem. The tzset replacement is necessary for at least -- Solaris 2.5, 2.5.1, and 2.6. */ -- --static struct tm tm_zero_buffer; --static struct tm *localtime_buffer_addr = &tm_zero_buffer; -- --# undef localtime --extern struct tm *localtime (time_t const *); -- --# undef gmtime --extern struct tm *gmtime (time_t const *); -- --/* This is a wrapper for localtime. It is used only on systems for which -- gettimeofday clobbers the static buffer used for localtime's result. -- -- On the first call, record the address of the static buffer that -- localtime uses for its result. */ -- --struct tm * --rpl_localtime (time_t const *timep) --{ -- struct tm *tm = localtime (timep); -+#include "localtime-buffer.h" - -- if (localtime_buffer_addr == &tm_zero_buffer) -- localtime_buffer_addr = tm; -+#ifdef WINDOWS_NATIVE - -- return tm; --} -+/* GetSystemTimePreciseAsFileTime was introduced only in Windows 8. */ -+typedef void (WINAPI * GetSystemTimePreciseAsFileTimeFuncType) (FILETIME *lpTime); -+static GetSystemTimePreciseAsFileTimeFuncType GetSystemTimePreciseAsFileTimeFunc = NULL; -+static BOOL initialized = FALSE; - --/* Same as above, since gmtime and localtime use the same buffer. */ --struct tm * --rpl_gmtime (time_t const *timep) -+static void -+initialize (void) - { -- struct tm *tm = gmtime (timep); -- -- if (localtime_buffer_addr == &tm_zero_buffer) -- localtime_buffer_addr = tm; -- -- return tm; -+ HMODULE kernel32 = LoadLibrary ("kernel32.dll"); -+ if (kernel32 != NULL) -+ { -+ GetSystemTimePreciseAsFileTimeFunc = -+ (GetSystemTimePreciseAsFileTimeFuncType) GetProcAddress (kernel32, "GetSystemTimePreciseAsFileTime"); -+ } -+ initialized = TRUE; - } - --#endif /* GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME */ -- --#if TZSET_CLOBBERS_LOCALTIME -- --# undef tzset --extern void tzset (void); -- --/* This is a wrapper for tzset, for systems on which tzset may clobber -- the static buffer used for localtime's result. */ --void --rpl_tzset (void) --{ -- /* Save and restore the contents of the buffer used for localtime's -- result around the call to tzset. */ -- struct tm save = *localtime_buffer_addr; -- tzset (); -- *localtime_buffer_addr = save; --} - #endif - - /* This is a wrapper for gettimeofday. It is used only on systems - that lack this function, or whose implementation of this function -- causes problems. */ -+ causes problems. -+ Work around the bug in some systems whereby gettimeofday clobbers -+ the static buffer that localtime uses for its return value. The -+ gettimeofday function from Mac OS X 10.0.4 (i.e., Darwin 1.3.7) has -+ this problem. */ - - int - gettimeofday (struct timeval *restrict tv, void *restrict tz) - { - #undef gettimeofday --#if HAVE_GETTIMEOFDAY --# if GETTIMEOFDAY_CLOBBERS_LOCALTIME -+#ifdef WINDOWS_NATIVE -+ -+ /* On native Windows, there are two ways to get the current time: -+ GetSystemTimeAsFileTime -+ -+ or -+ GetSystemTimePreciseAsFileTime -+ . -+ GetSystemTimeAsFileTime produces values that jump by increments of -+ 15.627 milliseconds (!) on average. -+ Whereas GetSystemTimePreciseAsFileTime values usually jump by 1 or 2 -+ microseconds. -+ More discussion on this topic: -+ . */ -+ FILETIME current_time; -+ -+ if (!initialized) -+ initialize (); -+ if (GetSystemTimePreciseAsFileTimeFunc != NULL) -+ GetSystemTimePreciseAsFileTimeFunc (¤t_time); -+ else -+ GetSystemTimeAsFileTime (¤t_time); -+ -+ /* Convert from FILETIME to 'struct timeval'. */ -+ /* FILETIME: */ -+ ULONGLONG since_1601 = -+ ((ULONGLONG) current_time.dwHighDateTime << 32) -+ | (ULONGLONG) current_time.dwLowDateTime; -+ /* Between 1601-01-01 and 1970-01-01 there were 280 normal years and 89 leap -+ years, in total 134774 days. */ -+ ULONGLONG since_1970 = -+ since_1601 - (ULONGLONG) 134774 * (ULONGLONG) 86400 * (ULONGLONG) 10000000; -+ ULONGLONG microseconds_since_1970 = since_1970 / (ULONGLONG) 10; -+ tv->tv_sec = microseconds_since_1970 / (ULONGLONG) 1000000; -+ tv->tv_usec = microseconds_since_1970 % (ULONGLONG) 1000000; -+ -+ return 0; -+ -+#else -+ -+# if HAVE_GETTIMEOFDAY -+# if GETTIMEOFDAY_CLOBBERS_LOCALTIME - /* Save and restore the contents of the buffer used for localtime's - result around the call to gettimeofday. */ - struct tm save = *localtime_buffer_addr; --# endif -+# endif - --# if defined timeval /* 'struct timeval' overridden by gnulib? */ --# undef timeval -+# if defined timeval /* 'struct timeval' overridden by gnulib? */ -+# undef timeval - struct timeval otv; - int result = gettimeofday (&otv, (struct timezone *) tz); - if (result == 0) -@@ -118,25 +120,16 @@ - tv->tv_sec = otv.tv_sec; - tv->tv_usec = otv.tv_usec; - } --# else -+# else - int result = gettimeofday (tv, (struct timezone *) tz); --# endif -+# endif - --# if GETTIMEOFDAY_CLOBBERS_LOCALTIME -+# if GETTIMEOFDAY_CLOBBERS_LOCALTIME - *localtime_buffer_addr = save; --# endif -+# endif - - return result; - --#else -- --# if HAVE__FTIME -- -- struct _timeb timebuf; -- _ftime (&timebuf); -- tv->tv_sec = timebuf.time; -- tv->tv_usec = timebuf.millitm * 1000; -- - # else - - # if !defined OK_TO_USE_1S_CLOCK -@@ -146,9 +139,8 @@ - tv->tv_sec = time (NULL); - tv->tv_usec = 0; - --# endif -- - return 0; - -+# endif - #endif - } -diff -durN inetutils-1.9.4.orig/lib/getugroups.c inetutils-1.9.4/lib/getugroups.c ---- inetutils-1.9.4.orig/lib/getugroups.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/getugroups.c 2017-05-15 17:51:14.500000000 +0800 -@@ -1,6 +1,6 @@ - /* getugroups.c -- return a list of the groups a user is in - -- Copyright (C) 1990-1991, 1998-2000, 2003-2015 Free Software Foundation, Inc. -+ Copyright (C) 1990-1991, 1998-2000, 2003-2017 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 -diff -durN inetutils-1.9.4.orig/lib/getugroups.h inetutils-1.9.4/lib/getugroups.h ---- inetutils-1.9.4.orig/lib/getugroups.h 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/getugroups.h 2017-05-15 17:51:14.640625000 +0800 -@@ -1,5 +1,5 @@ - /* Get a list of group IDs associated with a specified user ID. -- Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2007, 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/getusershell.c inetutils-1.9.4/lib/getusershell.c ---- inetutils-1.9.4.orig/lib/getusershell.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/getusershell.c 2017-05-15 17:51:14.812500000 +0800 -@@ -1,6 +1,6 @@ - /* getusershell.c -- Return names of valid user shells. - -- Copyright (C) 1991, 1997, 2000-2001, 2003-2006, 2008-2015 Free Software -+ Copyright (C) 1991, 1997, 2000-2001, 2003-2006, 2008-2017 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/glob.c inetutils-1.9.4/lib/glob.c ---- inetutils-1.9.4.orig/lib/glob.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/glob.c 2017-05-15 17:51:15.109375000 +0800 -@@ -1,18 +1,19 @@ --/* Copyright (C) 1991-2015 Free Software Foundation, Inc. -+/* Copyright (C) 1991-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - -- 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 3 of the License, or -- (at your option) any later version. -+ The GNU C Library 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 3 of the License, or (at your option) any later version. - -- This program is distributed in the hope that it will be useful, -+ The GNU C Library 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. -+ 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, see . */ -+ You should have received a copy of the GNU General Public -+ License along with the GNU C Library; if not, see -+ . */ - - #ifndef _LIBC - /* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc -@@ -26,17 +27,17 @@ - #include - #include - #include -+#include - #include -+#include - - /* Outcomment the following line for production quality code. */ - /* #define NDEBUG 1 */ - #include - --#include -- - #include /* Needed on stupid SunOS for assert. */ - --#if !defined _LIBC || !defined GLOB_ONLY_P -+#ifndef GLOB_ONLY_P - - #include - #if !defined POSIX && defined _POSIX_VERSION -@@ -57,74 +58,8 @@ - #endif - - #include -- -- --/* In GNU systems, defines this macro for us. */ --#ifndef _D_EXACT_NAMLEN --# define _D_EXACT_NAMLEN(dirent) strlen ((dirent)->d_name) --#endif -- --/* When used in the GNU libc the symbol _DIRENT_HAVE_D_TYPE is available -- if the 'd_type' member for 'struct dirent' is available. -- HAVE_STRUCT_DIRENT_D_TYPE plays the same role in GNULIB. */ --#if defined _DIRENT_HAVE_D_TYPE || defined HAVE_STRUCT_DIRENT_D_TYPE --/* True if the directory entry D must be of type T. */ --# define DIRENT_MUST_BE(d, t) ((d)->d_type == (t)) -- --/* True if the directory entry D might be a symbolic link. */ --# define DIRENT_MIGHT_BE_SYMLINK(d) \ -- ((d)->d_type == DT_UNKNOWN || (d)->d_type == DT_LNK) -- --/* True if the directory entry D might be a directory. */ --# define DIRENT_MIGHT_BE_DIR(d) \ -- ((d)->d_type == DT_DIR || DIRENT_MIGHT_BE_SYMLINK (d)) -- --#else /* !HAVE_D_TYPE */ --# define DIRENT_MUST_BE(d, t) false --# define DIRENT_MIGHT_BE_SYMLINK(d) true --# define DIRENT_MIGHT_BE_DIR(d) true --#endif /* HAVE_D_TYPE */ -- --/* If the system has the 'struct dirent64' type we use it internally. */ --#if defined _LIBC && !defined COMPILE_GLOB64 --# if (defined POSIX || defined WINDOWS32) && !defined __GNU_LIBRARY__ --# define CONVERT_D_INO(d64, d32) --# else --# define CONVERT_D_INO(d64, d32) \ -- (d64)->d_ino = (d32)->d_ino; --# endif -- --# ifdef _DIRENT_HAVE_D_TYPE --# define CONVERT_D_TYPE(d64, d32) \ -- (d64)->d_type = (d32)->d_type; --# else --# define CONVERT_D_TYPE(d64, d32) --# endif -- --# define CONVERT_DIRENT_DIRENT64(d64, d32) \ -- memcpy ((d64)->d_name, (d32)->d_name, _D_EXACT_NAMLEN (d32) + 1); \ -- CONVERT_D_INO (d64, d32) \ -- CONVERT_D_TYPE (d64, d32) --#endif -- -- --#if (defined POSIX || defined WINDOWS32) && !defined __GNU_LIBRARY__ --/* Posix does not require that the d_ino field be present, and some -- systems do not provide it. */ --# define REAL_DIR_ENTRY(dp) 1 --#else --# define REAL_DIR_ENTRY(dp) (dp->d_ino != 0) --#endif /* POSIX */ -- - #include - #include -- --/* NAME_MAX is usually defined in or . */ --#include --#ifndef NAME_MAX --# define NAME_MAX (sizeof (((struct dirent *) 0)->d_name)) --#endif -- - #include - - #ifdef _LIBC -@@ -141,16 +76,22 @@ - # endif - # define struct_stat64 struct stat64 - #else /* !_LIBC */ -+# define __getlogin_r(buf, len) getlogin_r (buf, len) - # define __stat64(fname, buf) stat (fname, buf) - # define __fxstatat64(_, d, f, st, flag) fstatat (d, f, st, flag) - # define struct_stat64 struct stat --# define __alloca alloca -+# ifndef __MVS__ -+# define __alloca alloca -+# endif - # define __readdir readdir - # define __glob_pattern_p glob_pattern_p -+# define COMPILE_GLOB64 - #endif /* _LIBC */ - - #include - -+#include "flexmember.h" -+ - #ifdef _SC_GETPW_R_SIZE_MAX - # define GETPW_R_SIZE_MAX() sysconf (_SC_GETPW_R_SIZE_MAX) - #else -@@ -164,7 +105,110 @@ - - static const char *next_brace_sub (const char *begin, int flags) __THROWNL; - --#endif /* !defined _LIBC || !defined GLOB_ONLY_P */ -+/* A representation of a directory entry which does not depend on the -+ layout of struct dirent, or the size of ino_t. */ -+struct readdir_result -+{ -+ const char *name; -+# if defined _DIRENT_HAVE_D_TYPE || defined HAVE_STRUCT_DIRENT_D_TYPE -+ uint8_t type; -+# endif -+ bool skip_entry; -+}; -+ -+# if defined _DIRENT_HAVE_D_TYPE || defined HAVE_STRUCT_DIRENT_D_TYPE -+/* Initializer based on the d_type member of struct dirent. */ -+# define D_TYPE_TO_RESULT(source) (source)->d_type, -+ -+/* True if the directory entry D might be a symbolic link. */ -+static bool -+readdir_result_might_be_symlink (struct readdir_result d) -+{ -+ return d.type == DT_UNKNOWN || d.type == DT_LNK; -+} -+ -+/* True if the directory entry D might be a directory. */ -+static bool -+readdir_result_might_be_dir (struct readdir_result d) -+{ -+ return d.type == DT_DIR || readdir_result_might_be_symlink (d); -+} -+# else /* defined _DIRENT_HAVE_D_TYPE || defined HAVE_STRUCT_DIRENT_D_TYPE */ -+# define D_TYPE_TO_RESULT(source) -+ -+/* If we do not have type information, symbolic links and directories -+ are always a possibility. */ -+ -+static bool -+readdir_result_might_be_symlink (struct readdir_result d) -+{ -+ return true; -+} -+ -+static bool -+readdir_result_might_be_dir (struct readdir_result d) -+{ -+ return true; -+} -+ -+# endif /* defined _DIRENT_HAVE_D_TYPE || defined HAVE_STRUCT_DIRENT_D_TYPE */ -+ -+# if (defined POSIX || defined WINDOWS32) && !defined __GNU_LIBRARY__ -+/* Initializer for skip_entry. POSIX does not require that the d_ino -+ field be present, and some systems do not provide it. */ -+# define D_INO_TO_RESULT(source) false, -+# else -+# define D_INO_TO_RESULT(source) (source)->d_ino == 0, -+# endif -+ -+/* Construct an initializer for a struct readdir_result object from a -+ struct dirent *. No copy of the name is made. */ -+#define READDIR_RESULT_INITIALIZER(source) \ -+ { \ -+ source->d_name, \ -+ D_TYPE_TO_RESULT (source) \ -+ D_INO_TO_RESULT (source) \ -+ } -+ -+#endif /* !defined GLOB_ONLY_P */ -+ -+/* Call gl_readdir on STREAM. This macro can be overridden to reduce -+ type safety if an old interface version needs to be supported. */ -+#ifndef GL_READDIR -+# define GL_READDIR(pglob, stream) ((pglob)->gl_readdir (stream)) -+#endif -+ -+/* Extract name and type from directory entry. No copy of the name is -+ made. If SOURCE is NULL, result name is NULL. Keep in sync with -+ convert_dirent64 below. */ -+static struct readdir_result -+convert_dirent (const struct dirent *source) -+{ -+ if (source == NULL) -+ { -+ struct readdir_result result = { NULL, }; -+ return result; -+ } -+ struct readdir_result result = READDIR_RESULT_INITIALIZER (source); -+ return result; -+} -+ -+#ifndef COMPILE_GLOB64 -+/* Like convert_dirent, but works on struct dirent64 instead. Keep in -+ sync with convert_dirent above. */ -+static struct readdir_result -+convert_dirent64 (const struct dirent64 *source) -+{ -+ if (source == NULL) -+ { -+ struct readdir_result result = { NULL, }; -+ return result; -+ } -+ struct readdir_result result = READDIR_RESULT_INITIALIZER (source); -+ return result; -+} -+#endif -+ - - #ifndef attribute_hidden - # define attribute_hidden -@@ -178,8 +222,8 @@ - # endif - #endif - --#if ! defined __builtin_expect && __GNUC__ < 3 --# define __builtin_expect(expr, expected) (expr) -+#ifndef __glibc_unlikely -+# define __glibc_unlikely(expr) __builtin_expect (expr, 0) - #endif - - #ifndef _LIBC -@@ -195,25 +239,43 @@ - # undef closedir - # endif - --# if HAVE_ALLOCA --/* The OS usually guarantees only one guard page at the bottom of the stack, -- and a page size can be as small as 4096 bytes. So we cannot safely -- allocate anything larger than 4096 bytes. Also care for the possibility -- of a few compiler-allocated temporary stack slots. */ --# define __libc_use_alloca(n) ((n) < 4032) --# else --/* alloca is implemented with malloc, so just use malloc. */ --# define __libc_use_alloca(n) 0 --# endif -+/* Just use malloc. */ -+# define __libc_use_alloca(n) false -+# define alloca_account(len, avar) ((void) (len), (void) (avar), (void *) 0) -+# define extend_alloca_account(buf, len, newlen, avar) \ -+ ((void) (buf), (void) (len), (void) (newlen), (void) (avar), (void *) 0) -+#endif -+ -+/* Set *R = A + B. Return true if the answer is mathematically -+ incorrect due to overflow; in this case, *R is the low order -+ bits of the correct answer.. */ -+ -+static bool -+size_add_wrapv (size_t a, size_t b, size_t *r) -+{ -+#if 5 <= __GNUC__ -+ return __builtin_add_overflow (a, b, r); -+#else -+ *r = a + b; -+ return *r < a; - #endif -+} -+ -+static bool -+glob_use_alloca (size_t alloca_used, size_t len) -+{ -+ size_t size; -+ return (!size_add_wrapv (alloca_used, len, &size) -+ && __libc_use_alloca (size)); -+} - - static int glob_in_dir (const char *pattern, const char *directory, - int flags, int (*errfunc) (const char *, int), -- glob_t *pglob); -+ glob_t *pglob, size_t alloca_used); - extern int __glob_pattern_type (const char *pattern, int quote) - attribute_hidden; - --#if !defined _LIBC || !defined GLOB_ONLY_P -+#ifndef GLOB_ONLY_P - static int prefix_array (const char *prefix, char **array, size_t n) __THROWNL; - static int collated_compare (const void *, const void *) __THROWNL; - -@@ -222,7 +284,7 @@ - static const char * - next_brace_sub (const char *cp, int flags) - { -- unsigned int depth = 0; -+ size_t depth = 0; - while (*cp != '\0') - if ((flags & GLOB_NOESCAPE) == 0 && *cp == '\\') - { -@@ -242,7 +304,7 @@ - return *cp != '\0' ? cp : NULL; - } - --#endif /* !defined _LIBC || !defined GLOB_ONLY_P */ -+#endif /* !defined GLOB_ONLY_P */ - - /* Do glob searching for PATTERN, placing results in PGLOB. - The bits defined above may be set in FLAGS. -@@ -256,20 +318,20 @@ - #ifdef GLOB_ATTRIBUTE - GLOB_ATTRIBUTE - #endif --glob (pattern, flags, errfunc, pglob) -- const char * restrict pattern; -- int flags; -- int (*errfunc) (const char *, int); -- glob_t * restrict pglob; -+glob (const char *pattern, int flags, int (*errfunc) (const char *, int), -+ glob_t *pglob) - { - const char *filename; -- const char *dirname; -+ char *dirname = NULL; - size_t dirlen; - int status; - size_t oldcount; - int meta; - int dirname_modified; -+ int malloc_dirname = 0; - glob_t dirs; -+ int retval = 0; -+ size_t alloca_used = 0; - - if (pattern == NULL || pglob == NULL || (flags & ~__GLOB_FLAGS) != 0) - { -@@ -277,6 +339,11 @@ - return -1; - } - -+ /* POSIX requires all slashes to be matched. This means that with -+ a trailing slash we must match only directories. */ -+ if (pattern[0] && pattern[strlen (pattern) - 1] == '/') -+ flags |= GLOB_ONLYDIR; -+ - if (!(flags & GLOB_DOOFFS)) - /* Have to do this so 'globfree' knows where to start freeing. It - also makes all the code that uses gl_offs simpler. */ -@@ -318,20 +385,24 @@ - const char *next; - const char *rest; - size_t rest_len; --#ifdef __GNUC__ -- char onealt[strlen (pattern) - 1]; --#else -- char *onealt = malloc (strlen (pattern) - 1); -- if (onealt == NULL) -+ char *onealt; -+ size_t pattern_len = strlen (pattern) - 1; -+ int alloca_onealt = glob_use_alloca (alloca_used, pattern_len); -+ if (alloca_onealt) -+ onealt = alloca_account (pattern_len, alloca_used); -+ else - { -- if (!(flags & GLOB_APPEND)) -+ onealt = malloc (pattern_len); -+ if (onealt == NULL) - { -- pglob->gl_pathc = 0; -- pglob->gl_pathv = NULL; -+ if (!(flags & GLOB_APPEND)) -+ { -+ pglob->gl_pathc = 0; -+ pglob->gl_pathv = NULL; -+ } -+ return GLOB_NOSPACE; - } -- return GLOB_NOSPACE; - } --#endif - - /* We know the prefix for all sub-patterns. */ - alt_start = mempcpy (onealt, pattern, begin - pattern); -@@ -342,9 +413,9 @@ - if (next == NULL) - { - /* It is an invalid expression. */ --#ifndef __GNUC__ -- free (onealt); --#endif -+ illegal_brace: -+ if (__glibc_unlikely (!alloca_onealt)) -+ free (onealt); - return glob (pattern, flags & ~GLOB_BRACE, errfunc, pglob); - } - -@@ -354,13 +425,8 @@ - { - rest = next_brace_sub (rest + 1, flags); - if (rest == NULL) -- { -- /* It is an invalid expression. */ --#ifndef __GNUC__ -- free (onealt); --#endif -- return glob (pattern, flags & ~GLOB_BRACE, errfunc, pglob); -- } -+ /* It is an illegal expression. */ -+ goto illegal_brace; - } - /* Please note that we now can be sure the brace expression - is well-formed. */ -@@ -396,9 +462,8 @@ - /* If we got an error, return it. */ - if (result && result != GLOB_NOMATCH) - { --#ifndef __GNUC__ -- free (onealt); --#endif -+ if (__glibc_unlikely (!alloca_onealt)) -+ free (onealt); - if (!(flags & GLOB_APPEND)) - { - globfree (pglob); -@@ -416,9 +481,8 @@ - assert (next != NULL); - } - --#ifndef __GNUC__ -- free (onealt); --#endif -+ if (__glibc_unlikely (!alloca_onealt)) -+ free (onealt); - - if (pglob->gl_pathc != firstc) - /* We found some entries. */ -@@ -428,6 +492,29 @@ - } - } - -+ if (!(flags & GLOB_APPEND)) -+ { -+ pglob->gl_pathc = 0; -+ if (!(flags & GLOB_DOOFFS)) -+ pglob->gl_pathv = NULL; -+ else -+ { -+ size_t i; -+ -+ if (pglob->gl_offs >= SIZE_MAX / sizeof (char *)) -+ return GLOB_NOSPACE; -+ -+ pglob->gl_pathv = malloc ((pglob->gl_offs + 1) * sizeof (char *)); -+ if (pglob->gl_pathv == NULL) -+ return GLOB_NOSPACE; -+ -+ for (i = 0; i <= pglob->gl_offs; ++i) -+ pglob->gl_pathv[i] = NULL; -+ } -+ } -+ -+ oldcount = pglob->gl_pathc + pglob->gl_offs; -+ - /* Find the filename. */ - filename = strrchr (pattern, '/'); - #if defined __MSDOS__ || defined WINDOWS32 -@@ -445,7 +532,7 @@ - case is nothing but a notation for a directory. */ - if ((flags & (GLOB_TILDE|GLOB_TILDE_CHECK)) && pattern[0] == '~') - { -- dirname = pattern; -+ dirname = (char *) pattern; - dirlen = strlen (pattern); - - /* Set FILENAME to NULL as a special flag. This is ugly but -@@ -455,11 +542,17 @@ - } - else - { -+ if (__glibc_unlikely (pattern[0] == '\0')) -+ { -+ dirs.gl_pathv = NULL; -+ goto no_matches; -+ } -+ - filename = pattern; - #ifdef _AMIGA -- dirname = ""; -+ dirname = (char *) ""; - #else -- dirname = "."; -+ dirname = (char *) "."; - #endif - dirlen = 0; - } -@@ -469,7 +562,7 @@ - && (flags & GLOB_NOESCAPE) == 0)) - { - /* "/pattern" or "\\/pattern". */ -- dirname = "/"; -+ dirname = (char *) "/"; - dirlen = 1; - ++filename; - } -@@ -495,7 +588,15 @@ - from "d:/", since "d:" and "d:/" are not the same.*/ - } - #endif -- newp = __alloca (dirlen + 1); -+ if (glob_use_alloca (alloca_used, dirlen + 1)) -+ newp = alloca_account (dirlen + 1, alloca_used); -+ else -+ { -+ newp = malloc (dirlen + 1); -+ if (newp == NULL) -+ return GLOB_NOSPACE; -+ malloc_dirname = 1; -+ } - *((char *) mempcpy (newp, pattern, dirlen)) = '\0'; - dirname = newp; - ++filename; -@@ -536,29 +637,11 @@ - oldcount = pglob->gl_pathc + pglob->gl_offs; - goto no_matches; - } -- return val; -- } -- } -- -- if (!(flags & GLOB_APPEND)) -- { -- pglob->gl_pathc = 0; -- if (!(flags & GLOB_DOOFFS)) -- pglob->gl_pathv = NULL; -- else -- { -- size_t i; -- pglob->gl_pathv = malloc ((pglob->gl_offs + 1) * sizeof (char *)); -- if (pglob->gl_pathv == NULL) -- return GLOB_NOSPACE; -- -- for (i = 0; i <= pglob->gl_offs; ++i) -- pglob->gl_pathv[i] = NULL; -+ retval = val; -+ goto out; - } - } - -- oldcount = pglob->gl_pathc + pglob->gl_offs; -- - if ((flags & (GLOB_TILDE|GLOB_TILDE_CHECK)) && dirname[0] == '~') - { - if (dirname[1] == '\0' || dirname[1] == '/' -@@ -566,7 +649,8 @@ - && (dirname[2] == '\0' || dirname[2] == '/'))) - { - /* Look up home directory. */ -- const char *home_dir = getenv ("HOME"); -+ char *home_dir = getenv ("HOME"); -+ int malloc_home_dir = 0; - # ifdef _AMIGA - if (home_dir == NULL || home_dir[0] == '\0') - home_dir = "SYS:"; -@@ -597,80 +681,186 @@ - { - int success; - char *name; -+ int malloc_name = 0; - size_t buflen = GET_LOGIN_NAME_MAX () + 1; - - if (buflen == 0) - /* 'sysconf' does not support _SC_LOGIN_NAME_MAX. Try - a moderate value. */ - buflen = 20; -- name = __alloca (buflen); -+ if (glob_use_alloca (alloca_used, buflen)) -+ name = alloca_account (buflen, alloca_used); -+ else -+ { -+ name = malloc (buflen); -+ if (name == NULL) -+ { -+ retval = GLOB_NOSPACE; -+ goto out; -+ } -+ malloc_name = 1; -+ } - -- success = getlogin_r (name, buflen) == 0; -+ success = __getlogin_r (name, buflen) == 0; - if (success) - { - struct passwd *p; --# if defined HAVE_GETPWNAM_R || defined _LIBC -- long int pwbuflen = GETPW_R_SIZE_MAX (); -+ char *malloc_pwtmpbuf = NULL; - char *pwtmpbuf; -+# if defined HAVE_GETPWNAM_R || defined _LIBC -+ long int pwbuflenmax = GETPW_R_SIZE_MAX (); -+ size_t pwbuflen = pwbuflenmax; - struct passwd pwbuf; - int save = errno; - - # ifndef _LIBC -- if (pwbuflen == -1) -- /* 'sysconf' does not support _SC_GETPW_R_SIZE_MAX. -+ if (! (0 < pwbuflenmax && pwbuflenmax <= SIZE_MAX)) -+ /* Perhaps 'sysconf' does not support _SC_GETPW_R_SIZE_MAX. - Try a moderate value. */ - pwbuflen = 1024; - # endif -- pwtmpbuf = __alloca (pwbuflen); -+ if (glob_use_alloca (alloca_used, pwbuflen)) -+ pwtmpbuf = alloca_account (pwbuflen, alloca_used); -+ else -+ { -+ pwtmpbuf = malloc (pwbuflen); -+ if (pwtmpbuf == NULL) -+ { -+ if (__glibc_unlikely (malloc_name)) -+ free (name); -+ retval = GLOB_NOSPACE; -+ goto out; -+ } -+ malloc_pwtmpbuf = pwtmpbuf; -+ } - - while (getpwnam_r (name, &pwbuf, pwtmpbuf, pwbuflen, &p) - != 0) - { -+ size_t newlen; -+ bool v; - if (errno != ERANGE) - { - p = NULL; - break; - } --# ifdef _LIBC -- pwtmpbuf = extend_alloca (pwtmpbuf, pwbuflen, -- 2 * pwbuflen); --# else -- pwbuflen *= 2; -- pwtmpbuf = __alloca (pwbuflen); --# endif -+ v = size_add_wrapv (pwbuflen, pwbuflen, &newlen); -+ if (!v && malloc_pwtmpbuf == NULL -+ && glob_use_alloca (alloca_used, newlen)) -+ pwtmpbuf = extend_alloca_account (pwtmpbuf, pwbuflen, -+ newlen, alloca_used); -+ else -+ { -+ char *newp = (v ? NULL -+ : realloc (malloc_pwtmpbuf, newlen)); -+ if (newp == NULL) -+ { -+ free (malloc_pwtmpbuf); -+ if (__glibc_unlikely (malloc_name)) -+ free (name); -+ retval = GLOB_NOSPACE; -+ goto out; -+ } -+ malloc_pwtmpbuf = pwtmpbuf = newp; -+ } -+ pwbuflen = newlen; - __set_errno (save); - } - # else - p = getpwnam (name); - # endif -+ if (__glibc_unlikely (malloc_name)) -+ free (name); - if (p != NULL) -- home_dir = p->pw_dir; -+ { -+ if (malloc_pwtmpbuf == NULL) -+ home_dir = p->pw_dir; -+ else -+ { -+ size_t home_dir_len = strlen (p->pw_dir) + 1; -+ if (glob_use_alloca (alloca_used, home_dir_len)) -+ home_dir = alloca_account (home_dir_len, -+ alloca_used); -+ else -+ { -+ home_dir = malloc (home_dir_len); -+ if (home_dir == NULL) -+ { -+ free (pwtmpbuf); -+ retval = GLOB_NOSPACE; -+ goto out; -+ } -+ malloc_home_dir = 1; -+ } -+ memcpy (home_dir, p->pw_dir, home_dir_len); -+ } -+ } -+ free (malloc_pwtmpbuf); -+ } -+ else -+ { -+ if (__glibc_unlikely (malloc_name)) -+ free (name); - } - } - if (home_dir == NULL || home_dir[0] == '\0') - { -+ if (__glibc_unlikely (malloc_home_dir)) -+ free (home_dir); - if (flags & GLOB_TILDE_CHECK) -- return GLOB_NOMATCH; -+ { -+ retval = GLOB_NOMATCH; -+ goto out; -+ } - else -- home_dir = "~"; /* No luck. */ -+ { -+ home_dir = (char *) "~"; /* No luck. */ -+ malloc_home_dir = 0; -+ } - } - # endif /* WINDOWS32 */ - # endif - /* Now construct the full directory. */ - if (dirname[1] == '\0') - { -+ if (__glibc_unlikely (malloc_dirname)) -+ free (dirname); -+ - dirname = home_dir; - dirlen = strlen (dirname); -+ malloc_dirname = malloc_home_dir; - } - else - { - char *newp; - size_t home_len = strlen (home_dir); -- newp = __alloca (home_len + dirlen); -+ int use_alloca = glob_use_alloca (alloca_used, home_len + dirlen); -+ if (use_alloca) -+ newp = alloca_account (home_len + dirlen, alloca_used); -+ else -+ { -+ newp = malloc (home_len + dirlen); -+ if (newp == NULL) -+ { -+ if (__glibc_unlikely (malloc_home_dir)) -+ free (home_dir); -+ retval = GLOB_NOSPACE; -+ goto out; -+ } -+ } -+ - mempcpy (mempcpy (newp, home_dir, home_len), - &dirname[1], dirlen); -+ -+ if (__glibc_unlikely (malloc_dirname)) -+ free (dirname); -+ - dirname = newp; - dirlen += home_len - 1; -+ malloc_dirname = !use_alloca; -+ -+ if (__glibc_unlikely (malloc_home_dir)) -+ free (home_dir); - } - dirname_modified = 1; - } -@@ -678,8 +868,8 @@ - else - { - char *end_name = strchr (dirname, '/'); -- const char *user_name; -- const char *home_dir; -+ char *user_name; -+ int malloc_user_name = 0; - char *unescape = NULL; - - if (!(flags & GLOB_NOESCAPE)) -@@ -698,9 +888,18 @@ - else - { - char *newp; -- newp = __alloca (end_name - dirname); -- *((char *) mempcpy (newp, dirname + 1, end_name - dirname)) -- = '\0'; -+ if (glob_use_alloca (alloca_used, end_name - dirname)) -+ newp = alloca_account (end_name - dirname, alloca_used); -+ else -+ { -+ newp = malloc (end_name - dirname); -+ if (newp == NULL) -+ { -+ retval = GLOB_NOSPACE; -+ goto out; -+ } -+ malloc_user_name = 1; -+ } - if (unescape != NULL) - { - char *p = mempcpy (newp, dirname + 1, -@@ -734,61 +933,111 @@ - /* Look up specific user's home directory. */ - { - struct passwd *p; -+ char *malloc_pwtmpbuf = NULL; - # if defined HAVE_GETPWNAM_R || defined _LIBC -- long int buflen = GETPW_R_SIZE_MAX (); -+ long int buflenmax = GETPW_R_SIZE_MAX (); -+ size_t buflen = buflenmax; - char *pwtmpbuf; - struct passwd pwbuf; - int save = errno; - - # ifndef _LIBC -- if (buflen == -1) -- /* 'sysconf' does not support _SC_GETPW_R_SIZE_MAX. Try a -+ if (! (0 <= buflenmax && buflenmax <= SIZE_MAX)) -+ /* Perhaps 'sysconf' does not support _SC_GETPW_R_SIZE_MAX. Try a - moderate value. */ - buflen = 1024; - # endif -- pwtmpbuf = __alloca (buflen); -+ if (glob_use_alloca (alloca_used, buflen)) -+ pwtmpbuf = alloca_account (buflen, alloca_used); -+ else -+ { -+ pwtmpbuf = malloc (buflen); -+ if (pwtmpbuf == NULL) -+ { -+ nomem_getpw: -+ if (__glibc_unlikely (malloc_user_name)) -+ free (user_name); -+ retval = GLOB_NOSPACE; -+ goto out; -+ } -+ malloc_pwtmpbuf = pwtmpbuf; -+ } - - while (getpwnam_r (user_name, &pwbuf, pwtmpbuf, buflen, &p) != 0) - { -+ size_t newlen; -+ bool v; - if (errno != ERANGE) - { - p = NULL; - break; - } --# ifdef _LIBC -- pwtmpbuf = extend_alloca (pwtmpbuf, buflen, 2 * buflen); --# else -- buflen *= 2; -- pwtmpbuf = __alloca (buflen); --# endif -+ v = size_add_wrapv (buflen, buflen, &newlen); -+ if (!v && malloc_pwtmpbuf == NULL -+ && glob_use_alloca (alloca_used, newlen)) -+ pwtmpbuf = extend_alloca_account (pwtmpbuf, buflen, -+ newlen, alloca_used); -+ else -+ { -+ char *newp = v ? NULL : realloc (malloc_pwtmpbuf, newlen); -+ if (newp == NULL) -+ { -+ free (malloc_pwtmpbuf); -+ goto nomem_getpw; -+ } -+ malloc_pwtmpbuf = pwtmpbuf = newp; -+ } - __set_errno (save); - } - # else - p = getpwnam (user_name); - # endif -+ -+ if (__glibc_unlikely (malloc_user_name)) -+ free (user_name); -+ -+ /* If we found a home directory use this. */ - if (p != NULL) -- home_dir = p->pw_dir; -+ { -+ size_t home_len = strlen (p->pw_dir); -+ size_t rest_len = end_name == NULL ? 0 : strlen (end_name); -+ -+ if (__glibc_unlikely (malloc_dirname)) -+ free (dirname); -+ malloc_dirname = 0; -+ -+ if (glob_use_alloca (alloca_used, home_len + rest_len + 1)) -+ dirname = alloca_account (home_len + rest_len + 1, -+ alloca_used); -+ else -+ { -+ dirname = malloc (home_len + rest_len + 1); -+ if (dirname == NULL) -+ { -+ free (malloc_pwtmpbuf); -+ retval = GLOB_NOSPACE; -+ goto out; -+ } -+ malloc_dirname = 1; -+ } -+ *((char *) mempcpy (mempcpy (dirname, p->pw_dir, home_len), -+ end_name, rest_len)) = '\0'; -+ -+ dirlen = home_len + rest_len; -+ dirname_modified = 1; -+ -+ free (malloc_pwtmpbuf); -+ } - else -- home_dir = NULL; -+ { -+ free (malloc_pwtmpbuf); -+ -+ if (flags & GLOB_TILDE_CHECK) -+ /* We have to regard it as an error if we cannot find the -+ home directory. */ -+ return GLOB_NOMATCH; -+ } - } -- /* If we found a home directory use this. */ -- if (home_dir != NULL) -- { -- char *newp; -- size_t home_len = strlen (home_dir); -- size_t rest_len = end_name == NULL ? 0 : strlen (end_name); -- newp = __alloca (home_len + rest_len + 1); -- *((char *) mempcpy (mempcpy (newp, home_dir, home_len), -- end_name, rest_len)) = '\0'; -- dirname = newp; -- dirlen = home_len + rest_len; -- dirname_modified = 1; -- } -- else -- if (flags & GLOB_TILDE_CHECK) -- /* We have to regard it as an error if we cannot find the -- home directory. */ -- return GLOB_NOMATCH; - } - # endif /* Not Amiga && not WINDOWS32. */ - } -@@ -807,19 +1056,24 @@ - && S_ISDIR (st.st_mode)) - : (__stat64 (dirname, &st64) == 0 && S_ISDIR (st64.st_mode))))) - { -- int newcount = pglob->gl_pathc + pglob->gl_offs; -+ size_t newcount = pglob->gl_pathc + pglob->gl_offs; - char **new_gl_pathv; - -- new_gl_pathv -- = realloc (pglob->gl_pathv, (newcount + 1 + 1) * sizeof (char *)); -- if (new_gl_pathv == NULL) -+ if (newcount > SIZE_MAX / sizeof (char *) - 2) - { - nospace: -+ if (__glibc_unlikely (malloc_dirname)) -+ free (dirname); - free (pglob->gl_pathv); - pglob->gl_pathv = NULL; - pglob->gl_pathc = 0; - return GLOB_NOSPACE; - } -+ -+ new_gl_pathv = realloc (pglob->gl_pathv, -+ (newcount + 2) * sizeof (char *)); -+ if (new_gl_pathv == NULL) -+ goto nospace; - pglob->gl_pathv = new_gl_pathv; - - if (flags & GLOB_MARK) -@@ -834,9 +1088,14 @@ - } - else - { -- pglob->gl_pathv[newcount] = strdup (dirname); -- if (pglob->gl_pathv[newcount] == NULL) -- goto nospace; -+ if (__glibc_unlikely (malloc_dirname)) -+ pglob->gl_pathv[newcount] = dirname; -+ else -+ { -+ pglob->gl_pathv[newcount] = strdup (dirname); -+ if (pglob->gl_pathv[newcount] == NULL) -+ goto nospace; -+ } - } - pglob->gl_pathv[++newcount] = NULL; - ++pglob->gl_pathc; -@@ -873,7 +1132,7 @@ - *(char *) &dirname[--dirlen] = '\0'; - } - -- if (__builtin_expect ((flags & GLOB_ALTDIRFUNC) != 0, 0)) -+ if (__glibc_unlikely ((flags & GLOB_ALTDIRFUNC) != 0)) - { - /* Use the alternative access functions also in the recursive - call. */ -@@ -901,7 +1160,7 @@ - appending the results to PGLOB. */ - for (i = 0; i < dirs.gl_pathc; ++i) - { -- int old_pathc; -+ size_t old_pathc; - - #ifdef SHELL - { -@@ -920,7 +1179,7 @@ - status = glob_in_dir (filename, dirs.gl_pathv[i], - ((flags | GLOB_APPEND) - & ~(GLOB_NOCHECK | GLOB_NOMAGIC)), -- errfunc, pglob); -+ errfunc, pglob, alloca_used); - if (status == GLOB_NOMATCH) - /* No matches in this directory. Try the next. */ - continue; -@@ -956,16 +1215,20 @@ - /* No matches. */ - if (flags & GLOB_NOCHECK) - { -- int newcount = pglob->gl_pathc + pglob->gl_offs; -+ size_t newcount = pglob->gl_pathc + pglob->gl_offs; - char **new_gl_pathv; - -- new_gl_pathv = realloc (pglob->gl_pathv, -- (newcount + 2) * sizeof (char *)); -- if (new_gl_pathv == NULL) -+ if (newcount > SIZE_MAX / sizeof (char *) - 2) - { -+ nospace2: - globfree (&dirs); - return GLOB_NOSPACE; - } -+ -+ new_gl_pathv = realloc (pglob->gl_pathv, -+ (newcount + 2) * sizeof (char *)); -+ if (new_gl_pathv == NULL) -+ goto nospace2; - pglob->gl_pathv = new_gl_pathv; - - pglob->gl_pathv[newcount] = strdup (pattern); -@@ -994,7 +1257,7 @@ - } - else - { -- int old_pathc = pglob->gl_pathc; -+ size_t old_pathc = pglob->gl_pathc; - int orig_flags = flags; - - if (meta & 2) -@@ -1020,7 +1283,8 @@ - } - if (dirname_modified) - flags &= ~(GLOB_NOCHECK | GLOB_NOMAGIC); -- status = glob_in_dir (filename, dirname, flags, errfunc, pglob); -+ status = glob_in_dir (filename, dirname, flags, errfunc, pglob, -+ alloca_used); - if (status != 0) - { - if (status == GLOB_NOMATCH && flags != orig_flags -@@ -1083,26 +1347,28 @@ - sizeof (char *), collated_compare); - } - -- return 0; -+ out: -+ if (__glibc_unlikely (malloc_dirname)) -+ free (dirname); -+ -+ return retval; - } - #if defined _LIBC && !defined glob - libc_hidden_def (glob) - #endif - - --#if !defined _LIBC || !defined GLOB_ONLY_P -+#ifndef GLOB_ONLY_P - - /* Free storage allocated in PGLOB by a previous 'glob' call. */ - void --globfree (pglob) -- register glob_t *pglob; -+globfree (glob_t *pglob) - { - if (pglob->gl_pathv != NULL) - { - size_t i; - for (i = 0; i < pglob->gl_pathc; ++i) -- if (pglob->gl_pathv[pglob->gl_offs + i] != NULL) -- free (pglob->gl_pathv[pglob->gl_offs + i]); -+ free (pglob->gl_pathv[pglob->gl_offs + i]); - free (pglob->gl_pathv); - pglob->gl_pathv = NULL; - } -@@ -1136,7 +1402,7 @@ - static int - prefix_array (const char *dirname, char **array, size_t n) - { -- register size_t i; -+ size_t i; - size_t dirlen = strlen (dirname); - #if defined __MSDOS__ || defined WINDOWS32 - int sep_char = '/'; -@@ -1189,13 +1455,11 @@ - - - /* We must not compile this function twice. */ --#if !defined _LIBC || !defined NO_GLOB_PATTERN_P -+#ifndef NO_GLOB_PATTERN_P - int --__glob_pattern_type (pattern, quote) -- const char *pattern; -- int quote; -+__glob_pattern_type (const char *pattern, int quote) - { -- register const char *p; -+ const char *p; - int ret = 0; - - for (p = pattern; *p != '\0'; ++p) -@@ -1230,9 +1494,7 @@ - /* Return nonzero if PATTERN contains any metacharacters. - Metacharacters can be quoted with backslashes if QUOTE is nonzero. */ - int --__glob_pattern_p (pattern, quote) -- const char *pattern; -- int quote; -+__glob_pattern_p (const char *pattern, int quote) - { - return __glob_pattern_type (pattern, quote) == 1; - } -@@ -1241,16 +1503,13 @@ - # endif - #endif - --#endif /* !GLOB_ONLY_P */ -- - --#if !defined _LIBC || !defined GLOB_ONLY_P - /* We put this in a separate function mainly to allow the memory - allocated with alloca to be recycled. */ - static int - __attribute_noinline__ - link_exists2_p (const char *dir, size_t dirlen, const char *fname, -- glob_t *pglob -+ glob_t *pglob - # if !defined _LIBC && !HAVE_FSTATAT - , int flags - # endif -@@ -1292,7 +1551,7 @@ - return link_exists2_p (dir, dirlen, fname, pglob, flags); - # endif - } --#endif -+#endif /* !defined GLOB_ONLY_P */ - - - /* Like 'glob', but PATTERN is a final pathname component, -@@ -1302,7 +1561,7 @@ - static int - glob_in_dir (const char *pattern, const char *directory, int flags, - int (*errfunc) (const char *, int), -- glob_t *pglob) -+ glob_t *pglob, size_t alloca_used) - { - size_t dirlen = strlen (directory); - void *stream = NULL; -@@ -1312,19 +1571,19 @@ - size_t count; - char *name[64]; - }; --#define INITIAL_COUNT sizeof (init_names.name) / sizeof (init_names.name[0]) - struct globnames init_names; - struct globnames *names = &init_names; - struct globnames *names_alloca = &init_names; - size_t nfound = 0; -- size_t allocasize = sizeof (init_names); - size_t cur = 0; - int meta; - int save; - int result; - -+ alloca_used += sizeof (init_names); -+ - init_names.next = NULL; -- init_names.count = INITIAL_COUNT; -+ init_names.count = sizeof init_names.name / sizeof init_names.name[0]; - - meta = __glob_pattern_type (pattern, !(flags & GLOB_NOESCAPE)); - if (meta == 0 && (flags & (GLOB_NOCHECK|GLOB_NOMAGIC))) -@@ -1338,20 +1597,38 @@ - { - /* Since we use the normal file functions we can also use stat() - to verify the file is there. */ -- struct stat st; -- struct_stat64 st64; -+ union -+ { -+ struct stat st; -+ struct_stat64 st64; -+ } ust; - size_t patlen = strlen (pattern); -- char *fullname = __alloca (dirlen + 1 + patlen + 1); -+ size_t fullsize; -+ bool alloca_fullname -+ = (! size_add_wrapv (dirlen + 1, patlen + 1, &fullsize) -+ && glob_use_alloca (alloca_used, fullsize)); -+ char *fullname; -+ if (alloca_fullname) -+ fullname = alloca_account (fullsize, alloca_used); -+ else -+ { -+ fullname = malloc (fullsize); -+ if (fullname == NULL) -+ return GLOB_NOSPACE; -+ } - - mempcpy (mempcpy (mempcpy (fullname, directory, dirlen), - "/", 1), - pattern, patlen + 1); - if ((__builtin_expect (flags & GLOB_ALTDIRFUNC, 0) -- ? (*pglob->gl_stat) (fullname, &st) -- : __stat64 (fullname, &st64)) == 0) -+ ? (*pglob->gl_stat) (fullname, &ust.st) -+ : __stat64 (fullname, &ust.st64)) == 0) - /* We found this file to be existing. Now tell the rest - of the function to copy this name into the result. */ - flags |= GLOB_NOCHECK; -+ -+ if (__glibc_unlikely (!alloca_fullname)) -+ free (fullname); - } - else - { -@@ -1379,67 +1656,50 @@ - - while (1) - { -- const char *name; -- size_t len; --#if defined _LIBC && !defined COMPILE_GLOB64 -- struct dirent64 *d; -- union -- { -- struct dirent64 d64; -- char room [offsetof (struct dirent64, d_name[0]) -- + NAME_MAX + 1]; -- } -- d64buf; -- -- if (__builtin_expect (flags & GLOB_ALTDIRFUNC, 0)) -- { -- struct dirent *d32 = (*pglob->gl_readdir) (stream); -- if (d32 != NULL) -- { -- CONVERT_DIRENT_DIRENT64 (&d64buf.d64, d32); -- d = &d64buf.d64; -- } -- else -- d = NULL; -- } -- else -- d = __readdir64 (stream); -+ struct readdir_result d; -+ { -+ if (__builtin_expect (flags & GLOB_ALTDIRFUNC, 0)) -+ d = convert_dirent (GL_READDIR (pglob, stream)); -+ else -+ { -+#ifdef COMPILE_GLOB64 -+ d = convert_dirent (__readdir (stream)); - #else -- struct dirent *d = (__builtin_expect (flags & GLOB_ALTDIRFUNC, 0) -- ? ((struct dirent *) -- (*pglob->gl_readdir) (stream)) -- : __readdir (stream)); -+ d = convert_dirent64 (__readdir64 (stream)); - #endif -- if (d == NULL) -+ } -+ } -+ if (d.name == NULL) - break; -- if (! REAL_DIR_ENTRY (d)) -+ if (d.skip_entry) - continue; - - /* If we shall match only directories use the information - provided by the dirent call if possible. */ -- if ((flags & GLOB_ONLYDIR) && !DIRENT_MIGHT_BE_DIR (d)) -+ if ((flags & GLOB_ONLYDIR) && !readdir_result_might_be_dir (d)) - continue; - -- name = d->d_name; -- -- if (fnmatch (pattern, name, fnm_flags) == 0) -+ if (fnmatch (pattern, d.name, fnm_flags) == 0) - { - /* If the file we found is a symlink we have to - make sure the target file exists. */ -- if (!DIRENT_MIGHT_BE_SYMLINK (d) -- || link_exists_p (dfd, directory, dirlen, name, pglob, -- flags)) -+ if (!readdir_result_might_be_symlink (d) -+ || link_exists_p (dfd, directory, dirlen, d.name, -+ pglob, flags)) - { - if (cur == names->count) - { - struct globnames *newnames; - size_t count = names->count * 2; -- size_t size = (sizeof (struct globnames) -- + ((count - INITIAL_COUNT) -- * sizeof (char *))); -- allocasize += size; -- if (__libc_use_alloca (allocasize)) -- newnames = names_alloca = __alloca (size); -+ size_t nameoff = offsetof (struct globnames, name); -+ size_t size = FLEXSIZEOF (struct globnames, name, -+ count * sizeof (char *)); -+ if ((SIZE_MAX - nameoff) / 2 / sizeof (char *) -+ < names->count) -+ goto memory_error; -+ if (glob_use_alloca (alloca_used, size)) -+ newnames = names_alloca -+ = alloca_account (size, alloca_used); - else if ((newnames = malloc (size)) - == NULL) - goto memory_error; -@@ -1448,13 +1708,13 @@ - names = newnames; - cur = 0; - } -- len = _D_EXACT_NAMLEN (d); -- names->name[cur] = malloc (len + 1); -+ names->name[cur] = strdup (d.name); - if (names->name[cur] == NULL) - goto memory_error; -- *((char *) mempcpy (names->name[cur++], name, len)) -- = '\0'; -+ ++cur; - ++nfound; -+ if (SIZE_MAX - pglob->gl_offs <= nfound) -+ goto memory_error; - } - } - } -@@ -1474,11 +1734,17 @@ - result = GLOB_NOMATCH; - if (nfound != 0) - { -- char **new_gl_pathv -+ char **new_gl_pathv; -+ result = 0; -+ -+ if (SIZE_MAX / sizeof (char *) - pglob->gl_pathc -+ < pglob->gl_offs + nfound + 1) -+ goto memory_error; -+ -+ new_gl_pathv - = realloc (pglob->gl_pathv, - (pglob->gl_pathc + pglob->gl_offs + nfound + 1) - * sizeof (char *)); -- result = 0; - - if (new_gl_pathv == NULL) - { -@@ -1544,7 +1810,7 @@ - if (stream != NULL) - { - save = errno; -- if (__builtin_expect (flags & GLOB_ALTDIRFUNC, 0)) -+ if (__glibc_unlikely (flags & GLOB_ALTDIRFUNC)) - (*pglob->gl_closedir) (stream); - else - closedir (stream); -diff -durN inetutils-1.9.4.orig/lib/glob.in.h inetutils-1.9.4/lib/glob.in.h ---- inetutils-1.9.4.orig/lib/glob.in.h 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/glob.in.h 2017-05-15 17:51:15.250000000 +0800 -@@ -1,6 +1,6 @@ - /* glob.h -- Find a path matching a pattern. - -- Copyright (C) 2005-2007, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2005-2007, 2009-2017 Free Software Foundation, Inc. - - Written by Derek Price & Paul Eggert - -diff -durN inetutils-1.9.4.orig/lib/glob-libc.h inetutils-1.9.4/lib/glob-libc.h ---- inetutils-1.9.4.orig/lib/glob-libc.h 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/glob-libc.h 2017-05-15 17:51:14.953125000 +0800 -@@ -1,4 +1,4 @@ --/* Copyright (C) 1991-1992, 1995-1998, 2000-2001, 2004-2007, 2009-2015 Free -+/* Copyright (C) 1991-1992, 1995-1998, 2000-2001, 2004-2007, 2009-2017 Free - Software Foundation, Inc. - This file is part of the GNU C Library. - -@@ -158,7 +158,7 @@ - } glob64_t; - #endif - --#if __USE_FILE_OFFSET64 && __GNUC__ < 2 && !defined __GLOB_GNULIB -+#if defined __USE_FILE_OFFSET64 && __GNUC__ < 2 && !defined __GLOB_GNULIB - # define glob glob64 - # define globfree globfree64 - #endif -diff -durN inetutils-1.9.4.orig/lib/glthread/lock.c inetutils-1.9.4/lib/glthread/lock.c ---- inetutils-1.9.4.orig/lib/glthread/lock.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/glthread/lock.c 2017-05-15 17:51:15.500000000 +0800 -@@ -1,5 +1,5 @@ - /* Locking in multithreaded situations. -- Copyright (C) 2005-2015 Free Software Foundation, Inc. -+ Copyright (C) 2005-2017 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 -@@ -30,9 +30,38 @@ - - /* ------------------------- gl_rwlock_t datatype ------------------------- */ - --# if HAVE_PTHREAD_RWLOCK -+# if HAVE_PTHREAD_RWLOCK && (HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER || (defined PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP && (__GNU_LIBRARY__ > 1))) - --# if !defined PTHREAD_RWLOCK_INITIALIZER -+# ifdef PTHREAD_RWLOCK_INITIALIZER -+ -+# if !HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER -+ /* glibc with bug https://sourceware.org/bugzilla/show_bug.cgi?id=13701 */ -+ -+int -+glthread_rwlock_init_for_glibc (pthread_rwlock_t *lock) -+{ -+ pthread_rwlockattr_t attributes; -+ int err; -+ -+ err = pthread_rwlockattr_init (&attributes); -+ if (err != 0) -+ return err; -+ /* Note: PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP is the only value that -+ causes the writer to be preferred. PTHREAD_RWLOCK_PREFER_WRITER_NP does not -+ do this; see -+ http://man7.org/linux/man-pages/man3/pthread_rwlockattr_setkind_np.3.html */ -+ err = pthread_rwlockattr_setkind_np (&attributes, -+ PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP); -+ if (err == 0) -+ err = pthread_rwlock_init(lock, &attributes); -+ /* pthread_rwlockattr_destroy always returns 0. It cannot influence the -+ return value. */ -+ pthread_rwlockattr_destroy (&attributes); -+ return err; -+} -+ -+# endif -+# else - - int - glthread_rwlock_init_multithreaded (gl_rwlock_t *lock) -@@ -152,11 +181,9 @@ - if (err != 0) - return err; - /* Test whether only readers are currently running, and whether the runcount -- field will not overflow. */ -- /* POSIX says: "It is implementation-defined whether the calling thread -- acquires the lock when a writer does not hold the lock and there are -- writers blocked on the lock." Let's say, no: give the writers a higher -- priority. */ -+ field will not overflow, and whether no writer is waiting. The latter -+ condition is because POSIX recommends that "write locks shall take -+ precedence over read locks", to avoid "writer starvation". */ - while (!(lock->runcount + 1 > 0 && lock->waiting_writers_count == 0)) - { - /* This thread has to wait for a while. Enqueue it among the -@@ -481,6 +508,141 @@ - - /* ------------------------- gl_rwlock_t datatype ------------------------- */ - -+# if !HAVE_PTH_RWLOCK_ACQUIRE_PREFER_WRITER -+ -+int -+glthread_rwlock_init_multithreaded (gl_rwlock_t *lock) -+{ -+ if (!pth_mutex_init (&lock->lock)) -+ return errno; -+ if (!pth_cond_init (&lock->waiting_readers)) -+ return errno; -+ if (!pth_cond_init (&lock->waiting_writers)) -+ return errno; -+ lock->waiting_writers_count = 0; -+ lock->runcount = 0; -+ lock->initialized = 1; -+ return 0; -+} -+ -+int -+glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock) -+{ -+ if (!lock->initialized) -+ glthread_rwlock_init_multithreaded (lock); -+ if (!pth_mutex_acquire (&lock->lock, 0, NULL)) -+ return errno; -+ /* Test whether only readers are currently running, and whether the runcount -+ field will not overflow, and whether no writer is waiting. The latter -+ condition is because POSIX recommends that "write locks shall take -+ precedence over read locks", to avoid "writer starvation". */ -+ while (!(lock->runcount + 1 > 0 && lock->waiting_writers_count == 0)) -+ { -+ /* This thread has to wait for a while. Enqueue it among the -+ waiting_readers. */ -+ if (!pth_cond_await (&lock->waiting_readers, &lock->lock, NULL)) -+ { -+ int err = errno; -+ pth_mutex_release (&lock->lock); -+ return err; -+ } -+ } -+ lock->runcount++; -+ return (!pth_mutex_release (&lock->lock) ? errno : 0); -+} -+ -+int -+glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock) -+{ -+ if (!lock->initialized) -+ glthread_rwlock_init_multithreaded (lock); -+ if (!pth_mutex_acquire (&lock->lock, 0, NULL)) -+ return errno; -+ /* Test whether no readers or writers are currently running. */ -+ while (!(lock->runcount == 0)) -+ { -+ /* This thread has to wait for a while. Enqueue it among the -+ waiting_writers. */ -+ lock->waiting_writers_count++; -+ if (!pth_cond_await (&lock->waiting_writers, &lock->lock, NULL)) -+ { -+ int err = errno; -+ lock->waiting_writers_count--; -+ pth_mutex_release (&lock->lock); -+ return err; -+ } -+ lock->waiting_writers_count--; -+ } -+ lock->runcount--; /* runcount becomes -1 */ -+ return (!pth_mutex_release (&lock->lock) ? errno : 0); -+} -+ -+int -+glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock) -+{ -+ int err; -+ -+ if (!lock->initialized) -+ return EINVAL; -+ if (!pth_mutex_acquire (&lock->lock, 0, NULL)) -+ return errno; -+ if (lock->runcount < 0) -+ { -+ /* Drop a writer lock. */ -+ if (!(lock->runcount == -1)) -+ { -+ pth_mutex_release (&lock->lock); -+ return EINVAL; -+ } -+ lock->runcount = 0; -+ } -+ else -+ { -+ /* Drop a reader lock. */ -+ if (!(lock->runcount > 0)) -+ { -+ pth_mutex_release (&lock->lock); -+ return EINVAL; -+ } -+ lock->runcount--; -+ } -+ if (lock->runcount == 0) -+ { -+ /* POSIX recommends that "write locks shall take precedence over read -+ locks", to avoid "writer starvation". */ -+ if (lock->waiting_writers_count > 0) -+ { -+ /* Wake up one of the waiting writers. */ -+ if (!pth_cond_notify (&lock->waiting_writers, FALSE)) -+ { -+ int err = errno; -+ pth_mutex_release (&lock->lock); -+ return err; -+ } -+ } -+ else -+ { -+ /* Wake up all waiting readers. */ -+ if (!pth_cond_notify (&lock->waiting_readers, TRUE)) -+ { -+ int err = errno; -+ pth_mutex_release (&lock->lock); -+ return err; -+ } -+ } -+ } -+ return (!pth_mutex_release (&lock->lock) ? errno : 0); -+} -+ -+int -+glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock) -+{ -+ lock->initialized = 0; -+ return 0; -+} -+ -+# endif -+ - /* --------------------- gl_recursive_lock_t datatype --------------------- */ - - /* -------------------------- gl_once_t datatype -------------------------- */ -@@ -796,8 +958,10 @@ - } - EnterCriticalSection (&lock->lock); - /* Test whether only readers are currently running, and whether the runcount -- field will not overflow. */ -- if (!(lock->runcount + 1 > 0)) -+ field will not overflow, and whether no writer is waiting. The latter -+ condition is because POSIX recommends that "write locks shall take -+ precedence over read locks", to avoid "writer starvation". */ -+ if (!(lock->runcount + 1 > 0 && lock->waiting_writers.count == 0)) - { - /* This thread has to wait for a while. Enqueue it among the - waiting_readers. */ -diff -durN inetutils-1.9.4.orig/lib/glthread/lock.h inetutils-1.9.4/lib/glthread/lock.h ---- inetutils-1.9.4.orig/lib/glthread/lock.h 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/glthread/lock.h 2017-05-15 17:51:15.656250000 +0800 -@@ -1,5 +1,5 @@ - /* Locking in multithreaded situations. -- Copyright (C) 2005-2015 Free Software Foundation, Inc. -+ Copyright (C) 2005-2017 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 -@@ -139,6 +139,11 @@ - # pragma weak pthread_mutexattr_init - # pragma weak pthread_mutexattr_settype - # pragma weak pthread_mutexattr_destroy -+# pragma weak pthread_rwlockattr_init -+# if __GNU_LIBRARY__ > 1 -+# pragma weak pthread_rwlockattr_setkind_np -+# endif -+# pragma weak pthread_rwlockattr_destroy - # ifndef pthread_self - # pragma weak pthread_self - # endif -@@ -176,7 +181,7 @@ - - /* ------------------------- gl_rwlock_t datatype ------------------------- */ - --# if HAVE_PTHREAD_RWLOCK -+# if HAVE_PTHREAD_RWLOCK && (HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER || (defined PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP && (__GNU_LIBRARY__ > 1))) - - # ifdef PTHREAD_RWLOCK_INITIALIZER - -@@ -185,10 +190,18 @@ - STORAGECLASS pthread_rwlock_t NAME; - # define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS pthread_rwlock_t NAME = gl_rwlock_initializer; --# define gl_rwlock_initializer \ -- PTHREAD_RWLOCK_INITIALIZER --# define glthread_rwlock_init(LOCK) \ -- (pthread_in_use () ? pthread_rwlock_init (LOCK, NULL) : 0) -+# if HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER -+# define gl_rwlock_initializer \ -+ PTHREAD_RWLOCK_INITIALIZER -+# define glthread_rwlock_init(LOCK) \ -+ (pthread_in_use () ? pthread_rwlock_init (LOCK, NULL) : 0) -+# else /* glibc with bug https://sourceware.org/bugzilla/show_bug.cgi?id=13701 */ -+# define gl_rwlock_initializer \ -+ PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP -+# define glthread_rwlock_init(LOCK) \ -+ (pthread_in_use () ? glthread_rwlock_init_for_glibc (LOCK) : 0) -+extern int glthread_rwlock_init_for_glibc (pthread_rwlock_t *lock); -+# endif - # define glthread_rwlock_rdlock(LOCK) \ - (pthread_in_use () ? pthread_rwlock_rdlock (LOCK) : 0) - # define glthread_rwlock_wrlock(LOCK) \ -@@ -427,6 +440,9 @@ - - /* ------------------------- gl_rwlock_t datatype ------------------------- */ - -+/* Pth pth_rwlock_acquire always prefers readers. No autoconf test so far. */ -+# if HAVE_PTH_RWLOCK_ACQUIRE_PREFER_WRITER -+ - typedef pth_rwlock_t gl_rwlock_t; - # define gl_rwlock_define(STORAGECLASS, NAME) \ - STORAGECLASS pth_rwlock_t NAME; -@@ -445,6 +461,42 @@ - # define glthread_rwlock_destroy(LOCK) \ - ((void)(LOCK), 0) - -+# else -+ -+typedef struct -+ { -+ int initialized; -+ pth_mutex_t lock; /* protects the remaining fields */ -+ pth_cond_t waiting_readers; /* waiting readers */ -+ pth_cond_t waiting_writers; /* waiting writers */ -+ unsigned int waiting_writers_count; /* number of waiting writers */ -+ int runcount; /* number of readers running, or -1 when a writer runs */ -+ } -+ gl_rwlock_t; -+# define gl_rwlock_define(STORAGECLASS, NAME) \ -+ STORAGECLASS gl_rwlock_t NAME; -+# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ -+ STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer; -+# define gl_rwlock_initializer \ -+ { 0 } -+# define glthread_rwlock_init(LOCK) \ -+ (pth_in_use () ? glthread_rwlock_init_multithreaded (LOCK) : 0) -+# define glthread_rwlock_rdlock(LOCK) \ -+ (pth_in_use () ? glthread_rwlock_rdlock_multithreaded (LOCK) : 0) -+# define glthread_rwlock_wrlock(LOCK) \ -+ (pth_in_use () ? glthread_rwlock_wrlock_multithreaded (LOCK) : 0) -+# define glthread_rwlock_unlock(LOCK) \ -+ (pth_in_use () ? glthread_rwlock_unlock_multithreaded (LOCK) : 0) -+# define glthread_rwlock_destroy(LOCK) \ -+ (pth_in_use () ? glthread_rwlock_destroy_multithreaded (LOCK) : 0) -+extern int glthread_rwlock_init_multithreaded (gl_rwlock_t *lock); -+extern int glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock); -+extern int glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock); -+extern int glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock); -+extern int glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock); -+ -+# endif -+ - /* --------------------- gl_recursive_lock_t datatype --------------------- */ - - /* In Pth, mutexes are recursive by default. */ -diff -durN inetutils-1.9.4.orig/lib/glthread/threadlib.c inetutils-1.9.4/lib/glthread/threadlib.c ---- inetutils-1.9.4.orig/lib/glthread/threadlib.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/glthread/threadlib.c 2017-05-15 17:51:15.812500000 +0800 -@@ -1,5 +1,5 @@ - /* Multithreading primitives. -- Copyright (C) 2005-2015 Free Software Foundation, Inc. -+ Copyright (C) 2005-2017 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 -diff -durN inetutils-1.9.4.orig/lib/hard-locale.c inetutils-1.9.4/lib/hard-locale.c ---- inetutils-1.9.4.orig/lib/hard-locale.c 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/lib/hard-locale.c 2017-05-15 17:51:15.984375000 +0800 -@@ -0,0 +1,72 @@ -+/* hard-locale.c -- Determine whether a locale is hard. -+ -+ Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2017 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 -+ the Free Software Foundation; either version 3 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, see . */ -+ -+#include -+ -+#include "hard-locale.h" -+ -+#include -+#include -+#include -+ -+#ifdef __GLIBC__ -+# define GLIBC_VERSION __GLIBC__ -+#elif defined __UCLIBC__ -+# define GLIBC_VERSION 2 -+#else -+# define GLIBC_VERSION 0 -+#endif -+ -+/* Return true if the current CATEGORY locale is hard, i.e. if you -+ can't get away with assuming traditional C or POSIX behavior. */ -+bool -+hard_locale (int category) -+{ -+ bool hard = true; -+ char const *p = setlocale (category, NULL); -+ -+ if (p) -+ { -+ if (2 <= GLIBC_VERSION) -+ { -+ if (strcmp (p, "C") == 0 || strcmp (p, "POSIX") == 0) -+ hard = false; -+ } -+ else -+ { -+ char *locale = strdup (p); -+ if (locale) -+ { -+ /* Temporarily set the locale to the "C" and "POSIX" locales -+ to find their names, so that we can determine whether one -+ or the other is the caller's locale. */ -+ if (((p = setlocale (category, "C")) -+ && strcmp (p, locale) == 0) -+ || ((p = setlocale (category, "POSIX")) -+ && strcmp (p, locale) == 0)) -+ hard = false; -+ -+ /* Restore the caller's locale. */ -+ setlocale (category, locale); -+ free (locale); -+ } -+ } -+ } -+ -+ return hard; -+} -diff -durN inetutils-1.9.4.orig/lib/hard-locale.h inetutils-1.9.4/lib/hard-locale.h ---- inetutils-1.9.4.orig/lib/hard-locale.h 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/lib/hard-locale.h 2017-05-15 17:51:16.140625000 +0800 -@@ -0,0 +1,25 @@ -+/* Determine whether a locale is hard. -+ -+ Copyright (C) 1999, 2003-2004, 2009-2017 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 -+ the Free Software Foundation; either version 3 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, see . */ -+ -+#ifndef HARD_LOCALE_H_ -+# define HARD_LOCALE_H_ 1 -+ -+# include -+ -+bool hard_locale (int); -+ -+#endif /* HARD_LOCALE_H_ */ -diff -durN inetutils-1.9.4.orig/lib/inet_ntop.c inetutils-1.9.4/lib/inet_ntop.c ---- inetutils-1.9.4.orig/lib/inet_ntop.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/inet_ntop.c 2017-05-15 17:51:16.453125000 +0800 -@@ -1,6 +1,6 @@ - /* inet_ntop.c -- convert IPv4 and IPv6 addresses from binary to text form - -- Copyright (C) 2005-2006, 2008-2015 Free Software Foundation, Inc. -+ Copyright (C) 2005-2006, 2008-2017 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 -@@ -40,7 +40,7 @@ - /* Use this to suppress gcc's "...may be used before initialized" warnings. - Beware: The Code argument must not contain commas. */ - #ifndef IF_LINT --# ifdef lint -+# if defined GCC_LINT || defined lint - # define IF_LINT(Code) Code - # else - # define IF_LINT(Code) /* empty */ -diff -durN inetutils-1.9.4.orig/lib/intprops.h inetutils-1.9.4/lib/intprops.h ---- inetutils-1.9.4.orig/lib/intprops.h 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/intprops.h 2017-05-15 17:51:16.609375000 +0800 -@@ -1,10 +1,10 @@ - /* intprops.h -- properties of integer types - -- Copyright (C) 2001-2005, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2001-2017 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 -- the Free Software Foundation; either version 3 of the License, or -+ 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 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, -@@ -22,8 +22,7 @@ - - #include - --/* Return an integer value, converted to the same type as the integer -- expression E after integer type promotion. V is the unconverted value. */ -+/* Return a value with the common real type of E and V and the value of V. */ - #define _GL_INT_CONVERT(e, v) (0 * (e) + (v)) - - /* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see -@@ -37,59 +36,55 @@ - an integer. */ - #define TYPE_IS_INTEGER(t) ((t) 1.5 == 1) - --/* True if negative values of the signed integer type T use two's -- complement, ones' complement, or signed magnitude representation, -- respectively. Much GNU code assumes two's complement, but some -- people like to be portable to all possible C hosts. */ --#define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1) --#define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0) --#define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1) -- --/* True if the signed integer expression E uses two's complement. */ --#define _GL_INT_TWOS_COMPLEMENT(e) (~ _GL_INT_CONVERT (e, 0) == -1) -- --/* True if the arithmetic type T is signed. */ -+/* True if the real type T is signed. */ - #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) - --/* Return 1 if the integer expression E, after integer promotion, has -- a signed type. */ --#define _GL_INT_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0) -+/* Return 1 if the real expression E, after promotion, has a -+ signed or floating type. */ -+#define EXPR_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0) - - --/* Minimum and maximum values for integer types and expressions. These -- macros have undefined behavior if T is signed and has padding bits. -- If this is a problem for you, please let us know how to fix it for -- your host. */ -+/* Minimum and maximum values for integer types and expressions. */ -+ -+/* The width in bits of the integer type or expression T. -+ Padding bits are not supported; this is checked at compile-time below. */ -+#define TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT) - - /* The maximum and minimum values for the integer type T. */ --#define TYPE_MINIMUM(t) \ -- ((t) (! TYPE_SIGNED (t) \ -- ? (t) 0 \ -- : TYPE_SIGNED_MAGNITUDE (t) \ -- ? ~ (t) 0 \ -- : ~ TYPE_MAXIMUM (t))) -+#define TYPE_MINIMUM(t) ((t) ~ TYPE_MAXIMUM (t)) - #define TYPE_MAXIMUM(t) \ - ((t) (! TYPE_SIGNED (t) \ - ? (t) -1 \ -- : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) -+ : ((((t) 1 << (TYPE_WIDTH (t) - 2)) - 1) * 2 + 1))) - - /* The maximum and minimum values for the type of the expression E, - after integer promotion. E should not have side effects. */ - #define _GL_INT_MINIMUM(e) \ -- (_GL_INT_SIGNED (e) \ -- ? - _GL_INT_TWOS_COMPLEMENT (e) - _GL_SIGNED_INT_MAXIMUM (e) \ -+ (EXPR_SIGNED (e) \ -+ ? ~ _GL_SIGNED_INT_MAXIMUM (e) \ - : _GL_INT_CONVERT (e, 0)) - #define _GL_INT_MAXIMUM(e) \ -- (_GL_INT_SIGNED (e) \ -+ (EXPR_SIGNED (e) \ - ? _GL_SIGNED_INT_MAXIMUM (e) \ - : _GL_INT_NEGATE_CONVERT (e, 1)) - #define _GL_SIGNED_INT_MAXIMUM(e) \ -- (((_GL_INT_CONVERT (e, 1) << (sizeof ((e) + 0) * CHAR_BIT - 2)) - 1) * 2 + 1) -+ (((_GL_INT_CONVERT (e, 1) << (TYPE_WIDTH ((e) + 0) - 2)) - 1) * 2 + 1) - -+/* Work around OpenVMS incompatibility with C99. */ -+#if !defined LLONG_MAX && defined __INT64_MAX -+# define LLONG_MAX __INT64_MAX -+# define LLONG_MIN __INT64_MIN -+#endif - --/* Return 1 if the __typeof__ keyword works. This could be done by -+/* This include file assumes that signed types are two's complement without -+ padding bits; the above macros have undefined behavior otherwise. -+ If this is a problem for you, please let us know how to fix it for your host. -+ This assumption is tested by the intprops-tests module. */ -+ -+/* Does the __typeof__ keyword work? This could be done by - 'configure', but for now it's easier to do it by hand. */ --#if (2 <= __GNUC__ || defined __IBM__TYPEOF__ \ -+#if (2 <= __GNUC__ \ -+ || (1210 <= __IBMC__ && defined __IBM__TYPEOF__) \ - || (0x5110 <= __SUNPRO_C && !__STDC__)) - # define _GL_HAVE___TYPEOF__ 1 - #else -@@ -118,8 +113,7 @@ - signed, this macro may overestimate the true bound by one byte when - applied to unsigned types of size 2, 4, 16, ... bytes. */ - #define INT_STRLEN_BOUND(t) \ -- (INT_BITS_STRLEN_BOUND (sizeof (t) * CHAR_BIT \ -- - _GL_SIGNED_TYPE_OR_EXPR (t)) \ -+ (INT_BITS_STRLEN_BOUND (TYPE_WIDTH (t) - _GL_SIGNED_TYPE_OR_EXPR (t)) \ - + _GL_SIGNED_TYPE_OR_EXPR (t)) - - /* Bound on buffer size needed to represent an integer type or expression T, -@@ -224,24 +218,38 @@ - ? (a) < (min) >> (b) \ - : (max) >> (b) < (a)) - -+/* True if __builtin_add_overflow (A, B, P) works when P is non-null. */ -+#define _GL_HAS_BUILTIN_OVERFLOW (5 <= __GNUC__) -+ -+/* True if __builtin_add_overflow_p (A, B, C) works. */ -+#define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__) - - /* The _GL*_OVERFLOW macros have the same restrictions as the - *_RANGE_OVERFLOW macros, except that they do not assume that operands - (e.g., A and B) have the same type as MIN and MAX. Instead, they assume - that the result (e.g., A + B) has that type. */ --#define _GL_ADD_OVERFLOW(a, b, min, max) \ -- ((min) < 0 ? INT_ADD_RANGE_OVERFLOW (a, b, min, max) \ -- : (a) < 0 ? (b) <= (a) + (b) \ -- : (b) < 0 ? (a) <= (a) + (b) \ -- : (a) + (b) < (b)) --#define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \ -- ((min) < 0 ? INT_SUBTRACT_RANGE_OVERFLOW (a, b, min, max) \ -- : (a) < 0 ? 1 \ -- : (b) < 0 ? (a) - (b) <= (a) \ -- : (a) < (b)) --#define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \ -- (((min) == 0 && (((a) < 0 && 0 < (b)) || ((b) < 0 && 0 < (a)))) \ -- || INT_MULTIPLY_RANGE_OVERFLOW (a, b, min, max)) -+#if _GL_HAS_BUILTIN_OVERFLOW_P -+# define _GL_ADD_OVERFLOW(a, b, min, max) \ -+ __builtin_add_overflow_p (a, b, (__typeof__ ((a) + (b))) 0) -+# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \ -+ __builtin_sub_overflow_p (a, b, (__typeof__ ((a) - (b))) 0) -+# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \ -+ __builtin_mul_overflow_p (a, b, (__typeof__ ((a) * (b))) 0) -+#else -+# define _GL_ADD_OVERFLOW(a, b, min, max) \ -+ ((min) < 0 ? INT_ADD_RANGE_OVERFLOW (a, b, min, max) \ -+ : (a) < 0 ? (b) <= (a) + (b) \ -+ : (b) < 0 ? (a) <= (a) + (b) \ -+ : (a) + (b) < (b)) -+# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \ -+ ((min) < 0 ? INT_SUBTRACT_RANGE_OVERFLOW (a, b, min, max) \ -+ : (a) < 0 ? 1 \ -+ : (b) < 0 ? (a) - (b) <= (a) \ -+ : (a) < (b)) -+# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \ -+ (((min) == 0 && (((a) < 0 && 0 < (b)) || ((b) < 0 && 0 < (a)))) \ -+ || INT_MULTIPLY_RANGE_OVERFLOW (a, b, min, max)) -+#endif - #define _GL_DIVIDE_OVERFLOW(a, b, min, max) \ - ((min) < 0 ? (b) == _GL_INT_NEGATE_CONVERT (min, 1) && (a) < - (max) \ - : (a) < 0 ? (b) <= (a) + (b) - 1 \ -@@ -263,22 +271,29 @@ - : (a) % - (b)) \ - == 0) - -- --/* Integer overflow checks. -+/* Check for integer overflow, and report low order bits of answer. - - The INT__OVERFLOW macros return 1 if the corresponding C operators - might not yield numerically correct answers due to arithmetic overflow. -- They work correctly on all known practical hosts, and do not rely -+ The INT__WRAPV macros also store the low-order bits of the answer. -+ These macros work correctly on all known practical hosts, and do not rely - on undefined behavior due to signed arithmetic overflow. - -- Example usage: -+ Example usage, assuming A and B are long int: - -- long int i = ...; -- long int j = ...; -- if (INT_MULTIPLY_OVERFLOW (i, j)) -- printf ("multiply would overflow"); -+ if (INT_MULTIPLY_OVERFLOW (a, b)) -+ printf ("result would overflow\n"); - else -- printf ("product is %ld", i * j); -+ printf ("result is %ld (no overflow)\n", a * b); -+ -+ Example usage with WRAPV flavor: -+ -+ long int result; -+ bool overflow = INT_MULTIPLY_WRAPV (a, b, &result); -+ printf ("result is %ld (%s)\n", result, -+ overflow ? "after overflow" : "no overflow"); -+ -+ Restrictions on these macros: - - These macros do not check for all possible numerical problems or - undefined or unspecified behavior: they do not check for division -@@ -287,6 +302,9 @@ - These macros may evaluate their arguments zero or multiple times, so the - arguments should not have side effects. - -+ The WRAPV macros are not constant expressions. They support only -+ +, binary -, and *. The result type must be signed. -+ - These macros are tuned for their last argument being a constant. - - Return 1 if the integer expressions A * B, A - B, -A, A * B, A / B, -@@ -296,8 +314,12 @@ - _GL_BINARY_OP_OVERFLOW (a, b, _GL_ADD_OVERFLOW) - #define INT_SUBTRACT_OVERFLOW(a, b) \ - _GL_BINARY_OP_OVERFLOW (a, b, _GL_SUBTRACT_OVERFLOW) --#define INT_NEGATE_OVERFLOW(a) \ -- INT_NEGATE_RANGE_OVERFLOW (a, _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a)) -+#if _GL_HAS_BUILTIN_OVERFLOW_P -+# define INT_NEGATE_OVERFLOW(a) INT_SUBTRACT_OVERFLOW (0, a) -+#else -+# define INT_NEGATE_OVERFLOW(a) \ -+ INT_NEGATE_RANGE_OVERFLOW (a, _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a)) -+#endif - #define INT_MULTIPLY_OVERFLOW(a, b) \ - _GL_BINARY_OP_OVERFLOW (a, b, _GL_MULTIPLY_OVERFLOW) - #define INT_DIVIDE_OVERFLOW(a, b) \ -@@ -317,4 +339,111 @@ - _GL_INT_MINIMUM (0 * (b) + (a)), \ - _GL_INT_MAXIMUM (0 * (b) + (a))) - -+/* Store the low-order bits of A + B, A - B, A * B, respectively, into *R. -+ Return 1 if the result overflows. See above for restrictions. */ -+#define INT_ADD_WRAPV(a, b, r) \ -+ _GL_INT_OP_WRAPV (a, b, r, +, __builtin_add_overflow, INT_ADD_OVERFLOW) -+#define INT_SUBTRACT_WRAPV(a, b, r) \ -+ _GL_INT_OP_WRAPV (a, b, r, -, __builtin_sub_overflow, INT_SUBTRACT_OVERFLOW) -+#define INT_MULTIPLY_WRAPV(a, b, r) \ -+ _GL_INT_OP_WRAPV (a, b, r, *, __builtin_mul_overflow, INT_MULTIPLY_OVERFLOW) -+ -+/* Nonzero if this compiler has GCC bug 68193 or Clang bug 25390. See: -+ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68193 -+ https://llvm.org/bugs/show_bug.cgi?id=25390 -+ For now, assume all versions of GCC-like compilers generate bogus -+ warnings for _Generic. This matters only for older compilers that -+ lack __builtin_add_overflow. */ -+#if __GNUC__ -+# define _GL__GENERIC_BOGUS 1 -+#else -+# define _GL__GENERIC_BOGUS 0 -+#endif -+ -+/* Store the low-order bits of A B into *R, where OP specifies -+ the operation. BUILTIN is the builtin operation, and OVERFLOW the -+ overflow predicate. Return 1 if the result overflows. See above -+ for restrictions. */ -+#if _GL_HAS_BUILTIN_OVERFLOW -+# define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) builtin (a, b, r) -+#elif 201112 <= __STDC_VERSION__ && !_GL__GENERIC_BOGUS -+# define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \ -+ (_Generic \ -+ (*(r), \ -+ signed char: \ -+ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ -+ signed char, SCHAR_MIN, SCHAR_MAX), \ -+ short int: \ -+ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ -+ short int, SHRT_MIN, SHRT_MAX), \ -+ int: \ -+ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ -+ int, INT_MIN, INT_MAX), \ -+ long int: \ -+ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \ -+ long int, LONG_MIN, LONG_MAX), \ -+ long long int: \ -+ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \ -+ long long int, LLONG_MIN, LLONG_MAX))) -+#else -+# define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \ -+ (sizeof *(r) == sizeof (signed char) \ -+ ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ -+ signed char, SCHAR_MIN, SCHAR_MAX) \ -+ : sizeof *(r) == sizeof (short int) \ -+ ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ -+ short int, SHRT_MIN, SHRT_MAX) \ -+ : sizeof *(r) == sizeof (int) \ -+ ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ -+ int, INT_MIN, INT_MAX) \ -+ : _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow)) -+# ifdef LLONG_MAX -+# define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \ -+ (sizeof *(r) == sizeof (long int) \ -+ ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \ -+ long int, LONG_MIN, LONG_MAX) \ -+ : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \ -+ long long int, LLONG_MIN, LLONG_MAX)) -+# else -+# define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \ -+ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \ -+ long int, LONG_MIN, LONG_MAX) -+# endif -+#endif -+ -+/* Store the low-order bits of A B into *R, where the operation -+ is given by OP. Use the unsigned type UT for calculation to avoid -+ overflow problems. *R's type is T, with extrema TMIN and TMAX. -+ T must be a signed integer type. Return 1 if the result overflows. */ -+#define _GL_INT_OP_CALC(a, b, r, op, overflow, ut, t, tmin, tmax) \ -+ (sizeof ((a) op (b)) < sizeof (t) \ -+ ? _GL_INT_OP_CALC1 ((t) (a), (t) (b), r, op, overflow, ut, t, tmin, tmax) \ -+ : _GL_INT_OP_CALC1 (a, b, r, op, overflow, ut, t, tmin, tmax)) -+#define _GL_INT_OP_CALC1(a, b, r, op, overflow, ut, t, tmin, tmax) \ -+ ((overflow (a, b) \ -+ || (EXPR_SIGNED ((a) op (b)) && ((a) op (b)) < (tmin)) \ -+ || (tmax) < ((a) op (b))) \ -+ ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 1) \ -+ : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 0)) -+ -+/* Return the low-order bits of A B, where the operation is given -+ by OP. Use the unsigned type UT for calculation to avoid undefined -+ behavior on signed integer overflow, and convert the result to type T. -+ UT is at least as wide as T and is no narrower than unsigned int, -+ T is two's complement, and there is no padding or trap representations. -+ Assume that converting UT to T yields the low-order bits, as is -+ done in all known two's-complement C compilers. E.g., see: -+ https://gcc.gnu.org/onlinedocs/gcc/Integers-implementation.html -+ -+ According to the C standard, converting UT to T yields an -+ implementation-defined result or signal for values outside T's -+ range. However, code that works around this theoretical problem -+ runs afoul of a compiler bug in Oracle Studio 12.3 x86. See: -+ http://lists.gnu.org/archive/html/bug-gnulib/2017-04/msg00049.html -+ As the compiler bug is real, don't try to work around the -+ theoretical problem. */ -+ -+#define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, ut, t) \ -+ ((t) ((ut) (a) op (ut) (b))) -+ - #endif /* _GL_INTPROPS_H */ -diff -durN inetutils-1.9.4.orig/lib/inttostr.h inetutils-1.9.4/lib/inttostr.h ---- inetutils-1.9.4.orig/lib/inttostr.h 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/inttostr.h 2017-05-15 17:51:16.937500000 +0800 -@@ -1,6 +1,6 @@ - /* inttostr.h -- convert integers to printable strings - -- Copyright (C) 2001-2006, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2001-2006, 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/ioctl.c inetutils-1.9.4/lib/ioctl.c ---- inetutils-1.9.4.orig/lib/ioctl.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/ioctl.c 2017-05-15 17:51:17.109375000 +0800 -@@ -1,6 +1,6 @@ - /* ioctl.c --- wrappers for Windows ioctl function - -- Copyright (C) 2008-2015 Free Software Foundation, Inc. -+ Copyright (C) 2008-2017 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 -@@ -52,7 +52,11 @@ - - # include "fd-hook.h" - /* Get _get_osfhandle. */ --# include "msvc-nothrow.h" -+# if GNULIB_MSVC_NOTHROW -+# include "msvc-nothrow.h" -+# else -+# include -+# endif - - static int - primary_ioctl (int fd, int request, void *arg) -diff -durN inetutils-1.9.4.orig/lib/itold.c inetutils-1.9.4/lib/itold.c ---- inetutils-1.9.4.orig/lib/itold.c 2015-03-31 15:08:15.000000000 +0800 -+++ inetutils-1.9.4/lib/itold.c 2017-05-15 17:51:17.328125000 +0800 -@@ -1,5 +1,5 @@ - /* Replacement for 'int' to 'long double' conversion routine. -- Copyright (C) 2011-2015 Free Software Foundation, Inc. -+ Copyright (C) 2011-2017 Free Software Foundation, Inc. - Written by Bruno Haible , 2011. - - This program is free software: you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/langinfo.in.h inetutils-1.9.4/lib/langinfo.in.h ---- inetutils-1.9.4.orig/lib/langinfo.in.h 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/langinfo.in.h 2017-05-15 17:51:17.515625000 +0800 -@@ -1,5 +1,5 @@ - /* Substitute for and wrapper around . -- Copyright (C) 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/limits.in.h inetutils-1.9.4/lib/limits.in.h ---- inetutils-1.9.4.orig/lib/limits.in.h 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/lib/limits.in.h 2017-05-15 17:51:17.671875000 +0800 -@@ -0,0 +1,74 @@ -+/* A GNU-like . -+ -+ Copyright 2016-2017 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 the Free Software Foundation; either version 3, 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, see . */ -+ -+#ifndef _@GUARD_PREFIX@_LIMITS_H -+ -+#if __GNUC__ >= 3 -+@PRAGMA_SYSTEM_HEADER@ -+#endif -+@PRAGMA_COLUMNS@ -+ -+/* The include_next requires a split double-inclusion guard. */ -+#@INCLUDE_NEXT@ @NEXT_LIMITS_H@ -+ -+#ifndef _@GUARD_PREFIX@_LIMITS_H -+#define _@GUARD_PREFIX@_LIMITS_H -+ -+/* For HP-UX 11.31. */ -+#if defined LONG_LONG_MIN && !defined LLONG_MIN -+# define LLONG_MIN LONG_LONG_MIN -+#endif -+#if defined LONG_LONG_MAX && !defined LLONG_MAX -+# define LLONG_MAX LONG_LONG_MAX -+#endif -+#if defined ULONG_LONG_MAX && !defined ULLONG_MAX -+# define ULLONG_MAX ULONG_LONG_MAX -+#endif -+ -+/* The number of usable bits in an unsigned or signed integer type -+ with minimum value MIN and maximum value MAX, as an int expression -+ suitable in #if. Cover all known practical hosts. This -+ implementation exploits the fact that MAX is 1 less than a power of -+ 2, and merely counts the number of 1 bits in MAX; "COBn" means -+ "count the number of 1 bits in the low-order n bits"). */ -+#define _GL_INTEGER_WIDTH(min, max) (((min) < 0) + _GL_COB128 (max)) -+#define _GL_COB128(n) (_GL_COB64 ((n) >> 31 >> 31 >> 2) + _GL_COB64 (n)) -+#define _GL_COB64(n) (_GL_COB32 ((n) >> 31 >> 1) + _GL_COB32 (n)) -+#define _GL_COB32(n) (_GL_COB16 ((n) >> 16) + _GL_COB16 (n)) -+#define _GL_COB16(n) (_GL_COB8 ((n) >> 8) + _GL_COB8 (n)) -+#define _GL_COB8(n) (_GL_COB4 ((n) >> 4) + _GL_COB4 (n)) -+#define _GL_COB4(n) (!!((n) & 8) + !!((n) & 4) + !!((n) & 2) + !!((n) & 1)) -+ -+/* Macros specified by ISO/IEC TS 18661-1:2014. */ -+ -+#if (! defined ULLONG_WIDTH \ -+ && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__)) -+# define CHAR_WIDTH _GL_INTEGER_WIDTH (CHAR_MIN, CHAR_MAX) -+# define SCHAR_WIDTH _GL_INTEGER_WIDTH (SCHAR_MIN, SCHAR_MAX) -+# define UCHAR_WIDTH _GL_INTEGER_WIDTH (0, UCHAR_MAX) -+# define SHRT_WIDTH _GL_INTEGER_WIDTH (SHRT_MIN, SHRT_MAX) -+# define USHRT_WIDTH _GL_INTEGER_WIDTH (0, USHRT_MAX) -+# define INT_WIDTH _GL_INTEGER_WIDTH (INT_MIN, INT_MAX) -+# define UINT_WIDTH _GL_INTEGER_WIDTH (0, UINT_MAX) -+# define LONG_WIDTH _GL_INTEGER_WIDTH (LONG_MIN, LONG_MAX) -+# define ULONG_WIDTH _GL_INTEGER_WIDTH (0, ULONG_MAX) -+# define LLONG_WIDTH _GL_INTEGER_WIDTH (LLONG_MIN, LLONG_MAX) -+# define ULLONG_WIDTH _GL_INTEGER_WIDTH (0, ULLONG_MAX) -+#endif /* !ULLONG_WIDTH && (_GNU_SOURCE || __STDC_WANT_IEC_60559_BFP_EXT__) */ -+ -+#endif /* _@GUARD_PREFIX@_LIMITS_H */ -+#endif /* _@GUARD_PREFIX@_LIMITS_H */ -diff -durN inetutils-1.9.4.orig/lib/localcharset.c inetutils-1.9.4/lib/localcharset.c ---- inetutils-1.9.4.orig/lib/localcharset.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/localcharset.c 2017-05-15 17:51:17.859375000 +0800 -@@ -1,6 +1,6 @@ - /* Determine a canonical name for the current locale's character encoding. - -- Copyright (C) 2000-2006, 2008-2015 Free Software Foundation, Inc. -+ Copyright (C) 2000-2006, 2008-2017 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 -@@ -32,7 +32,7 @@ - # define DARWIN7 /* Darwin 7 or newer, i.e. Mac OS X 10.3 or newer */ - #endif - --#if defined _WIN32 || defined __WIN32__ -+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - # define WINDOWS_NATIVE - # include - #endif -@@ -507,7 +507,7 @@ - current_locale = setlocale (LC_CTYPE, NULL); - - pdot = strrchr (current_locale, '.'); -- if (pdot) -+ if (pdot && 2 + strlen (pdot + 1) + 1 <= sizeof (buf)) - sprintf (buf, "CP%s", pdot + 1); - else - { -diff -durN inetutils-1.9.4.orig/lib/localcharset.h inetutils-1.9.4/lib/localcharset.h ---- inetutils-1.9.4.orig/lib/localcharset.h 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/localcharset.h 2017-05-15 17:51:18.031250000 +0800 -@@ -1,5 +1,5 @@ - /* Determine a canonical name for the current locale's character encoding. -- Copyright (C) 2000-2003, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2000-2003, 2009-2017 Free Software Foundation, Inc. - This file is part of the GNU CHARSET Library. - - This program is free software; you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/locale.in.h inetutils-1.9.4/lib/locale.in.h ---- inetutils-1.9.4.orig/lib/locale.in.h 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/locale.in.h 2017-05-15 17:51:18.203125000 +0800 -@@ -1,5 +1,5 @@ - /* A POSIX . -- Copyright (C) 2007-2015 Free Software Foundation, Inc. -+ Copyright (C) 2007-2017 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 -diff -durN inetutils-1.9.4.orig/lib/localeconv.c inetutils-1.9.4/lib/localeconv.c ---- inetutils-1.9.4.orig/lib/localeconv.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/localeconv.c 2017-05-15 17:51:18.343750000 +0800 -@@ -1,5 +1,5 @@ - /* Query locale dependent information for formatting numbers. -- Copyright (C) 2012-2015 Free Software Foundation, Inc. -+ Copyright (C) 2012-2017 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 -diff -durN inetutils-1.9.4.orig/lib/localtime-buffer.c inetutils-1.9.4/lib/localtime-buffer.c ---- inetutils-1.9.4.orig/lib/localtime-buffer.c 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/lib/localtime-buffer.c 2017-05-15 17:51:18.484375000 +0800 -@@ -0,0 +1,58 @@ -+/* Provide access to the last buffer returned by localtime() or gmtime(). -+ -+ Copyright (C) 2001-2003, 2005-2007, 2009-2017 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 -+ the Free Software Foundation; either version 3, 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, see . */ -+ -+/* written by Jim Meyering */ -+ -+#include -+ -+/* Specification. */ -+#include "localtime-buffer.h" -+ -+#if GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME -+ -+static struct tm tm_zero_buffer; -+struct tm *localtime_buffer_addr = &tm_zero_buffer; -+ -+/* This is a wrapper for localtime. -+ -+ On the first call, record the address of the static buffer that -+ localtime uses for its result. */ -+ -+struct tm * -+rpl_localtime (time_t const *timep) -+{ -+ struct tm *tm = localtime (timep); -+ -+ if (localtime_buffer_addr == &tm_zero_buffer) -+ localtime_buffer_addr = tm; -+ -+ return tm; -+} -+ -+/* Same as above, since gmtime and localtime use the same buffer. */ -+struct tm * -+rpl_gmtime (time_t const *timep) -+{ -+ struct tm *tm = gmtime (timep); -+ -+ if (localtime_buffer_addr == &tm_zero_buffer) -+ localtime_buffer_addr = tm; -+ -+ return tm; -+} -+ -+#endif -diff -durN inetutils-1.9.4.orig/lib/localtime-buffer.h inetutils-1.9.4/lib/localtime-buffer.h ---- inetutils-1.9.4.orig/lib/localtime-buffer.h 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/lib/localtime-buffer.h 2017-05-15 17:51:18.625000000 +0800 -@@ -0,0 +1,27 @@ -+/* Provide access to the last buffer returned by localtime() or gmtime(). -+ -+ Copyright (C) 2001-2003, 2005-2007, 2009-2017 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 -+ the Free Software Foundation; either version 3, 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, see . */ -+ -+/* written by Jim Meyering */ -+ -+#include -+ -+#if GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME -+ -+/* The address of the last buffer returned by localtime() or gmtime(). */ -+extern struct tm *localtime_buffer_addr; -+ -+#endif -diff -durN inetutils-1.9.4.orig/lib/login_tty.c inetutils-1.9.4/lib/login_tty.c ---- inetutils-1.9.4.orig/lib/login_tty.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/login_tty.c 2017-05-15 17:51:18.781250000 +0800 -@@ -1,6 +1,6 @@ - /* Assign a given terminal as controlling terminal and as standard input, - standard output, standard error of the current process. -- Copyright (C) 2010-2015 Free Software Foundation, Inc. -+ Copyright (C) 2010-2017 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 -diff -durN inetutils-1.9.4.orig/lib/lseek.c inetutils-1.9.4/lib/lseek.c ---- inetutils-1.9.4.orig/lib/lseek.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/lseek.c 2017-05-15 17:51:18.953125000 +0800 -@@ -1,5 +1,5 @@ - /* An lseek() function that detects pipes. -- Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2007, 2009-2017 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 -@@ -24,7 +24,11 @@ - /* Get GetFileType. */ - # include - /* Get _get_osfhandle. */ --# include "msvc-nothrow.h" -+# if GNULIB_MSVC_NOTHROW -+# include "msvc-nothrow.h" -+# else -+# include -+# endif - #else - # include - #endif -diff -durN inetutils-1.9.4.orig/lib/lstat.c inetutils-1.9.4/lib/lstat.c ---- inetutils-1.9.4.orig/lib/lstat.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/lstat.c 2017-05-15 17:51:19.078125000 +0800 -@@ -1,6 +1,6 @@ - /* Work around a bug of lstat on some systems - -- Copyright (C) 1997-2006, 2008-2015 Free Software Foundation, Inc. -+ Copyright (C) 1997-2006, 2008-2017 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 -diff -durN inetutils-1.9.4.orig/lib/Makefile.am inetutils-1.9.4/lib/Makefile.am ---- inetutils-1.9.4.orig/lib/Makefile.am 2015-05-12 20:39:25.000000000 +0800 -+++ inetutils-1.9.4/lib/Makefile.am 2017-05-15 17:54:34.468750000 +0800 -@@ -1,6 +1,6 @@ - ## DO NOT EDIT! GENERATED AUTOMATICALLY! - ## Process this file with automake to produce Makefile.in. --# Copyright (C) 2002-2015 Free Software Foundation, Inc. -+# Copyright (C) 2002-2017 Free Software Foundation, Inc. - # - # 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 -@@ -21,7 +21,7 @@ - # the same distribution terms as the rest of that program. - # - # Generated by gnulib-tool. --# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --no-conditional-dependencies --no-libtool --macro-prefix=gl alloca alloca-opt announce-gen argp argp-version-etc autobuild dirfd dirname-lgpl error exitfail extensions fdl-1.3 filemode forkpty gendocs getaddrinfo getcwd getline getopt-gnu getpass gettext gettext-h getusershell git-version-gen glob gnupload inttostr ioctl maintainer-makefile malloc-gnu mempcpy mgetgroups minmax mkstemp obstack poll progname read-file readutmp realloc-gnu regex setenv sethostname signal size_max snippet/unused-parameter snprintf stdbool stdint strchrnul strerror strndup strnlen sysexits termios unistd-safer update-copyright vasnprintf version-etc-fsf vsnprintf xalloc xalloc-die xgetcwd xgetdomainname xgethostname xsize xvasprintf -+# Reproduce by: gnulib-tool --import --local-dir=gl --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --no-conditional-dependencies --no-libtool --macro-prefix=gl alloca alloca-opt argp argp-version-etc autobuild dirfd dirname-lgpl error exitfail extensions fdl-1.3 filemode forkpty gendocs getaddrinfo getcwd getline getopt-gnu getpass gettext gettext-h getusershell git-version-gen glob gnupload inttostr ioctl maintainer-makefile malloc-gnu mempcpy mgetgroups minmax mkstemp obstack poll progname read-file readutmp realloc-gnu regex setenv sethostname signal size_max snippet/unused-parameter snprintf stdbool stdint strchrnul strerror strndup strnlen sysexits termios unistd-safer update-copyright vasnprintf version-etc-fsf vsnprintf xalloc xalloc-die xgetcwd xgetdomainname xgethostname xsize xvasprintf - - AUTOMAKE_OPTIONS = 1.9.6 gnits subdir-objects - -@@ -37,6 +37,7 @@ - CLEANFILES = - DISTCLEANFILES = - MAINTAINERCLEANFILES = -+# No GNU Make output. - - AM_CPPFLAGS = - AM_CFLAGS = -@@ -98,19 +99,9 @@ - - ## end gnulib module alloca-opt - --## begin gnulib module announce-gen -- -- --EXTRA_DIST += $(top_srcdir)/build-aux/announce-gen -- --## end gnulib module announce-gen -- - ## begin gnulib module argp - --libgnu_a_SOURCES += argp.h argp-ba.c argp-eexst.c \ -- argp-fmtstream.c argp-fmtstream.h argp-fs-xinl.c argp-help.c \ -- argp-namefrob.h argp-parse.c argp-pin.c argp-pv.c argp-pvh.c \ -- argp-xinl.c -+libgnu_a_SOURCES += argp.h argp-ba.c argp-eexst.c argp-fmtstream.c argp-fmtstream.h argp-fs-xinl.c argp-help.c argp-namefrob.h argp-parse.c argp-pin.c argp-pv.c argp-pvh.c argp-xinl.c - - ## end gnulib module argp - -@@ -495,6 +486,13 @@ - - ## end gnulib module filenamecat-lgpl - -+## begin gnulib module flexmember -+ -+ -+EXTRA_DIST += flexmember.h -+ -+## end gnulib module flexmember -+ - ## begin gnulib module float - - BUILT_SOURCES += $(FLOAT_H) -@@ -599,9 +597,9 @@ - ## begin gnulib module fstat - - --EXTRA_DIST += fstat.c -+EXTRA_DIST += fstat.c stat-w32.c stat-w32.h - --EXTRA_libgnu_a_SOURCES += fstat.c -+EXTRA_libgnu_a_SOURCES += fstat.c stat-w32.c - - ## end gnulib module fstat - -@@ -731,11 +729,11 @@ - - ## begin gnulib module getopt-posix - --BUILT_SOURCES += $(GETOPT_H) -+BUILT_SOURCES += $(GETOPT_H) $(GETOPT_CDEFS_H) - - # We need the following in order to create when the system - # doesn't have one that works with the given compiler. --getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H) -+getopt.h: getopt.in.h $(top_builddir)/config.status - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -@@ -748,9 +746,18 @@ - < $(srcdir)/getopt.in.h; \ - } > $@-t && \ - mv -f $@-t $@ --MOSTLYCLEANFILES += getopt.h getopt.h-t - --EXTRA_DIST += getopt.c getopt.in.h getopt1.c getopt_int.h -+getopt-cdefs.h: getopt-cdefs.in.h $(top_builddir)/config.status -+ $(AM_V_GEN)rm -f $@-t $@ && \ -+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ -+ sed -e 's|@''HAVE_SYS_CDEFS_H''@|$(HAVE_SYS_CDEFS_H)|g' \ -+ < $(srcdir)/getopt-cdefs.in.h; \ -+ } > $@-t && \ -+ mv -f $@-t $@ -+ -+MOSTLYCLEANFILES += getopt.h getopt.h-t getopt-cdefs.h getopt-cdefs.h-t -+ -+EXTRA_DIST += getopt-cdefs.in.h getopt-core.h getopt-ext.h getopt-pfx-core.h getopt-pfx-ext.h getopt.c getopt.in.h getopt1.c getopt_int.h - - EXTRA_libgnu_a_SOURCES += getopt.c getopt1.c - -@@ -765,6 +772,12 @@ - - ## end gnulib module getpass - -+## begin gnulib module getprogname -+ -+libgnu_a_SOURCES += getprogname.h getprogname.c -+ -+## end gnulib module getprogname -+ - ## begin gnulib module gettext - - # If your project uses "gettextize --intl" to put a source-code -@@ -852,12 +865,11 @@ - - ## begin gnulib module gnumakefile - -+EXTRA_DIST += $(top_srcdir)/GNUmakefile - distclean-local: clean-GNUmakefile - clean-GNUmakefile: - test '$(srcdir)' = . || rm -f $(top_builddir)/GNUmakefile - --EXTRA_DIST += $(top_srcdir)/GNUmakefile -- - ## end gnulib module gnumakefile - - ## begin gnulib module gnupload -@@ -867,6 +879,14 @@ - - ## end gnulib module gnupload - -+## begin gnulib module hard-locale -+ -+libgnu_a_SOURCES += hard-locale.c -+ -+EXTRA_DIST += hard-locale.h -+ -+## end gnulib module hard-locale -+ - ## begin gnulib module havelib - - -@@ -892,12 +912,7 @@ - - ## begin gnulib module inttostr - --libgnu_a_SOURCES += \ -- imaxtostr.c \ -- inttostr.c \ -- offtostr.c \ -- uinttostr.c \ -- umaxtostr.c -+libgnu_a_SOURCES += imaxtostr.c inttostr.c offtostr.c uinttostr.c umaxtostr.c - - EXTRA_DIST += anytostr.c inttostr.h - -@@ -947,6 +962,34 @@ - - ## end gnulib module langinfo - -+## begin gnulib module limits-h -+ -+BUILT_SOURCES += $(LIMITS_H) -+ -+# We need the following in order to create when the system -+# doesn't have one that is compatible with GNU. -+if GL_GENERATE_LIMITS_H -+limits.h: limits.in.h $(top_builddir)/config.status -+ $(AM_V_GEN)rm -f $@-t $@ && \ -+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ -+ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -+ -e 's|@''NEXT_LIMITS_H''@|$(NEXT_LIMITS_H)|g' \ -+ < $(srcdir)/limits.in.h; \ -+ } > $@-t && \ -+ mv $@-t $@ -+else -+limits.h: $(top_builddir)/config.status -+ rm -f $@ -+endif -+MOSTLYCLEANFILES += limits.h limits.h-t -+ -+EXTRA_DIST += limits.in.h -+ -+## end gnulib module limits-h -+ - ## begin gnulib module localcharset - - libgnu_a_SOURCES += localcharset.h localcharset.c -@@ -1065,6 +1108,15 @@ - - ## end gnulib module localeconv - -+## begin gnulib module localtime-buffer -+ -+ -+EXTRA_DIST += localtime-buffer.c localtime-buffer.h -+ -+EXTRA_libgnu_a_SOURCES += localtime-buffer.c -+ -+## end gnulib module localtime-buffer -+ - ## begin gnulib module lock - - libgnu_a_SOURCES += glthread/lock.h glthread/lock.c -@@ -1635,106 +1687,60 @@ - ## begin gnulib module snippet/_Noreturn - - # Because this Makefile snippet defines a variable used by other --# gnulib Makefile snippets, it must be present in all Makefile.am that -+# gnulib Makefile snippets, it must be present in all makefiles that - # need it. This is ensured by the applicability 'all' defined above. - --_NORETURN_H=$(top_srcdir)/build-aux/snippet/_Noreturn.h -+_NORETURN_H=$(srcdir)/_Noreturn.h - --EXTRA_DIST += $(top_srcdir)/build-aux/snippet/_Noreturn.h -+EXTRA_DIST += _Noreturn.h - - ## end gnulib module snippet/_Noreturn - - ## begin gnulib module snippet/arg-nonnull - --# The BUILT_SOURCES created by this Makefile snippet are not used via #include --# statements but through direct file reference. Therefore this snippet must be --# present in all Makefile.am that need it. This is ensured by the applicability --# 'all' defined above. -- --BUILT_SOURCES += arg-nonnull.h --# The arg-nonnull.h that gets inserted into generated .h files is the same as --# build-aux/snippet/arg-nonnull.h, except that it has the copyright header cut --# off. --arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h -- $(AM_V_GEN)rm -f $@-t $@ && \ -- sed -n -e '/GL_ARG_NONNULL/,$$p' \ -- < $(top_srcdir)/build-aux/snippet/arg-nonnull.h \ -- > $@-t && \ -- mv $@-t $@ --MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t -+# Because this Makefile snippet defines a variable used by other -+# gnulib Makefile snippets, it must be present in all makefiles that -+# need it. This is ensured by the applicability 'all' defined above. - --ARG_NONNULL_H=arg-nonnull.h -+ARG_NONNULL_H=$(srcdir)/arg-nonnull.h - --EXTRA_DIST += $(top_srcdir)/build-aux/snippet/arg-nonnull.h -+EXTRA_DIST += arg-nonnull.h - - ## end gnulib module snippet/arg-nonnull - - ## begin gnulib module snippet/c++defs - --# The BUILT_SOURCES created by this Makefile snippet are not used via #include --# statements but through direct file reference. Therefore this snippet must be --# present in all Makefile.am that need it. This is ensured by the applicability --# 'all' defined above. -- --BUILT_SOURCES += c++defs.h --# The c++defs.h that gets inserted into generated .h files is the same as --# build-aux/snippet/c++defs.h, except that it has the copyright header cut off. --c++defs.h: $(top_srcdir)/build-aux/snippet/c++defs.h -- $(AM_V_GEN)rm -f $@-t $@ && \ -- sed -n -e '/_GL_CXXDEFS/,$$p' \ -- < $(top_srcdir)/build-aux/snippet/c++defs.h \ -- > $@-t && \ -- mv $@-t $@ --MOSTLYCLEANFILES += c++defs.h c++defs.h-t -+# Because this Makefile snippet defines a variable used by other -+# gnulib Makefile snippets, it must be present in all makefiles that -+# need it. This is ensured by the applicability 'all' defined above. - --CXXDEFS_H=c++defs.h -+CXXDEFS_H=$(srcdir)/c++defs.h - --EXTRA_DIST += $(top_srcdir)/build-aux/snippet/c++defs.h -+EXTRA_DIST += c++defs.h - - ## end gnulib module snippet/c++defs - - ## begin gnulib module snippet/unused-parameter - --# The BUILT_SOURCES created by this Makefile snippet are not used via #include --# statements but through direct file reference. Therefore this snippet must be --# present in all Makefile.am that need it. This is ensured by the applicability --# 'all' defined above. -- --BUILT_SOURCES += unused-parameter.h --# The unused-parameter.h that gets inserted into generated .h files is the same --# as build-aux/snippet/unused-parameter.h, except that it has the copyright --# header cut off. --unused-parameter.h: $(top_srcdir)/build-aux/snippet/unused-parameter.h -- $(AM_V_GEN)rm -f $@-t $@ && \ -- sed -n -e '/GL_UNUSED_PARAMETER/,$$p' \ -- < $(top_srcdir)/build-aux/snippet/unused-parameter.h \ -- > $@-t && \ -- mv $@-t $@ --MOSTLYCLEANFILES += unused-parameter.h unused-parameter.h-t -+# Because this Makefile snippet defines a variable used by other -+# gnulib Makefile snippets, it must be present in all makefiles that -+# need it. This is ensured by the applicability 'all' defined above. - --UNUSED_PARAMETER_H=unused-parameter.h -+UNUSED_PARAMETER_H=$(srcdir)/unused-parameter.h - --EXTRA_DIST += $(top_srcdir)/build-aux/snippet/unused-parameter.h -+EXTRA_DIST += unused-parameter.h - - ## end gnulib module snippet/unused-parameter - - ## begin gnulib module snippet/warn-on-use - --BUILT_SOURCES += warn-on-use.h --# The warn-on-use.h that gets inserted into generated .h files is the same as --# build-aux/snippet/warn-on-use.h, except that it has the copyright header cut --# off. --warn-on-use.h: $(top_srcdir)/build-aux/snippet/warn-on-use.h -- $(AM_V_GEN)rm -f $@-t $@ && \ -- sed -n -e '/^.ifndef/,$$p' \ -- < $(top_srcdir)/build-aux/snippet/warn-on-use.h \ -- > $@-t && \ -- mv $@-t $@ --MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t -+# Because this Makefile snippet defines a variable used by other -+# gnulib Makefile snippets, it must be present in all makefiles that -+# need it. This is ensured by the applicability 'all' defined above. - --WARN_ON_USE_H=warn-on-use.h -+WARN_ON_USE_H=$(srcdir)/warn-on-use.h - --EXTRA_DIST += $(top_srcdir)/build-aux/snippet/warn-on-use.h -+EXTRA_DIST += warn-on-use.h - - ## end gnulib module snippet/warn-on-use - -@@ -1758,9 +1764,9 @@ - ## begin gnulib module stat - - --EXTRA_DIST += stat.c -+EXTRA_DIST += stat-w32.c stat-w32.h stat.c - --EXTRA_libgnu_a_SOURCES += stat.c -+EXTRA_libgnu_a_SOURCES += stat-w32.c stat.c - - ## end gnulib module stat - -@@ -1885,6 +1891,7 @@ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \ -+ -e 's/@''HAVE_C99_STDINT_H''@/$(HAVE_C99_STDINT_H)/g' \ - -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \ - -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ - -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \ -@@ -1906,6 +1913,7 @@ - -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \ - -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \ - -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \ -+ -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \ - < $(srcdir)/stdint.in.h; \ - } > $@-t && \ - mv $@-t $@ -@@ -2110,6 +2118,7 @@ - -e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \ - -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \ - -e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \ -+ -e 's|@''HAVE_QSORT_R''@|$(HAVE_QSORT_R)|g' \ - -e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|g' \ - -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \ - -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ -@@ -2493,6 +2502,7 @@ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \ - -e 's|@''WINDOWS_64_BIT_ST_SIZE''@|$(WINDOWS_64_BIT_ST_SIZE)|g' \ -+ -e 's|@''WINDOWS_STAT_TIMESPEC''@|$(WINDOWS_STAT_TIMESPEC)|g' \ - -e 's/@''GNULIB_FCHMODAT''@/$(GNULIB_FCHMODAT)/g' \ - -e 's/@''GNULIB_FSTAT''@/$(GNULIB_FSTAT)/g' \ - -e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \ -@@ -2506,6 +2516,7 @@ - -e 's/@''GNULIB_MKNODAT''@/$(GNULIB_MKNODAT)/g' \ - -e 's/@''GNULIB_STAT''@/$(GNULIB_STAT)/g' \ - -e 's/@''GNULIB_UTIMENSAT''@/$(GNULIB_UTIMENSAT)/g' \ -+ -e 's/@''GNULIB_OVERRIDES_STRUCT_STAT''@/$(GNULIB_OVERRIDES_STRUCT_STAT)/g' \ - -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \ - -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \ - -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \ -@@ -2589,6 +2600,7 @@ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_SYS_TYPES_H''@|$(NEXT_SYS_TYPES_H)|g' \ - -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \ -+ -e 's|@''WINDOWS_STAT_INODES''@|$(WINDOWS_STAT_INODES)|g' \ - < $(srcdir)/sys_types.in.h; \ - } > $@-t && \ - mv $@-t $@ -@@ -2711,22 +2723,31 @@ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \ -- -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \ -+ -e 's/@''GNULIB_CTIME''@/$(GNULIB_CTIME)/g' \ -+ -e 's/@''GNULIB_LOCALTIME''@/$(GNULIB_LOCALTIME)/g' \ - -e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \ - -e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/g' \ -+ -e 's/@''GNULIB_STRFTIME''@/$(GNULIB_STRFTIME)/g' \ - -e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \ - -e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \ - -e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \ -+ -e 's/@''GNULIB_TIME_RZ''@/$(GNULIB_TIME_RZ)/g' \ -+ -e 's/@''GNULIB_TZSET''@/$(GNULIB_TZSET)/g' \ - -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \ - -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \ - -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \ - -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \ -+ -e 's|@''HAVE_TIMEZONE_T''@|$(HAVE_TIMEZONE_T)|g' \ -+ -e 's|@''HAVE_TZSET''@|$(HAVE_TZSET)|g' \ -+ -e 's|@''REPLACE_CTIME''@|$(REPLACE_CTIME)|g' \ - -e 's|@''REPLACE_GMTIME''@|$(REPLACE_GMTIME)|g' \ - -e 's|@''REPLACE_LOCALTIME''@|$(REPLACE_LOCALTIME)|g' \ - -e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \ - -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \ - -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \ -+ -e 's|@''REPLACE_STRFTIME''@|$(REPLACE_STRFTIME)|g' \ - -e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \ -+ -e 's|@''REPLACE_TZSET''@|$(REPLACE_TZSET)|g' \ - -e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \ - -e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ - -e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ -@@ -2801,6 +2822,7 @@ - -e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \ - -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \ - -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \ -+ -e 's/@''GNULIB_TRUNCATE''@/$(GNULIB_TRUNCATE)/g' \ - -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \ - -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_GL_UNISTD_H_GETOPT)/g' \ - -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \ -@@ -2823,7 +2845,6 @@ - -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \ - -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \ - -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \ -- -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \ - -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \ - -e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \ - -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \ -@@ -2839,12 +2860,14 @@ - -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \ - -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \ - -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \ -+ -e 's|@''HAVE_TRUNCATE''@|$(HAVE_TRUNCATE)|g' \ - -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \ - -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \ - -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \ - -e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \ - -e 's|@''HAVE_DECL_FDATASYNC''@|$(HAVE_DECL_FDATASYNC)|g' \ - -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \ -+ -e 's|@''HAVE_DECL_GETLOGIN''@|$(HAVE_DECL_GETLOGIN)|g' \ - -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \ - -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \ - -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \ -@@ -2879,6 +2902,7 @@ - -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \ - -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \ - -e 's|@''REPLACE_SYMLINKAT''@|$(REPLACE_SYMLINKAT)|g' \ -+ -e 's|@''REPLACE_TRUNCATE''@|$(REPLACE_TRUNCATE)|g' \ - -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \ - -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \ - -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \ -@@ -2988,6 +3012,8 @@ - -e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \ - -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \ - -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \ -+ -e 's/@''HAVE_CRTDEFS_H''@/$(HAVE_CRTDEFS_H)/g' \ -+ -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \ - -e 's/@''GNULIB_BTOWC''@/$(GNULIB_BTOWC)/g' \ - -e 's/@''GNULIB_WCTOB''@/$(GNULIB_WCTOB)/g' \ - -e 's/@''GNULIB_MBSINIT''@/$(GNULIB_MBSINIT)/g' \ -@@ -3027,6 +3053,7 @@ - -e 's/@''GNULIB_WCSSTR''@/$(GNULIB_WCSSTR)/g' \ - -e 's/@''GNULIB_WCSTOK''@/$(GNULIB_WCSTOK)/g' \ - -e 's/@''GNULIB_WCSWIDTH''@/$(GNULIB_WCSWIDTH)/g' \ -+ -e 's/@''GNULIB_WCSFTIME''@/$(GNULIB_WCSFTIME)/g' \ - < $(srcdir)/wchar.in.h | \ - sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \ - -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \ -@@ -3066,6 +3093,7 @@ - -e 's|@''HAVE_WCSSTR''@|$(HAVE_WCSSTR)|g' \ - -e 's|@''HAVE_WCSTOK''@|$(HAVE_WCSTOK)|g' \ - -e 's|@''HAVE_WCSWIDTH''@|$(HAVE_WCSWIDTH)|g' \ -+ -e 's|@''HAVE_WCSFTIME''@|$(HAVE_WCSFTIME)|g' \ - -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \ - -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \ - | \ -@@ -3082,6 +3110,7 @@ - -e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \ - -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \ - -e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|g' \ -+ -e 's|@''REPLACE_WCSFTIME''@|$(REPLACE_WCSFTIME)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ -@@ -3118,6 +3147,8 @@ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \ -+ -e 's/@''HAVE_CRTDEFS_H''@/$(HAVE_CRTDEFS_H)/g' \ -+ -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \ - -e 's/@''GNULIB_ISWBLANK''@/$(GNULIB_ISWBLANK)/g' \ - -e 's/@''GNULIB_WCTYPE''@/$(GNULIB_WCTYPE)/g' \ - -e 's/@''GNULIB_ISWCTYPE''@/$(GNULIB_ISWCTYPE)/g' \ -diff -durN inetutils-1.9.4.orig/lib/Makefile.in inetutils-1.9.4/lib/Makefile.in ---- inetutils-1.9.4.orig/lib/Makefile.in 2015-06-09 15:48:09.000000000 +0800 -+++ inetutils-1.9.4/lib/Makefile.in 2017-05-15 17:58:16.453125000 +0800 -@@ -14,7 +14,7 @@ - - @SET_MAKE@ - --# Copyright (C) 2002-2015 Free Software Foundation, Inc. -+# Copyright (C) 2002-2017 Free Software Foundation, Inc. - # - # 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 -@@ -35,7 +35,7 @@ - # the same distribution terms as the rest of that program. - # - # Generated by gnulib-tool. --# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --no-conditional-dependencies --no-libtool --macro-prefix=gl alloca alloca-opt announce-gen argp argp-version-etc autobuild dirfd dirname-lgpl error exitfail extensions fdl-1.3 filemode forkpty gendocs getaddrinfo getcwd getline getopt-gnu getpass gettext gettext-h getusershell git-version-gen glob gnupload inttostr ioctl maintainer-makefile malloc-gnu mempcpy mgetgroups minmax mkstemp obstack poll progname read-file readutmp realloc-gnu regex setenv sethostname signal size_max snippet/unused-parameter snprintf stdbool stdint strchrnul strerror strndup strnlen sysexits termios unistd-safer update-copyright vasnprintf version-etc-fsf vsnprintf xalloc xalloc-die xgetcwd xgetdomainname xgethostname xsize xvasprintf -+# Reproduce by: gnulib-tool --import --local-dir=gl --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --no-conditional-dependencies --no-libtool --macro-prefix=gl alloca alloca-opt argp argp-version-etc autobuild dirfd dirname-lgpl error exitfail extensions fdl-1.3 filemode forkpty gendocs getaddrinfo getcwd getline getopt-gnu getpass gettext gettext-h getusershell git-version-gen glob gnupload inttostr ioctl maintainer-makefile malloc-gnu mempcpy mgetgroups minmax mkstemp obstack poll progname read-file readutmp realloc-gnu regex setenv sethostname signal size_max snippet/unused-parameter snprintf stdbool stdint strchrnul strerror strndup strnlen sysexits termios unistd-safer update-copyright vasnprintf version-etc-fsf vsnprintf xalloc xalloc-die xgetcwd xgetdomainname xgethostname xsize xvasprintf - - - -@@ -114,10 +114,18 @@ - host_triplet = @host@ - subdir = lib - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 --am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ -+am__aclocal_m4_deps = $(top_srcdir)/am/check_macro.m4 \ -+ $(top_srcdir)/am/check_member.m4 \ -+ $(top_srcdir)/am/check_weak_refs.m4 \ -+ $(top_srcdir)/am/config_paths.m4 $(top_srcdir)/am/enable.m4 \ -+ $(top_srcdir)/am/flushleft.m4 $(top_srcdir)/am/krb5.m4 \ -+ $(top_srcdir)/am/libcurses.m4 $(top_srcdir)/am/libidn.m4 \ -+ $(top_srcdir)/am/readline.m4 $(top_srcdir)/am/result.m4 \ -+ $(top_srcdir)/m4/00gnulib.m4 \ - $(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \ - $(top_srcdir)/m4/argp.m4 $(top_srcdir)/m4/arpa_inet_h.m4 \ - $(top_srcdir)/m4/autobuild.m4 $(top_srcdir)/m4/btowc.m4 \ -+ $(top_srcdir)/m4/builtin-expect.m4 \ - $(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/close.m4 \ - $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/codeset.m4 \ - $(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/d-ino.m4 \ -@@ -132,51 +140,56 @@ - $(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl.m4 \ - $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopendir.m4 \ - $(top_srcdir)/m4/filemode.m4 $(top_srcdir)/m4/filenamecat.m4 \ -- $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fnmatch.m4 \ -- $(top_srcdir)/m4/fopen.m4 $(top_srcdir)/m4/fseek.m4 \ -- $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/fstat.m4 \ -- $(top_srcdir)/m4/fstatat.m4 $(top_srcdir)/m4/ftell.m4 \ -- $(top_srcdir)/m4/ftello.m4 $(top_srcdir)/m4/getaddrinfo.m4 \ -+ $(top_srcdir)/m4/flexmember.m4 $(top_srcdir)/m4/float_h.m4 \ -+ $(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fopen.m4 \ -+ $(top_srcdir)/m4/fseek.m4 $(top_srcdir)/m4/fseeko.m4 \ -+ $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/fstatat.m4 \ -+ $(top_srcdir)/m4/ftell.m4 $(top_srcdir)/m4/ftello.m4 \ -+ $(top_srcdir)/m4/getaddrinfo.m4 \ - $(top_srcdir)/m4/getcwd-abort-bug.m4 \ - $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \ - $(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getdomainname.m4 \ - $(top_srcdir)/m4/getdtablesize.m4 \ - $(top_srcdir)/m4/getgroups.m4 $(top_srcdir)/m4/gethostname.m4 \ -- $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getlogin_r.m4 \ -- $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpass.m4 \ -+ $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getlogin.m4 \ -+ $(top_srcdir)/m4/getlogin_r.m4 $(top_srcdir)/m4/getopt.m4 \ -+ $(top_srcdir)/m4/getpass.m4 $(top_srcdir)/m4/getprogname.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettimeofday.m4 \ - $(top_srcdir)/m4/getugroups.m4 \ - $(top_srcdir)/m4/getusershell.m4 $(top_srcdir)/m4/glibc21.m4 \ - $(top_srcdir)/m4/glob.m4 $(top_srcdir)/m4/gnulib-common.m4 \ -- $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/hostent.m4 \ -+ $(top_srcdir)/m4/gnulib-comp.m4 \ -+ $(top_srcdir)/m4/hard-locale.m4 $(top_srcdir)/m4/hostent.m4 \ - $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inet_ntop.m4 \ - $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttostr.m4 \ - $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/ioctl.m4 \ - $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ -- $(top_srcdir)/m4/lib-prefix.m4 \ -+ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/limits-h.m4 \ - $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \ - $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \ - $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localeconv.m4 \ -- $(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/longlong.m4 \ -- $(top_srcdir)/m4/lseek.m4 $(top_srcdir)/m4/lstat.m4 \ -- $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \ -- $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \ -- $(top_srcdir)/m4/mbsrtowcs.m4 $(top_srcdir)/m4/mbstate_t.m4 \ -- $(top_srcdir)/m4/mbtowc.m4 $(top_srcdir)/m4/memchr.m4 \ -- $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/memrchr.m4 \ -- $(top_srcdir)/m4/mgetgroups.m4 $(top_srcdir)/m4/minmax.m4 \ -- $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mmap-anon.m4 \ -- $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \ -+ $(top_srcdir)/m4/localtime-buffer.m4 $(top_srcdir)/m4/lock.m4 \ -+ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \ -+ $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/malloc.m4 \ -+ $(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/mbrtowc.m4 \ -+ $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbsrtowcs.m4 \ -+ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ -+ $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mempcpy.m4 \ -+ $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/mgetgroups.m4 \ -+ $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkstemp.m4 \ -+ $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/mode_t.m4 \ -+ $(top_srcdir)/m4/msvc-inval.m4 \ - $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \ - $(top_srcdir)/m4/netdb_h.m4 $(top_srcdir)/m4/netinet_in_h.m4 \ - $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nocrash.m4 \ - $(top_srcdir)/m4/obstack.m4 $(top_srcdir)/m4/off_t.m4 \ -- $(top_srcdir)/m4/onceonly.m4 $(top_srcdir)/m4/open.m4 \ -- $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/opendir.m4 \ -- $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \ -- $(top_srcdir)/m4/poll.m4 $(top_srcdir)/m4/poll_h.m4 \ -- $(top_srcdir)/m4/posix_openpt.m4 $(top_srcdir)/m4/printf.m4 \ -+ $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/openat.m4 \ -+ $(top_srcdir)/m4/opendir.m4 $(top_srcdir)/m4/pathmax.m4 \ -+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/poll.m4 \ -+ $(top_srcdir)/m4/poll_h.m4 $(top_srcdir)/m4/posix_openpt.m4 \ -+ $(top_srcdir)/m4/printf.m4 \ -+ $(top_srcdir)/m4/pthread_rwlock_rdlock.m4 \ - $(top_srcdir)/m4/pty.m4 $(top_srcdir)/m4/pty_h.m4 \ - $(top_srcdir)/m4/rawmemchr.m4 $(top_srcdir)/m4/read-file.m4 \ - $(top_srcdir)/m4/readdir.m4 $(top_srcdir)/m4/readutmp.m4 \ -@@ -213,14 +226,7 @@ - $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctype_h.m4 \ - $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \ - $(top_srcdir)/m4/xgetcwd.m4 $(top_srcdir)/m4/xsize.m4 \ -- $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/am/check_macro.m4 \ -- $(top_srcdir)/am/check_member.m4 \ -- $(top_srcdir)/am/check_weak_refs.m4 \ -- $(top_srcdir)/am/config_paths.m4 $(top_srcdir)/am/enable.m4 \ -- $(top_srcdir)/am/flushleft.m4 $(top_srcdir)/am/krb5.m4 \ -- $(top_srcdir)/am/libcurses.m4 $(top_srcdir)/am/libidn.m4 \ -- $(top_srcdir)/am/readline.m4 $(top_srcdir)/am/result.m4 \ -- $(top_srcdir)/configure.ac -+ $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/configure.ac - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) - DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ -@@ -245,7 +251,8 @@ - dirname-lgpl.$(OBJEXT) basename-lgpl.$(OBJEXT) \ - stripslash.$(OBJEXT) exitfail.$(OBJEXT) fd-hook.$(OBJEXT) \ - filemode.$(OBJEXT) filenamecat-lgpl.$(OBJEXT) \ -- fopen-safer.$(OBJEXT) getugroups.$(OBJEXT) imaxtostr.$(OBJEXT) \ -+ fopen-safer.$(OBJEXT) getprogname.$(OBJEXT) \ -+ getugroups.$(OBJEXT) hard-locale.$(OBJEXT) imaxtostr.$(OBJEXT) \ - inttostr.$(OBJEXT) offtostr.$(OBJEXT) uinttostr.$(OBJEXT) \ - umaxtostr.$(OBJEXT) localcharset.$(OBJEXT) \ - glthread/lock.$(OBJEXT) malloca.$(OBJEXT) mgetgroups.$(OBJEXT) \ -@@ -406,6 +413,7 @@ - FTPD_LIBPAM = @FTPD_LIBPAM@ - GETADDRINFO_LIB = @GETADDRINFO_LIB@ - GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ -+GETOPT_CDEFS_H = @GETOPT_CDEFS_H@ - GETOPT_H = @GETOPT_H@ - GLIBC21 = @GLIBC21@ - GLOB_H = @GLOB_H@ -@@ -422,6 +430,7 @@ - GNULIB_CLOSE = @GNULIB_CLOSE@ - GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ - GNULIB_CONNECT = @GNULIB_CONNECT@ -+GNULIB_CTIME = @GNULIB_CTIME@ - GNULIB_DIRFD = @GNULIB_DIRFD@ - GNULIB_DPRINTF = @GNULIB_DPRINTF@ - GNULIB_DUP = @GNULIB_DUP@ -@@ -500,6 +509,7 @@ - GNULIB_LINKAT = @GNULIB_LINKAT@ - GNULIB_LISTEN = @GNULIB_LISTEN@ - GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ -+GNULIB_LOCALTIME = @GNULIB_LOCALTIME@ - GNULIB_LSEEK = @GNULIB_LSEEK@ - GNULIB_LSTAT = @GNULIB_LSTAT@ - GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ -@@ -547,6 +557,8 @@ - GNULIB_OPENAT = @GNULIB_OPENAT@ - GNULIB_OPENDIR = @GNULIB_OPENDIR@ - GNULIB_OPENPTY = @GNULIB_OPENPTY@ -+GNULIB_OVERRIDES_STRUCT_STAT = @GNULIB_OVERRIDES_STRUCT_STAT@ -+GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@ - GNULIB_PCLOSE = @GNULIB_PCLOSE@ - GNULIB_PERROR = @GNULIB_PERROR@ - GNULIB_PIPE = @GNULIB_PIPE@ -@@ -613,6 +625,7 @@ - GNULIB_STRDUP = @GNULIB_STRDUP@ - GNULIB_STRERROR = @GNULIB_STRERROR@ - GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ -+GNULIB_STRFTIME = @GNULIB_STRFTIME@ - GNULIB_STRNCAT = @GNULIB_STRNCAT@ - GNULIB_STRNDUP = @GNULIB_STRNDUP@ - GNULIB_STRNLEN = @GNULIB_STRNLEN@ -@@ -632,9 +645,12 @@ - GNULIB_TCGETSID = @GNULIB_TCGETSID@ - GNULIB_TIMEGM = @GNULIB_TIMEGM@ - GNULIB_TIME_R = @GNULIB_TIME_R@ -+GNULIB_TIME_RZ = @GNULIB_TIME_RZ@ - GNULIB_TMPFILE = @GNULIB_TMPFILE@ - GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ -+GNULIB_TRUNCATE = @GNULIB_TRUNCATE@ - GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -+GNULIB_TZSET = @GNULIB_TZSET@ - GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ - GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ - GNULIB_UNLINK = @GNULIB_UNLINK@ -@@ -664,6 +680,7 @@ - GNULIB_WCSCPY = @GNULIB_WCSCPY@ - GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ - GNULIB_WCSDUP = @GNULIB_WCSDUP@ -+GNULIB_WCSFTIME = @GNULIB_WCSFTIME@ - GNULIB_WCSLEN = @GNULIB_WCSLEN@ - GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ - GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ -@@ -697,9 +714,11 @@ - HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ - HAVE_ATOLL = @HAVE_ATOLL@ - HAVE_BTOWC = @HAVE_BTOWC@ -+HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@ - HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ - HAVE_CHOWN = @HAVE_CHOWN@ - HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ -+HAVE_CRTDEFS_H = @HAVE_CRTDEFS_H@ - HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ - HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ - HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ -@@ -715,6 +734,7 @@ - HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ - HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ - HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ -+HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@ - HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ - HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ - HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ -@@ -833,6 +853,7 @@ - HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ - HAVE_PTY_H = @HAVE_PTY_H@ - HAVE_PWRITE = @HAVE_PWRITE@ -+HAVE_QSORT_R = @HAVE_QSORT_R@ - HAVE_RAISE = @HAVE_RAISE@ - HAVE_RANDOM = @HAVE_RANDOM@ - HAVE_RANDOM_H = @HAVE_RANDOM_H@ -@@ -894,7 +915,10 @@ - HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@ - HAVE_TERMIOS_H = @HAVE_TERMIOS_H@ - HAVE_TIMEGM = @HAVE_TIMEGM@ -+HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@ -+HAVE_TRUNCATE = @HAVE_TRUNCATE@ - HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ -+HAVE_TZSET = @HAVE_TZSET@ - HAVE_UNISTD_H = @HAVE_UNISTD_H@ - HAVE_UNLINKAT = @HAVE_UNLINKAT@ - HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ -@@ -917,6 +941,7 @@ - HAVE_WCSCPY = @HAVE_WCSCPY@ - HAVE_WCSCSPN = @HAVE_WCSCSPN@ - HAVE_WCSDUP = @HAVE_WCSDUP@ -+HAVE_WCSFTIME = @HAVE_WCSFTIME@ - HAVE_WCSLEN = @HAVE_WCSLEN@ - HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ - HAVE_WCSNCAT = @HAVE_WCSNCAT@ -@@ -984,8 +1009,10 @@ - LIBTHREAD = @LIBTHREAD@ - LIBUTIL = @LIBUTIL@ - LIBWRAP = @LIBWRAP@ -+LIB_GETLOGIN = @LIB_GETLOGIN@ - LIB_POLL = @LIB_POLL@ - LIB_SELECT = @LIB_SELECT@ -+LIMITS_H = @LIMITS_H@ - LN_S = @LN_S@ - LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ - LOCALE_FR = @LOCALE_FR@ -@@ -1012,6 +1039,7 @@ - NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ - NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ - NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ -+NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@ - NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ - NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ - NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ -@@ -1044,6 +1072,7 @@ - NEXT_FLOAT_H = @NEXT_FLOAT_H@ - NEXT_GETOPT_H = @NEXT_GETOPT_H@ - NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ -+NEXT_LIMITS_H = @NEXT_LIMITS_H@ - NEXT_LOCALE_H = @NEXT_LOCALE_H@ - NEXT_NETDB_H = @NEXT_NETDB_H@ - NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ -@@ -1091,6 +1120,7 @@ - REPLACE_CHOWN = @REPLACE_CHOWN@ - REPLACE_CLOSE = @REPLACE_CLOSE@ - REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ -+REPLACE_CTIME = @REPLACE_CTIME@ - REPLACE_DIRFD = @REPLACE_DIRFD@ - REPLACE_DPRINTF = @REPLACE_DPRINTF@ - REPLACE_DUP = @REPLACE_DUP@ -@@ -1202,6 +1232,7 @@ - REPLACE_STRDUP = @REPLACE_STRDUP@ - REPLACE_STRERROR = @REPLACE_STRERROR@ - REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ -+REPLACE_STRFTIME = @REPLACE_STRFTIME@ - REPLACE_STRNCAT = @REPLACE_STRNCAT@ - REPLACE_STRNDUP = @REPLACE_STRNDUP@ - REPLACE_STRNLEN = @REPLACE_STRNLEN@ -@@ -1216,7 +1247,9 @@ - REPLACE_TIMEGM = @REPLACE_TIMEGM@ - REPLACE_TMPFILE = @REPLACE_TMPFILE@ - REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ -+REPLACE_TRUNCATE = @REPLACE_TRUNCATE@ - REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ -+REPLACE_TZSET = @REPLACE_TZSET@ - REPLACE_UNLINK = @REPLACE_UNLINK@ - REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ - REPLACE_UNSETENV = @REPLACE_UNSETENV@ -@@ -1229,6 +1262,7 @@ - REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ - REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ - REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ -+REPLACE_WCSFTIME = @REPLACE_WCSFTIME@ - REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ - REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ - REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ -@@ -1265,6 +1299,8 @@ - WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ - WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ - WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ -+WINDOWS_STAT_INODES = @WINDOWS_STAT_INODES@ -+WINDOWS_STAT_TIMESPEC = @WINDOWS_STAT_TIMESPEC@ - WINT_T_SUFFIX = @WINT_T_SUFFIX@ - YACC = @YACC@ - YFLAGS = @YFLAGS@ -@@ -1451,52 +1487,51 @@ - # enabled by default because the intl directory might not exist if - # your project does not use "gettext --intl", and some compilers - # complain about -I options applied to nonexistent directories. --EXTRA_DIST = alignof.h alloca.c alloca.in.h \ -- $(top_srcdir)/build-aux/announce-gen arpa_inet.in.h assure.h \ -+EXTRA_DIST = alignof.h alloca.c alloca.in.h arpa_inet.in.h assure.h \ - openat-priv.h openat-proc.c btowc.c chdir-long.c chdir-long.h \ - cloexec.h close.c closedir.c dirent-private.h dirent.in.h \ - dirfd.c dirname.h dosname.h dup.c dup2.c errno.in.h error.c \ - error.h exitfail.h fchdir.c fcntl.c fcntl.in.h fd-hook.h \ -- fdopendir.c filemode.h filename.h filenamecat.h float.c \ -- float.in.h itold.c fnmatch.c fnmatch.in.h fnmatch_loop.c \ -- fopen.c stdio--.h stdio-safer.h forkpty.c fseek.c fseeko.c \ -- stdio-impl.h fstat.c at-func.c fstatat.c ftell.c ftello.c \ -- stdio-impl.h $(top_srcdir)/build-aux/gendocs.sh gai_strerror.c \ -+ fdopendir.c filemode.h filename.h filenamecat.h flexmember.h \ -+ float.c float.in.h itold.c fnmatch.c fnmatch.in.h \ -+ fnmatch_loop.c fopen.c stdio--.h stdio-safer.h forkpty.c \ -+ fseek.c fseeko.c stdio-impl.h fstat.c stat-w32.c stat-w32.h \ -+ at-func.c fstatat.c ftell.c ftello.c stdio-impl.h \ -+ $(top_srcdir)/build-aux/gendocs.sh gai_strerror.c \ - getaddrinfo.c getcwd.c getcwd-lgpl.c getdelim.c \ - getdomainname.c getdtablesize.c getgroups.c gethostname.c \ -- w32sock.h getline.c getlogin_r.c getopt.c getopt.in.h \ -- getopt1.c getopt_int.h getpass.c getpass.h \ -- $(top_srcdir)/build-aux/config.rpath gettimeofday.c \ -+ w32sock.h getline.c getlogin_r.c getopt-cdefs.in.h \ -+ getopt-core.h getopt-ext.h getopt-pfx-core.h getopt-pfx-ext.h \ -+ getopt.c getopt.in.h getopt1.c getopt_int.h getpass.c \ -+ getpass.h $(top_srcdir)/build-aux/config.rpath gettimeofday.c \ - getugroups.h getusershell.c \ - $(top_srcdir)/build-aux/git-version-gen glob-libc.h glob.c \ - glob.in.h $(top_srcdir)/GNUmakefile \ -- $(top_srcdir)/build-aux/gnupload \ -+ $(top_srcdir)/build-aux/gnupload hard-locale.h \ - $(top_srcdir)/build-aux/config.rpath inet_ntop.c intprops.h \ - anytostr.c inttostr.h ioctl.c w32sock.h langinfo.in.h \ -- config.charset ref-add.sin ref-del.sin locale.in.h \ -- localeconv.c login_tty.c lseek.c lstat.c \ -- $(top_srcdir)/maint.mk malloc.c malloc.c malloca.h \ -- malloca.valgrind mbrtowc.c mbsinit.c mbsrtowcs-impl.h \ -- mbsrtowcs-state.c mbsrtowcs.c mbtowc-impl.h mbtowc.c memchr.c \ -- memchr.valgrind mempcpy.c memrchr.c mgetgroups.h mkstemp.c \ -- msvc-inval.c msvc-inval.h msvc-nothrow.c msvc-nothrow.h \ -- netdb.in.h netinet_in.in.h nl_langinfo.c obstack.c obstack.h \ -- open.c openat.c openat.h dirent-private.h opendir.c openpty.c \ -- pathmax.h poll.c poll.in.h posix_openpt.c pty.in.h rawmemchr.c \ -+ limits.in.h config.charset ref-add.sin ref-del.sin locale.in.h \ -+ localeconv.c localtime-buffer.c localtime-buffer.h login_tty.c \ -+ lseek.c lstat.c $(top_srcdir)/maint.mk malloc.c malloc.c \ -+ malloca.h malloca.valgrind mbrtowc.c mbsinit.c \ -+ mbsrtowcs-impl.h mbsrtowcs-state.c mbsrtowcs.c mbtowc-impl.h \ -+ mbtowc.c memchr.c memchr.valgrind mempcpy.c memrchr.c \ -+ mgetgroups.h mkstemp.c msvc-inval.c msvc-inval.h \ -+ msvc-nothrow.c msvc-nothrow.h netdb.in.h netinet_in.in.h \ -+ nl_langinfo.c obstack.c obstack.h open.c openat.c openat.h \ -+ dirent-private.h opendir.c openpty.c pathmax.h poll.c \ -+ poll.in.h posix_openpt.c pty.in.h rawmemchr.c \ - rawmemchr.valgrind read-file.h dirent-private.h readdir.c \ - readutmp.c readutmp.h realloc.c realloc.c regcomp.c regex.c \ - regex.h regex_internal.c regex_internal.h regexec.c \ - dirent-private.h rewinddir.c save-cwd.h secure_getenv.c \ - select.c setenv.c sethostname.c signal.in.h sleep.c \ -- $(top_srcdir)/build-aux/snippet/_Noreturn.h \ -- $(top_srcdir)/build-aux/snippet/arg-nonnull.h \ -- $(top_srcdir)/build-aux/snippet/c++defs.h \ -- $(top_srcdir)/build-aux/snippet/unused-parameter.h \ -- $(top_srcdir)/build-aux/snippet/warn-on-use.h snprintf.c \ -- w32sock.h stat.c stdalign.in.h stdarg.in.h stdbool.in.h \ -- stddef.in.h stdint.in.h stdio.in.h stdlib.in.h strcasecmp.c \ -- strncasecmp.c strchrnul.c strchrnul.valgrind strdup.c streq.h \ -- strerror.c strerror-override.c strerror-override.h string.in.h \ -+ _Noreturn.h arg-nonnull.h c++defs.h unused-parameter.h \ -+ warn-on-use.h snprintf.c w32sock.h stat-w32.c stat-w32.h \ -+ stat.c stdalign.in.h stdarg.in.h stdbool.in.h stddef.in.h \ -+ stdint.in.h stdio.in.h stdlib.in.h strcasecmp.c strncasecmp.c \ -+ strchrnul.c strchrnul.valgrind strdup.c streq.h strerror.c \ -+ strerror-override.c strerror-override.h string.in.h \ - strings.in.h strndup.c strnlen.c sys_ioctl.in.h \ - sys_select.in.h sys_socket.in.h sys_stat.in.h sys_time.in.h \ - sys_types.in.h sys_uio.in.h sysexits.in.h tempname.h \ -@@ -1509,53 +1544,36 @@ - vasprintf.c $(top_srcdir)/build-aux/vc-list-files verify.h \ - vsnprintf.c wchar.in.h wcrtomb.c wctype.in.h xalloc.h \ - xalloc-oversized.h xgetcwd.h xalloc.h -- --# The BUILT_SOURCES created by this Makefile snippet are not used via #include --# statements but through direct file reference. Therefore this snippet must be --# present in all Makefile.am that need it. This is ensured by the applicability --# 'all' defined above. -- --# The BUILT_SOURCES created by this Makefile snippet are not used via #include --# statements but through direct file reference. Therefore this snippet must be --# present in all Makefile.am that need it. This is ensured by the applicability --# 'all' defined above. -- --# The BUILT_SOURCES created by this Makefile snippet are not used via #include --# statements but through direct file reference. Therefore this snippet must be --# present in all Makefile.am that need it. This is ensured by the applicability --# 'all' defined above. - BUILT_SOURCES = $(ALLOCA_H) arpa/inet.h configmake.h dirent.h \ - $(ERRNO_H) fcntl.h $(FLOAT_H) $(FNMATCH_H) $(GETOPT_H) \ -- $(GLOB_H) langinfo.h locale.h netdb.h $(NETINET_IN_H) poll.h \ -- pty.h signal.h arg-nonnull.h c++defs.h unused-parameter.h \ -- warn-on-use.h $(STDALIGN_H) $(STDARG_H) $(STDBOOL_H) \ -- $(STDDEF_H) $(STDINT_H) stdio.h stdlib.h string.h strings.h \ -- sys/ioctl.h sys/select.h sys/socket.h sys/stat.h sys/time.h \ -- sys/types.h sys/uio.h $(SYSEXITS_H) termios.h time.h unistd.h \ -- wchar.h wctype.h -+ $(GETOPT_CDEFS_H) $(GLOB_H) langinfo.h $(LIMITS_H) locale.h \ -+ netdb.h $(NETINET_IN_H) poll.h pty.h signal.h $(STDALIGN_H) \ -+ $(STDARG_H) $(STDBOOL_H) $(STDDEF_H) $(STDINT_H) stdio.h \ -+ stdlib.h string.h strings.h sys/ioctl.h sys/select.h \ -+ sys/socket.h sys/stat.h sys/time.h sys/types.h sys/uio.h \ -+ $(SYSEXITS_H) termios.h time.h unistd.h wchar.h wctype.h - SUFFIXES = .sed .sin - MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t arpa/inet.h \ - arpa/inet.h-t dirent.h dirent.h-t errno.h errno.h-t fcntl.h \ - fcntl.h-t float.h float.h-t fnmatch.h fnmatch.h-t getopt.h \ -- getopt.h-t glob.h glob.h-t langinfo.h langinfo.h-t locale.h \ -+ getopt.h-t getopt-cdefs.h getopt-cdefs.h-t glob.h glob.h-t \ -+ langinfo.h langinfo.h-t limits.h limits.h-t locale.h \ - locale.h-t netdb.h netdb.h-t netinet/in.h netinet/in.h-t \ -- poll.h poll.h-t pty.h pty.h-t signal.h signal.h-t \ -- arg-nonnull.h arg-nonnull.h-t c++defs.h c++defs.h-t \ -- unused-parameter.h unused-parameter.h-t warn-on-use.h \ -- warn-on-use.h-t stdalign.h stdalign.h-t stdarg.h stdarg.h-t \ -- stdbool.h stdbool.h-t stddef.h stddef.h-t stdint.h stdint.h-t \ -- stdio.h stdio.h-t stdlib.h stdlib.h-t string.h string.h-t \ -- strings.h strings.h-t sys/ioctl.h sys/ioctl.h-t sys/select.h \ -- sys/select.h-t sys/socket.h sys/socket.h-t sys/stat.h \ -- sys/stat.h-t sys/time.h sys/time.h-t sys/types.h sys/types.h-t \ -- sys/uio.h sys/uio.h-t sysexits.h sysexits.h-t termios.h \ -- termios.h-t time.h time.h-t unistd.h unistd.h-t wchar.h \ -- wchar.h-t wctype.h wctype.h-t -+ poll.h poll.h-t pty.h pty.h-t signal.h signal.h-t stdalign.h \ -+ stdalign.h-t stdarg.h stdarg.h-t stdbool.h stdbool.h-t \ -+ stddef.h stddef.h-t stdint.h stdint.h-t stdio.h stdio.h-t \ -+ stdlib.h stdlib.h-t string.h string.h-t strings.h strings.h-t \ -+ sys/ioctl.h sys/ioctl.h-t sys/select.h sys/select.h-t \ -+ sys/socket.h sys/socket.h-t sys/stat.h sys/stat.h-t sys/time.h \ -+ sys/time.h-t sys/types.h sys/types.h-t sys/uio.h sys/uio.h-t \ -+ sysexits.h sysexits.h-t termios.h termios.h-t time.h time.h-t \ -+ unistd.h unistd.h-t wchar.h wchar.h-t wctype.h wctype.h-t - MOSTLYCLEANDIRS = arpa netinet sys sys sys sys sys - CLEANFILES = configmake.h configmake.h-t charset.alias ref-add.sed \ - ref-del.sed - DISTCLEANFILES = - MAINTAINERCLEANFILES = -+# No GNU Make output. - AM_CPPFLAGS = - AM_CFLAGS = - libgnu_a_SOURCES = argp.h argp-ba.c argp-eexst.c argp-fmtstream.c \ -@@ -1563,12 +1581,13 @@ - argp-parse.c argp-pin.c argp-pv.c argp-pvh.c argp-xinl.c \ - argp-version-etc.h argp-version-etc.c cloexec.c dirname-lgpl.c \ - basename-lgpl.c stripslash.c exitfail.c fd-hook.c filemode.c \ -- filenamecat-lgpl.c fopen-safer.c gettext.h getugroups.c \ -- imaxtostr.c inttostr.c offtostr.c uinttostr.c umaxtostr.c \ -- localcharset.h localcharset.c glthread/lock.h glthread/lock.c \ -- malloca.c mgetgroups.c minmax.h openat-die.c progname.h \ -- progname.c read-file.c save-cwd.c size_max.h sockets.h \ -- sockets.c strnlen1.h strnlen1.c sys_socket.c tempname.c \ -+ filenamecat-lgpl.c fopen-safer.c getprogname.h getprogname.c \ -+ gettext.h getugroups.c hard-locale.c imaxtostr.c inttostr.c \ -+ offtostr.c uinttostr.c umaxtostr.c localcharset.h \ -+ localcharset.c glthread/lock.h glthread/lock.c malloca.c \ -+ mgetgroups.c minmax.h openat-die.c progname.h progname.c \ -+ read-file.c save-cwd.c size_max.h sockets.h sockets.c \ -+ strnlen1.h strnlen1.c sys_socket.c tempname.c \ - glthread/threadlib.c unistd.c dup-safer.c fd-safer.c \ - pipe-safer.c version-etc.h version-etc.c version-etc-fsf.c \ - wctype-h.c xmalloc.c xalloc-die.c xgetcwd.c xgetdomainname.h \ -@@ -1579,23 +1598,25 @@ - EXTRA_libgnu_a_SOURCES = alloca.c openat-proc.c btowc.c chdir-long.c \ - close.c closedir.c dirfd.c dup.c dup2.c error.c fchdir.c \ - fcntl.c fdopendir.c float.c itold.c fnmatch.c fnmatch_loop.c \ -- fopen.c forkpty.c fseek.c fseeko.c fstat.c at-func.c fstatat.c \ -- ftell.c ftello.c gai_strerror.c getaddrinfo.c getcwd.c \ -- getcwd-lgpl.c getdelim.c getdomainname.c getdtablesize.c \ -- getgroups.c gethostname.c getline.c getlogin_r.c getopt.c \ -- getopt1.c getpass.c gettimeofday.c getusershell.c glob.c \ -- inet_ntop.c anytostr.c ioctl.c localeconv.c login_tty.c \ -- lseek.c lstat.c malloc.c malloc.c mbrtowc.c mbsinit.c \ -+ fopen.c forkpty.c fseek.c fseeko.c fstat.c stat-w32.c \ -+ at-func.c fstatat.c ftell.c ftello.c gai_strerror.c \ -+ getaddrinfo.c getcwd.c getcwd-lgpl.c getdelim.c \ -+ getdomainname.c getdtablesize.c getgroups.c gethostname.c \ -+ getline.c getlogin_r.c getopt.c getopt1.c getpass.c \ -+ gettimeofday.c getusershell.c glob.c inet_ntop.c anytostr.c \ -+ ioctl.c localeconv.c localtime-buffer.c login_tty.c lseek.c \ -+ lstat.c malloc.c malloc.c mbrtowc.c mbsinit.c \ - mbsrtowcs-state.c mbsrtowcs.c mbtowc.c memchr.c mempcpy.c \ - memrchr.c mkstemp.c msvc-inval.c msvc-nothrow.c nl_langinfo.c \ - obstack.c open.c openat.c opendir.c openpty.c poll.c \ - posix_openpt.c rawmemchr.c readdir.c readutmp.c realloc.c \ - realloc.c regcomp.c regex.c regex_internal.c regexec.c \ - rewinddir.c secure_getenv.c select.c setenv.c sethostname.c \ -- sleep.c snprintf.c stat.c strcasecmp.c strncasecmp.c \ -- strchrnul.c strdup.c strerror.c strerror-override.c strndup.c \ -- strnlen.c asnprintf.c printf-args.c printf-parse.c \ -- vasnprintf.c asprintf.c vasprintf.c vsnprintf.c wcrtomb.c -+ sleep.c snprintf.c stat-w32.c stat.c strcasecmp.c \ -+ strncasecmp.c strchrnul.c strdup.c strerror.c \ -+ strerror-override.c strndup.c strnlen.c asnprintf.c \ -+ printf-args.c printf-parse.c vasnprintf.c asprintf.c \ -+ vasprintf.c vsnprintf.c wcrtomb.c - - # Use this preprocessor expression to decide whether #include_next works. - # Do not rely on a 'configure'-time test for this, since the expression -@@ -1605,13 +1626,29 @@ - charset_tmp = $(DESTDIR)$(libdir)/charset.tmp - - # Because this Makefile snippet defines a variable used by other --# gnulib Makefile snippets, it must be present in all Makefile.am that -+# gnulib Makefile snippets, it must be present in all makefiles that - # need it. This is ensured by the applicability 'all' defined above. --_NORETURN_H = $(top_srcdir)/build-aux/snippet/_Noreturn.h --ARG_NONNULL_H = arg-nonnull.h --CXXDEFS_H = c++defs.h --UNUSED_PARAMETER_H = unused-parameter.h --WARN_ON_USE_H = warn-on-use.h -+_NORETURN_H = $(srcdir)/_Noreturn.h -+ -+# Because this Makefile snippet defines a variable used by other -+# gnulib Makefile snippets, it must be present in all makefiles that -+# need it. This is ensured by the applicability 'all' defined above. -+ARG_NONNULL_H = $(srcdir)/arg-nonnull.h -+ -+# Because this Makefile snippet defines a variable used by other -+# gnulib Makefile snippets, it must be present in all makefiles that -+# need it. This is ensured by the applicability 'all' defined above. -+CXXDEFS_H = $(srcdir)/c++defs.h -+ -+# Because this Makefile snippet defines a variable used by other -+# gnulib Makefile snippets, it must be present in all makefiles that -+# need it. This is ensured by the applicability 'all' defined above. -+UNUSED_PARAMETER_H = $(srcdir)/unused-parameter.h -+ -+# Because this Makefile snippet defines a variable used by other -+# gnulib Makefile snippets, it must be present in all makefiles that -+# need it. This is ensured by the applicability 'all' defined above. -+WARN_ON_USE_H = $(srcdir)/warn-on-use.h - all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-recursive - -@@ -1746,10 +1783,12 @@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpass.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getprogname.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gettimeofday.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getugroups.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getusershell.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glob.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hard-locale.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imaxtostr.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inet_ntop.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inttostr.Po@am__quote@ -@@ -1757,6 +1796,7 @@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/itold.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localcharset.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localeconv.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localtime-buffer.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/login_tty.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lseek.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstat.Po@am__quote@ -@@ -1807,6 +1847,7 @@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sleep.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snprintf.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockets.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat-w32.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strcasecmp.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strchrnul.Po@am__quote@ -@@ -2340,7 +2381,7 @@ - - # We need the following in order to create when the system - # doesn't have one that works with the given compiler. --getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H) -+getopt.h: getopt.in.h $(top_builddir)/config.status - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -@@ -2354,6 +2395,14 @@ - } > $@-t && \ - mv -f $@-t $@ - -+getopt-cdefs.h: getopt-cdefs.in.h $(top_builddir)/config.status -+ $(AM_V_GEN)rm -f $@-t $@ && \ -+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ -+ sed -e 's|@''HAVE_SYS_CDEFS_H''@|$(HAVE_SYS_CDEFS_H)|g' \ -+ < $(srcdir)/getopt-cdefs.in.h; \ -+ } > $@-t && \ -+ mv -f $@-t $@ -+ - # We need the following in order to create when the system - # doesn't have one that works with the given compiler. - @GL_GENERATE_GLOB_H_TRUE@glob.h: glob.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) -@@ -2368,7 +2417,6 @@ - @GL_GENERATE_GLOB_H_TRUE@ mv -f $@-t $@ - @GL_GENERATE_GLOB_H_FALSE@glob.h: $(top_builddir)/config.status - @GL_GENERATE_GLOB_H_FALSE@ rm -f $@ -- - distclean-local: clean-GNUmakefile - clean-GNUmakefile: - test '$(srcdir)' = . || rm -f $(top_builddir)/GNUmakefile -@@ -2397,6 +2445,22 @@ - } > $@-t && \ - mv $@-t $@ - -+# We need the following in order to create when the system -+# doesn't have one that is compatible with GNU. -+@GL_GENERATE_LIMITS_H_TRUE@limits.h: limits.in.h $(top_builddir)/config.status -+@GL_GENERATE_LIMITS_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ -+@GL_GENERATE_LIMITS_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ -+@GL_GENERATE_LIMITS_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -+@GL_GENERATE_LIMITS_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -+@GL_GENERATE_LIMITS_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -+@GL_GENERATE_LIMITS_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -+@GL_GENERATE_LIMITS_H_TRUE@ -e 's|@''NEXT_LIMITS_H''@|$(NEXT_LIMITS_H)|g' \ -+@GL_GENERATE_LIMITS_H_TRUE@ < $(srcdir)/limits.in.h; \ -+@GL_GENERATE_LIMITS_H_TRUE@ } > $@-t && \ -+@GL_GENERATE_LIMITS_H_TRUE@ mv $@-t $@ -+@GL_GENERATE_LIMITS_H_FALSE@limits.h: $(top_builddir)/config.status -+@GL_GENERATE_LIMITS_H_FALSE@ rm -f $@ -+ - # We need the following in order to install a simple file in $(libdir) - # which is shared with other installed packages. We use a list of referencing - # packages so that "make uninstall" will remove the file if and only if it -@@ -2602,41 +2666,6 @@ - < $(srcdir)/signal.in.h; \ - } > $@-t && \ - mv $@-t $@ --# The arg-nonnull.h that gets inserted into generated .h files is the same as --# build-aux/snippet/arg-nonnull.h, except that it has the copyright header cut --# off. --arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h -- $(AM_V_GEN)rm -f $@-t $@ && \ -- sed -n -e '/GL_ARG_NONNULL/,$$p' \ -- < $(top_srcdir)/build-aux/snippet/arg-nonnull.h \ -- > $@-t && \ -- mv $@-t $@ --# The c++defs.h that gets inserted into generated .h files is the same as --# build-aux/snippet/c++defs.h, except that it has the copyright header cut off. --c++defs.h: $(top_srcdir)/build-aux/snippet/c++defs.h -- $(AM_V_GEN)rm -f $@-t $@ && \ -- sed -n -e '/_GL_CXXDEFS/,$$p' \ -- < $(top_srcdir)/build-aux/snippet/c++defs.h \ -- > $@-t && \ -- mv $@-t $@ --# The unused-parameter.h that gets inserted into generated .h files is the same --# as build-aux/snippet/unused-parameter.h, except that it has the copyright --# header cut off. --unused-parameter.h: $(top_srcdir)/build-aux/snippet/unused-parameter.h -- $(AM_V_GEN)rm -f $@-t $@ && \ -- sed -n -e '/GL_UNUSED_PARAMETER/,$$p' \ -- < $(top_srcdir)/build-aux/snippet/unused-parameter.h \ -- > $@-t && \ -- mv $@-t $@ --# The warn-on-use.h that gets inserted into generated .h files is the same as --# build-aux/snippet/warn-on-use.h, except that it has the copyright header cut --# off. --warn-on-use.h: $(top_srcdir)/build-aux/snippet/warn-on-use.h -- $(AM_V_GEN)rm -f $@-t $@ && \ -- sed -n -e '/^.ifndef/,$$p' \ -- < $(top_srcdir)/build-aux/snippet/warn-on-use.h \ -- > $@-t && \ -- mv $@-t $@ - - # We need the following in order to create when the system - # doesn't have one that works. -@@ -2706,6 +2735,7 @@ - @GL_GENERATE_STDINT_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - @GL_GENERATE_STDINT_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - @GL_GENERATE_STDINT_H_TRUE@ -e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \ -+@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_C99_STDINT_H''@/$(HAVE_C99_STDINT_H)/g' \ - @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \ - @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ - @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \ -@@ -2727,6 +2757,7 @@ - @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \ - @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \ - @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \ -+@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \ - @GL_GENERATE_STDINT_H_TRUE@ < $(srcdir)/stdint.in.h; \ - @GL_GENERATE_STDINT_H_TRUE@ } > $@-t && \ - @GL_GENERATE_STDINT_H_TRUE@ mv $@-t $@ -@@ -2911,6 +2942,7 @@ - -e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \ - -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \ - -e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \ -+ -e 's|@''HAVE_QSORT_R''@|$(HAVE_QSORT_R)|g' \ - -e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|g' \ - -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \ - -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ -@@ -3160,6 +3192,7 @@ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \ - -e 's|@''WINDOWS_64_BIT_ST_SIZE''@|$(WINDOWS_64_BIT_ST_SIZE)|g' \ -+ -e 's|@''WINDOWS_STAT_TIMESPEC''@|$(WINDOWS_STAT_TIMESPEC)|g' \ - -e 's/@''GNULIB_FCHMODAT''@/$(GNULIB_FCHMODAT)/g' \ - -e 's/@''GNULIB_FSTAT''@/$(GNULIB_FSTAT)/g' \ - -e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \ -@@ -3173,6 +3206,7 @@ - -e 's/@''GNULIB_MKNODAT''@/$(GNULIB_MKNODAT)/g' \ - -e 's/@''GNULIB_STAT''@/$(GNULIB_STAT)/g' \ - -e 's/@''GNULIB_UTIMENSAT''@/$(GNULIB_UTIMENSAT)/g' \ -+ -e 's/@''GNULIB_OVERRIDES_STRUCT_STAT''@/$(GNULIB_OVERRIDES_STRUCT_STAT)/g' \ - -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \ - -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \ - -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \ -@@ -3237,6 +3271,7 @@ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_SYS_TYPES_H''@|$(NEXT_SYS_TYPES_H)|g' \ - -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \ -+ -e 's|@''WINDOWS_STAT_INODES''@|$(WINDOWS_STAT_INODES)|g' \ - < $(srcdir)/sys_types.in.h; \ - } > $@-t && \ - mv $@-t $@ -@@ -3303,22 +3338,31 @@ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \ -- -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \ -+ -e 's/@''GNULIB_CTIME''@/$(GNULIB_CTIME)/g' \ -+ -e 's/@''GNULIB_LOCALTIME''@/$(GNULIB_LOCALTIME)/g' \ - -e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \ - -e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/g' \ -+ -e 's/@''GNULIB_STRFTIME''@/$(GNULIB_STRFTIME)/g' \ - -e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \ - -e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \ - -e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \ -+ -e 's/@''GNULIB_TIME_RZ''@/$(GNULIB_TIME_RZ)/g' \ -+ -e 's/@''GNULIB_TZSET''@/$(GNULIB_TZSET)/g' \ - -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \ - -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \ - -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \ - -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \ -+ -e 's|@''HAVE_TIMEZONE_T''@|$(HAVE_TIMEZONE_T)|g' \ -+ -e 's|@''HAVE_TZSET''@|$(HAVE_TZSET)|g' \ -+ -e 's|@''REPLACE_CTIME''@|$(REPLACE_CTIME)|g' \ - -e 's|@''REPLACE_GMTIME''@|$(REPLACE_GMTIME)|g' \ - -e 's|@''REPLACE_LOCALTIME''@|$(REPLACE_LOCALTIME)|g' \ - -e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \ - -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \ - -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \ -+ -e 's|@''REPLACE_STRFTIME''@|$(REPLACE_STRFTIME)|g' \ - -e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \ -+ -e 's|@''REPLACE_TZSET''@|$(REPLACE_TZSET)|g' \ - -e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \ - -e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ - -e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ -@@ -3383,6 +3427,7 @@ - -e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \ - -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \ - -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \ -+ -e 's/@''GNULIB_TRUNCATE''@/$(GNULIB_TRUNCATE)/g' \ - -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \ - -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_GL_UNISTD_H_GETOPT)/g' \ - -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \ -@@ -3405,7 +3450,6 @@ - -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \ - -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \ - -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \ -- -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \ - -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \ - -e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \ - -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \ -@@ -3421,12 +3465,14 @@ - -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \ - -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \ - -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \ -+ -e 's|@''HAVE_TRUNCATE''@|$(HAVE_TRUNCATE)|g' \ - -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \ - -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \ - -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \ - -e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \ - -e 's|@''HAVE_DECL_FDATASYNC''@|$(HAVE_DECL_FDATASYNC)|g' \ - -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \ -+ -e 's|@''HAVE_DECL_GETLOGIN''@|$(HAVE_DECL_GETLOGIN)|g' \ - -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \ - -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \ - -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \ -@@ -3461,6 +3507,7 @@ - -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \ - -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \ - -e 's|@''REPLACE_SYMLINKAT''@|$(REPLACE_SYMLINKAT)|g' \ -+ -e 's|@''REPLACE_TRUNCATE''@|$(REPLACE_TRUNCATE)|g' \ - -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \ - -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \ - -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \ -@@ -3486,6 +3533,8 @@ - -e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \ - -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \ - -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \ -+ -e 's/@''HAVE_CRTDEFS_H''@/$(HAVE_CRTDEFS_H)/g' \ -+ -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \ - -e 's/@''GNULIB_BTOWC''@/$(GNULIB_BTOWC)/g' \ - -e 's/@''GNULIB_WCTOB''@/$(GNULIB_WCTOB)/g' \ - -e 's/@''GNULIB_MBSINIT''@/$(GNULIB_MBSINIT)/g' \ -@@ -3525,6 +3574,7 @@ - -e 's/@''GNULIB_WCSSTR''@/$(GNULIB_WCSSTR)/g' \ - -e 's/@''GNULIB_WCSTOK''@/$(GNULIB_WCSTOK)/g' \ - -e 's/@''GNULIB_WCSWIDTH''@/$(GNULIB_WCSWIDTH)/g' \ -+ -e 's/@''GNULIB_WCSFTIME''@/$(GNULIB_WCSFTIME)/g' \ - < $(srcdir)/wchar.in.h | \ - sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \ - -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \ -@@ -3564,6 +3614,7 @@ - -e 's|@''HAVE_WCSSTR''@|$(HAVE_WCSSTR)|g' \ - -e 's|@''HAVE_WCSTOK''@|$(HAVE_WCSTOK)|g' \ - -e 's|@''HAVE_WCSWIDTH''@|$(HAVE_WCSWIDTH)|g' \ -+ -e 's|@''HAVE_WCSFTIME''@|$(HAVE_WCSFTIME)|g' \ - -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \ - -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \ - | \ -@@ -3580,6 +3631,7 @@ - -e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \ - -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \ - -e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|g' \ -+ -e 's|@''REPLACE_WCSFTIME''@|$(REPLACE_WCSFTIME)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ -@@ -3597,6 +3649,8 @@ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \ -+ -e 's/@''HAVE_CRTDEFS_H''@/$(HAVE_CRTDEFS_H)/g' \ -+ -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \ - -e 's/@''GNULIB_ISWBLANK''@/$(GNULIB_ISWBLANK)/g' \ - -e 's/@''GNULIB_WCTYPE''@/$(GNULIB_WCTYPE)/g' \ - -e 's/@''GNULIB_ISWCTYPE''@/$(GNULIB_ISWCTYPE)/g' \ -diff -durN inetutils-1.9.4.orig/lib/malloc.c inetutils-1.9.4/lib/malloc.c ---- inetutils-1.9.4.orig/lib/malloc.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/malloc.c 2017-05-15 17:51:19.265625000 +0800 -@@ -1,6 +1,6 @@ - /* malloc() function that is glibc compatible. - -- Copyright (C) 1997-1998, 2006-2007, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 1997-1998, 2006-2007, 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/malloca.c inetutils-1.9.4/lib/malloca.c ---- inetutils-1.9.4.orig/lib/malloca.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/malloca.c 2017-05-15 17:51:19.453125000 +0800 -@@ -1,5 +1,5 @@ - /* Safe automatic memory allocation. -- Copyright (C) 2003, 2006-2007, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2003, 2006-2007, 2009-2017 Free Software Foundation, Inc. - Written by Bruno Haible , 2003. - - This program is free software; you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/malloca.h inetutils-1.9.4/lib/malloca.h ---- inetutils-1.9.4.orig/lib/malloca.h 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/malloca.h 2017-05-15 17:51:19.656250000 +0800 -@@ -1,5 +1,5 @@ - /* Safe automatic memory allocation. -- Copyright (C) 2003-2007, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2003-2007, 2009-2017 Free Software Foundation, Inc. - Written by Bruno Haible , 2003. - - This program is free software; you can redistribute it and/or modify -@@ -21,6 +21,9 @@ - #include - #include - #include -+#include -+ -+#include "xalloc-oversized.h" - - - #ifdef __cplusplus -@@ -73,15 +76,7 @@ - It allocates an array of N objects, each with S bytes of memory, - on the stack. S must be positive and N must be nonnegative. - The array must be freed using freea() before the function returns. */ --#if 1 --/* Cf. the definition of xalloc_oversized. */ --# define nmalloca(n, s) \ -- ((n) > (size_t) (sizeof (ptrdiff_t) <= sizeof (size_t) ? -1 : -2) / (s) \ -- ? NULL \ -- : malloca ((n) * (s))) --#else --extern void * nmalloca (size_t n, size_t s); --#endif -+#define nmalloca(n, s) (xalloc_oversized (n, s) ? NULL : malloca ((n) * (s))) - - - #ifdef __cplusplus -diff -durN inetutils-1.9.4.orig/lib/mbrtowc.c inetutils-1.9.4/lib/mbrtowc.c ---- inetutils-1.9.4.orig/lib/mbrtowc.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/mbrtowc.c 2017-05-15 17:51:19.937500000 +0800 -@@ -1,5 +1,5 @@ - /* Convert multibyte character to wide character. -- Copyright (C) 1999-2002, 2005-2015 Free Software Foundation, Inc. -+ Copyright (C) 1999-2002, 2005-2017 Free Software Foundation, Inc. - Written by Bruno Haible , 2008. - - This program is free software: you can redistribute it and/or modify -@@ -20,6 +20,11 @@ - /* Specification. */ - #include - -+#if C_LOCALE_MAYBE_EILSEQ -+# include "hard-locale.h" -+# include -+#endif -+ - #if GNULIB_defined_mbstate_t - /* Implement mbrtowc() on top of mbtowc(). */ - -@@ -328,6 +333,9 @@ - size_t - rpl_mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) - { -+ size_t ret; -+ wchar_t wc; -+ - # if MBRTOWC_NULL_ARG2_BUG || MBRTOWC_RETVAL_BUG || MBRTOWC_EMPTY_INPUT_BUG - if (s == NULL) - { -@@ -342,6 +350,9 @@ - return (size_t) -2; - # endif - -+ if (! pwc) -+ pwc = &wc; -+ - # if MBRTOWC_RETVAL_BUG - { - static mbstate_t internal_state; -@@ -357,8 +368,7 @@ - size_t count = 0; - for (; n > 0; s++, n--) - { -- wchar_t wc; -- size_t ret = mbrtowc (&wc, s, 1, ps); -+ ret = mbrtowc (&wc, s, 1, ps); - - if (ret == (size_t)(-1)) - return (size_t)(-1); -@@ -366,8 +376,7 @@ - if (ret != (size_t)(-2)) - { - /* The multibyte character has been completed. */ -- if (pwc != NULL) -- *pwc = wc; -+ *pwc = wc; - return (wc == 0 ? 0 : count); - } - } -@@ -376,32 +385,23 @@ - } - # endif - --# if MBRTOWC_NUL_RETVAL_BUG -- { -- wchar_t wc; -- size_t ret = mbrtowc (&wc, s, n, ps); -- -- if (ret != (size_t)(-1) && ret != (size_t)(-2)) -- { -- if (pwc != NULL) -- *pwc = wc; -- if (wc == 0) -- ret = 0; -- } -- return ret; -- } --# else -- { --# if MBRTOWC_NULL_ARG1_BUG -- wchar_t dummy; -+ ret = mbrtowc (pwc, s, n, ps); - -- if (pwc == NULL) -- pwc = &dummy; --# endif -+# if MBRTOWC_NUL_RETVAL_BUG -+ if (ret < (size_t) -2 && !*pwc) -+ return 0; -+# endif - -- return mbrtowc (pwc, s, n, ps); -- } -+# if C_LOCALE_MAYBE_EILSEQ -+ if ((size_t) -2 <= ret && n != 0 && ! hard_locale (LC_CTYPE)) -+ { -+ unsigned char uc = *s; -+ *pwc = uc; -+ return 1; -+ } - # endif -+ -+ return ret; - } - - #endif -diff -durN inetutils-1.9.4.orig/lib/mbsinit.c inetutils-1.9.4/lib/mbsinit.c ---- inetutils-1.9.4.orig/lib/mbsinit.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/mbsinit.c 2017-05-15 17:51:20.078125000 +0800 -@@ -1,5 +1,5 @@ - /* Test for initial conversion state. -- Copyright (C) 2008-2015 Free Software Foundation, Inc. -+ Copyright (C) 2008-2017 Free Software Foundation, Inc. - Written by Bruno Haible , 2008. - - This program is free software: you can redistribute it and/or modify -@@ -22,17 +22,7 @@ - - #include "verify.h" - --#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ -- --/* On native Windows, 'mbstate_t' is defined as 'int'. */ -- --int --mbsinit (const mbstate_t *ps) --{ -- return ps == NULL || *ps == 0; --} -- --#else -+#if GNULIB_defined_mbstate_t - - /* Platforms that lack mbsinit() also lack mbrlen(), mbrtowc(), mbsrtowcs() - and wcrtomb(), wcsrtombs(). -@@ -45,6 +35,7 @@ - We define the meaning of mbstate_t as follows: - - In mb -> wc direction, mbstate_t's first byte contains the number of - buffered bytes (in the range 0..3), followed by up to 3 buffered bytes. -+ See mbrtowc.c. - - In wc -> mb direction, mbstate_t contains no information. In other - words, it is always in the initial state. */ - -@@ -58,4 +49,25 @@ - return pstate == NULL || pstate[0] == 0; - } - -+#else -+ -+int -+mbsinit (const mbstate_t *ps) -+{ -+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ -+ /* Native Windows. */ -+# ifdef __MINGW32__ -+ /* On mingw, 'mbstate_t' is defined as 'int'. */ -+ return ps == NULL || *ps == 0; -+# else -+ /* MSVC defines 'mbstate_t' as an 8-byte struct; the first 4-bytes matter. */ -+ return ps == NULL || *(const unsigned int *)ps == 0; -+# endif -+# else -+ /* Minix, HP-UX 11.00, Solaris 2.6, Interix, ... */ -+ /* Maybe this definition works, maybe not... */ -+ return ps == NULL || *(const char *)ps == 0; -+# endif -+} -+ - #endif -diff -durN inetutils-1.9.4.orig/lib/mbsrtowcs.c inetutils-1.9.4/lib/mbsrtowcs.c ---- inetutils-1.9.4.orig/lib/mbsrtowcs.c 2015-03-31 15:08:15.000000000 +0800 -+++ inetutils-1.9.4/lib/mbsrtowcs.c 2017-05-15 17:51:20.578125000 +0800 -@@ -1,5 +1,5 @@ - /* Convert string to wide string. -- Copyright (C) 2008-2015 Free Software Foundation, Inc. -+ Copyright (C) 2008-2017 Free Software Foundation, Inc. - Written by Bruno Haible , 2008. - - This program is free software: you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/mbsrtowcs-impl.h inetutils-1.9.4/lib/mbsrtowcs-impl.h ---- inetutils-1.9.4.orig/lib/mbsrtowcs-impl.h 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/mbsrtowcs-impl.h 2017-05-15 17:51:20.250000000 +0800 -@@ -1,5 +1,5 @@ - /* Convert string to wide string. -- Copyright (C) 2008-2015 Free Software Foundation, Inc. -+ Copyright (C) 2008-2017 Free Software Foundation, Inc. - Written by Bruno Haible , 2008. - - This program is free software: you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/mbsrtowcs-state.c inetutils-1.9.4/lib/mbsrtowcs-state.c ---- inetutils-1.9.4.orig/lib/mbsrtowcs-state.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/mbsrtowcs-state.c 2017-05-15 17:51:20.421875000 +0800 -@@ -1,5 +1,5 @@ - /* Convert string to wide string. -- Copyright (C) 2008-2015 Free Software Foundation, Inc. -+ Copyright (C) 2008-2017 Free Software Foundation, Inc. - Written by Bruno Haible , 2008. - - This program is free software: you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/mbtowc.c inetutils-1.9.4/lib/mbtowc.c ---- inetutils-1.9.4.orig/lib/mbtowc.c 2015-03-31 15:08:15.000000000 +0800 -+++ inetutils-1.9.4/lib/mbtowc.c 2017-05-15 17:51:20.921875000 +0800 -@@ -1,5 +1,5 @@ - /* Convert multibyte character to wide character. -- Copyright (C) 2011-2015 Free Software Foundation, Inc. -+ Copyright (C) 2011-2017 Free Software Foundation, Inc. - Written by Bruno Haible , 2011. - - This program is free software: you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/mbtowc-impl.h inetutils-1.9.4/lib/mbtowc-impl.h ---- inetutils-1.9.4.orig/lib/mbtowc-impl.h 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/mbtowc-impl.h 2017-05-15 17:51:20.765625000 +0800 -@@ -1,5 +1,5 @@ - /* Convert multibyte character to wide character. -- Copyright (C) 2011-2015 Free Software Foundation, Inc. -+ Copyright (C) 2011-2017 Free Software Foundation, Inc. - Written by Bruno Haible , 2011. - - This program is free software: you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/memchr.c inetutils-1.9.4/lib/memchr.c ---- inetutils-1.9.4.orig/lib/memchr.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/memchr.c 2017-05-15 17:51:21.062500000 +0800 -@@ -1,4 +1,4 @@ --/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2015 -+/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2017 - Free Software Foundation, Inc. - - Based on strlen implementation by Torbjorn Granlund (tege@sics.se), -diff -durN inetutils-1.9.4.orig/lib/mempcpy.c inetutils-1.9.4/lib/mempcpy.c ---- inetutils-1.9.4.orig/lib/mempcpy.c 2015-03-31 15:08:15.000000000 +0800 -+++ inetutils-1.9.4/lib/mempcpy.c 2017-05-15 17:51:21.375000000 +0800 -@@ -1,5 +1,5 @@ - /* Copy memory area and return pointer after last written byte. -- Copyright (C) 2003, 2007, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2003, 2007, 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/memrchr.c inetutils-1.9.4/lib/memrchr.c ---- inetutils-1.9.4.orig/lib/memrchr.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/memrchr.c 2017-05-15 17:51:21.609375000 +0800 -@@ -1,6 +1,6 @@ - /* memrchr -- find the last occurrence of a byte in a memory block - -- Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2015 Free Software -+ Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2017 Free Software - Foundation, Inc. - - Based on strlen implementation by Torbjorn Granlund (tege@sics.se), -diff -durN inetutils-1.9.4.orig/lib/mgetgroups.c inetutils-1.9.4/lib/mgetgroups.c ---- inetutils-1.9.4.orig/lib/mgetgroups.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/mgetgroups.c 2017-05-15 17:51:21.750000000 +0800 -@@ -1,6 +1,6 @@ - /* mgetgroups.c -- return a list of the groups a user or current process is in - -- Copyright (C) 2007-2015 Free Software Foundation, Inc. -+ Copyright (C) 2007-2017 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 -@@ -33,6 +33,12 @@ - #include "getugroups.h" - #include "xalloc-oversized.h" - -+/* Work around an incompatibility of OS X 10.11: getgrouplist -+ accepts int *, not gid_t *, and int and gid_t differ in sign. */ -+#if 4 < __GNUC__ + (3 <= __GNUC_MINOR__) -+# pragma GCC diagnostic ignored "-Wpointer-sign" -+#endif -+ - static gid_t * - realloc_groupbuf (gid_t *g, size_t num) - { -diff -durN inetutils-1.9.4.orig/lib/mgetgroups.h inetutils-1.9.4/lib/mgetgroups.h ---- inetutils-1.9.4.orig/lib/mgetgroups.h 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/mgetgroups.h 2017-05-15 17:51:21.921875000 +0800 -@@ -1,5 +1,5 @@ - /* Get a list of all group IDs associated with a specified user ID. -- Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2007, 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/minmax.h inetutils-1.9.4/lib/minmax.h ---- inetutils-1.9.4.orig/lib/minmax.h 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/minmax.h 2017-05-15 17:51:22.093750000 +0800 -@@ -1,5 +1,5 @@ - /* MIN, MAX macros. -- Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009-2015 Free Software -+ Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009-2017 Free Software - Foundation, Inc. - - This program is free software; you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/mkstemp.c inetutils-1.9.4/lib/mkstemp.c ---- inetutils-1.9.4.orig/lib/mkstemp.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/mkstemp.c 2017-05-15 17:51:22.250000000 +0800 -@@ -1,4 +1,4 @@ --/* Copyright (C) 1998-1999, 2001, 2005-2007, 2009-2015 Free Software -+/* Copyright (C) 1998-1999, 2001, 2005-2007, 2009-2017 Free Software - Foundation, Inc. - This file is derived from the one in the GNU C Library. - -diff -durN inetutils-1.9.4.orig/lib/msvc-inval.c inetutils-1.9.4/lib/msvc-inval.c ---- inetutils-1.9.4.orig/lib/msvc-inval.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/msvc-inval.c 2017-05-15 17:51:22.406250000 +0800 -@@ -1,5 +1,5 @@ - /* Invalid parameter handler for MSVC runtime libraries. -- Copyright (C) 2011-2015 Free Software Foundation, Inc. -+ Copyright (C) 2011-2017 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 -diff -durN inetutils-1.9.4.orig/lib/msvc-inval.h inetutils-1.9.4/lib/msvc-inval.h ---- inetutils-1.9.4.orig/lib/msvc-inval.h 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/msvc-inval.h 2017-05-15 17:51:22.562500000 +0800 -@@ -1,5 +1,5 @@ - /* Invalid parameter handler for MSVC runtime libraries. -- Copyright (C) 2011-2015 Free Software Foundation, Inc. -+ Copyright (C) 2011-2017 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 -diff -durN inetutils-1.9.4.orig/lib/msvc-nothrow.c inetutils-1.9.4/lib/msvc-nothrow.c ---- inetutils-1.9.4.orig/lib/msvc-nothrow.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/msvc-nothrow.c 2017-05-15 17:51:22.718750000 +0800 -@@ -1,6 +1,6 @@ - /* Wrappers that don't throw invalid parameter notifications - with MSVC runtime libraries. -- Copyright (C) 2011-2015 Free Software Foundation, Inc. -+ Copyright (C) 2011-2017 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 -@@ -24,7 +24,9 @@ - #define WIN32_LEAN_AND_MEAN - #include - --#include "msvc-inval.h" -+#if HAVE_MSVC_INVALID_PARAMETER_HANDLER -+# include "msvc-inval.h" -+#endif - - #undef _get_osfhandle - -diff -durN inetutils-1.9.4.orig/lib/msvc-nothrow.h inetutils-1.9.4/lib/msvc-nothrow.h ---- inetutils-1.9.4.orig/lib/msvc-nothrow.h 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/msvc-nothrow.h 2017-05-15 17:51:22.859375000 +0800 -@@ -1,6 +1,6 @@ - /* Wrappers that don't throw invalid parameter notifications - with MSVC runtime libraries. -- Copyright (C) 2011-2015 Free Software Foundation, Inc. -+ Copyright (C) 2011-2017 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 -diff -durN inetutils-1.9.4.orig/lib/netdb.in.h inetutils-1.9.4/lib/netdb.in.h ---- inetutils-1.9.4.orig/lib/netdb.in.h 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/netdb.in.h 2017-05-15 17:51:23.046875000 +0800 -@@ -1,5 +1,5 @@ - /* Provide a netdb.h header file for systems lacking it (read: MinGW). -- Copyright (C) 2008-2015 Free Software Foundation, Inc. -+ Copyright (C) 2008-2017 Free Software Foundation, Inc. - Written by Simon Josefsson. - - This program is free software; you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/netinet_in.in.h inetutils-1.9.4/lib/netinet_in.in.h ---- inetutils-1.9.4.orig/lib/netinet_in.in.h 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/netinet_in.in.h 2017-05-15 17:51:23.218750000 +0800 -@@ -1,5 +1,5 @@ - /* Substitute for . -- Copyright (C) 2007-2015 Free Software Foundation, Inc. -+ Copyright (C) 2007-2017 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 -diff -durN inetutils-1.9.4.orig/lib/nl_langinfo.c inetutils-1.9.4/lib/nl_langinfo.c ---- inetutils-1.9.4.orig/lib/nl_langinfo.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/nl_langinfo.c 2017-05-15 17:51:23.406250000 +0800 -@@ -1,6 +1,6 @@ - /* nl_langinfo() replacement: query locale dependent information. - -- Copyright (C) 2007-2015 Free Software Foundation, Inc. -+ Copyright (C) 2007-2017 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 -@@ -34,7 +34,6 @@ - ctype_codeset (void) - { - static char buf[2 + 10 + 1]; -- size_t buflen = 0; - char const *locale = setlocale (LC_CTYPE, NULL); - char *codeset = buf; - size_t codesetlen; -@@ -99,14 +98,14 @@ - # endif - # if GNULIB_defined_T_FMT_AMPM - case T_FMT_AMPM: -- return "%I:%M:%S %p"; -+ return (char *) "%I:%M:%S %p"; - # endif - # if GNULIB_defined_ERA - case ERA: - /* The format is not standardized. In glibc it is a sequence of strings - of the form "direction:offset:start_date:end_date:era_name:era_format" - with an empty string at the end. */ -- return ""; -+ return (char *) ""; - case ERA_D_FMT: - /* The %Ex conversion in strftime behaves like %x if the locale does not - have an alternative time format. */ -@@ -125,13 +124,13 @@ - case ALT_DIGITS: - /* The format is not standardized. In glibc it is a sequence of 10 - strings, appended in memory. */ -- return "\0\0\0\0\0\0\0\0\0\0"; -+ return (char *) "\0\0\0\0\0\0\0\0\0\0"; - # endif - # if GNULIB_defined_YESEXPR || !FUNC_NL_LANGINFO_YESEXPR_WORKS - case YESEXPR: -- return "^[yY]"; -+ return (char *) "^[yY]"; - case NOEXPR: -- return "^[nN]"; -+ return (char *) "^[nN]"; - # endif - default: - break; -@@ -163,9 +162,9 @@ - return codeset; - } - # ifdef __BEOS__ -- return "UTF-8"; -+ return (char *) "UTF-8"; - # else -- return "ISO-8859-1"; -+ return (char *) "ISO-8859-1"; - # endif - /* nl_langinfo items of the LC_NUMERIC category */ - case RADIXCHAR: -@@ -178,23 +177,23 @@ - TODO: Really use the locale. */ - case D_T_FMT: - case ERA_D_T_FMT: -- return "%a %b %e %H:%M:%S %Y"; -+ return (char *) "%a %b %e %H:%M:%S %Y"; - case D_FMT: - case ERA_D_FMT: -- return "%m/%d/%y"; -+ return (char *) "%m/%d/%y"; - case T_FMT: - case ERA_T_FMT: -- return "%H:%M:%S"; -+ return (char *) "%H:%M:%S"; - case T_FMT_AMPM: -- return "%I:%M:%S %p"; -+ return (char *) "%I:%M:%S %p"; - case AM_STR: - if (!strftime (nlbuf, sizeof nlbuf, "%p", &tmm)) -- return "AM"; -+ return (char *) "AM"; - return nlbuf; - case PM_STR: - tmm.tm_hour = 12; - if (!strftime (nlbuf, sizeof nlbuf, "%p", &tmm)) -- return "PM"; -+ return (char *) "PM"; - return nlbuf; - case DAY_1: - case DAY_2: -@@ -274,9 +273,9 @@ - return nlbuf; - } - case ERA: -- return ""; -+ return (char *) ""; - case ALT_DIGITS: -- return "\0\0\0\0\0\0\0\0\0\0"; -+ return (char *) "\0\0\0\0\0\0\0\0\0\0"; - /* nl_langinfo items of the LC_MONETARY category. */ - case CRNCYSTR: - return localeconv () ->currency_symbol; -@@ -311,11 +310,11 @@ - /* nl_langinfo items of the LC_MESSAGES category - TODO: Really use the locale. */ - case YESEXPR: -- return "^[yY]"; -+ return (char *) "^[yY]"; - case NOEXPR: -- return "^[nN]"; -+ return (char *) "^[nN]"; - default: -- return ""; -+ return (char *) ""; - } - } - -diff -durN inetutils-1.9.4.orig/lib/obstack.c inetutils-1.9.4/lib/obstack.c ---- inetutils-1.9.4.orig/lib/obstack.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/obstack.c 2017-05-15 17:51:23.578125000 +0800 -@@ -1,5 +1,5 @@ - /* obstack.c - subroutines used implicitly by object stack macros -- Copyright (C) 1988-2015 Free Software Foundation, Inc. -+ Copyright (C) 1988-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or -@@ -348,6 +348,7 @@ - abort gracefully or use longjump - but shouldn't return. This - variable by default points to the internal function - 'print_and_abort'. */ --void (*obstack_alloc_failed_handler) (void) = print_and_abort; -+__attribute_noreturn__ void (*obstack_alloc_failed_handler) (void) -+ = print_and_abort; - # endif /* !_OBSTACK_NO_ERROR_HANDLER */ - #endif /* !_OBSTACK_ELIDE_CODE */ -diff -durN inetutils-1.9.4.orig/lib/obstack.h inetutils-1.9.4/lib/obstack.h ---- inetutils-1.9.4.orig/lib/obstack.h 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/obstack.h 2017-05-15 17:51:23.796875000 +0800 -@@ -1,5 +1,5 @@ - /* obstack.h - object stack macros -- Copyright (C) 1988-2015 Free Software Foundation, Inc. -+ Copyright (C) 1988-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or -@@ -111,6 +111,12 @@ - #include /* For size_t and ptrdiff_t. */ - #include /* For __GNU_LIBRARY__, and memcpy. */ - -+#if __STDC_VERSION__ < 199901L -+# define __FLEXIBLE_ARRAY_MEMBER 1 -+#else -+# define __FLEXIBLE_ARRAY_MEMBER -+#endif -+ - #if _OBSTACK_INTERFACE_VERSION == 1 - /* For binary compatibility with obstack version 1, which used "int" - and "long" for these two types. */ -@@ -145,6 +151,15 @@ - # define __attribute_pure__ _GL_ATTRIBUTE_PURE - #endif - -+/* Not the same as _Noreturn, since it also works with function pointers. */ -+#ifndef __attribute_noreturn__ -+# if 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C -+# define __attribute_noreturn__ __attribute__ ((__noreturn__)) -+# else -+# define __attribute_noreturn__ -+# endif -+#endif -+ - #ifdef __cplusplus - extern "C" { - #endif -@@ -153,7 +168,7 @@ - { - char *limit; /* 1 past end of this chunk */ - struct _obstack_chunk *prev; /* address of prior chunk or NULL */ -- char contents[4]; /* objects begin here */ -+ char contents[__FLEXIBLE_ARRAY_MEMBER]; /* objects begin here */ - }; - - struct obstack /* control current object in current chunk */ -@@ -212,7 +227,7 @@ - more memory. This can be set to a user defined function which - should either abort gracefully or use longjump - but shouldn't - return. The default action is to print a message and abort. */ --extern void (*obstack_alloc_failed_handler) (void); -+extern __attribute_noreturn__ void (*obstack_alloc_failed_handler) (void); - - /* Exit value used when 'print_and_abort' is used. */ - extern int obstack_exit_failure; -diff -durN inetutils-1.9.4.orig/lib/open.c inetutils-1.9.4/lib/open.c ---- inetutils-1.9.4.orig/lib/open.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/open.c 2017-05-15 17:51:24.109375000 +0800 -@@ -1,5 +1,5 @@ - /* Open a descriptor to a file. -- Copyright (C) 2007-2015 Free Software Foundation, Inc. -+ Copyright (C) 2007-2017 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 -diff -durN inetutils-1.9.4.orig/lib/openat.c inetutils-1.9.4/lib/openat.c ---- inetutils-1.9.4.orig/lib/openat.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/openat.c 2017-05-15 17:51:24.828125000 +0800 -@@ -1,5 +1,5 @@ - /* provide a replacement openat function -- Copyright (C) 2004-2015 Free Software Foundation, Inc. -+ Copyright (C) 2004-2017 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 -diff -durN inetutils-1.9.4.orig/lib/openat.h inetutils-1.9.4/lib/openat.h ---- inetutils-1.9.4.orig/lib/openat.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/openat.h 2017-05-15 17:51:24.968750000 +0800 -@@ -1,5 +1,5 @@ - /* provide a replacement openat function -- Copyright (C) 2004-2006, 2008-2015 Free Software Foundation, Inc. -+ Copyright (C) 2004-2006, 2008-2017 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 -diff -durN inetutils-1.9.4.orig/lib/openat-die.c inetutils-1.9.4/lib/openat-die.c ---- inetutils-1.9.4.orig/lib/openat-die.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/openat-die.c 2017-05-15 17:51:24.281250000 +0800 -@@ -1,6 +1,6 @@ - /* Report a save- or restore-cwd failure in our openat replacement and then exit. - -- Copyright (C) 2005-2006, 2008-2015 Free Software Foundation, Inc. -+ Copyright (C) 2005-2006, 2008-2017 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 -diff -durN inetutils-1.9.4.orig/lib/openat-priv.h inetutils-1.9.4/lib/openat-priv.h ---- inetutils-1.9.4.orig/lib/openat-priv.h 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/openat-priv.h 2017-05-15 17:51:24.500000000 +0800 -@@ -1,6 +1,6 @@ - /* Internals for openat-like functions. - -- Copyright (C) 2005-2006, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2005-2006, 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/openat-proc.c inetutils-1.9.4/lib/openat-proc.c ---- inetutils-1.9.4.orig/lib/openat-proc.c 2015-05-12 20:14:20.000000000 +0800 -+++ inetutils-1.9.4/lib/openat-proc.c 2017-05-15 17:51:24.671875000 +0800 -@@ -1,6 +1,6 @@ - /* Create /proc/self/fd-related names for subfiles of open directories. - -- Copyright (C) 2006, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2006, 2009-2017 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 -@@ -30,24 +30,21 @@ - #include - #include - --#include "intprops.h" -- --#define PROC_SELF_FD_FORMAT "/proc/self/fd/%d/%s" -- --#define PROC_SELF_FD_NAME_SIZE_BOUND(len) \ -- (sizeof PROC_SELF_FD_FORMAT - sizeof "%d%s" \ -- + INT_STRLEN_BOUND (int) + (len) + 1) -+#ifdef __KLIBC__ -+# include -+#endif - -+#include "intprops.h" - --/* Set BUF to the expansion of PROC_SELF_FD_FORMAT, using FD and FILE -- respectively for %d and %s. If successful, return BUF if the -- result fits in BUF, dynamically allocated memory otherwise. But -- return NULL if /proc is not reliable, either because the operating -- system support is lacking or because memory is low. */ -+/* Set BUF to the name of the subfile of the directory identified by -+ FD, where the subfile is named FILE. If successful, return BUF if -+ the result fits in BUF, dynamically allocated memory otherwise. -+ Return NULL (setting errno) on error. */ - char * - openat_proc_name (char buf[OPENAT_BUFFER_SIZE], int fd, char const *file) - { -- static int proc_status = 0; -+ char *result = buf; -+ int dirlen; - - /* Make sure the caller gets ENOENT when appropriate. */ - if (!*file) -@@ -56,47 +53,82 @@ - return buf; - } - -- if (! proc_status) -- { -- /* Set PROC_STATUS to a positive value if /proc/self/fd is -- reliable, and a negative value otherwise. Solaris 10 -- /proc/self/fd mishandles "..", and any file name might expand -- to ".." after symbolic link expansion, so avoid /proc/self/fd -- if it mishandles "..". Solaris 10 has openat, but this -- problem is exhibited on code that built on Solaris 8 and -- running on Solaris 10. */ -+#ifndef __KLIBC__ -+# define PROC_SELF_FD_FORMAT "/proc/self/fd/%d/" -+ { -+ enum { -+ PROC_SELF_FD_DIR_SIZE_BOUND -+ = (sizeof PROC_SELF_FD_FORMAT - (sizeof "%d" - 1) -+ + INT_STRLEN_BOUND (int)) -+ }; - -- int proc_self_fd = open ("/proc/self/fd", -- O_SEARCH | O_DIRECTORY | O_NOCTTY | O_NONBLOCK); -- if (proc_self_fd < 0) -- proc_status = -1; -- else -- { -- /* Detect whether /proc/self/fd/%i/../fd exists, where %i is the -- number of a file descriptor open on /proc/self/fd. On Linux, -- that name resolves to /proc/self/fd, which was opened above. -- However, on Solaris, it may resolve to /proc/self/fd/fd, which -- cannot exist, since all names in /proc/self/fd are numeric. */ -- char dotdot_buf[PROC_SELF_FD_NAME_SIZE_BOUND (sizeof "../fd" - 1)]; -- sprintf (dotdot_buf, PROC_SELF_FD_FORMAT, proc_self_fd, "../fd"); -- proc_status = access (dotdot_buf, F_OK) ? -1 : 1; -- close (proc_self_fd); -- } -- } -+ static int proc_status = 0; -+ if (! proc_status) -+ { -+ /* Set PROC_STATUS to a positive value if /proc/self/fd is -+ reliable, and a negative value otherwise. Solaris 10 -+ /proc/self/fd mishandles "..", and any file name might expand -+ to ".." after symbolic link expansion, so avoid /proc/self/fd -+ if it mishandles "..". Solaris 10 has openat, but this -+ problem is exhibited on code that built on Solaris 8 and -+ running on Solaris 10. */ - -- if (proc_status < 0) -- return NULL; -- else -- { -- size_t bufsize = PROC_SELF_FD_NAME_SIZE_BOUND (strlen (file)); -- char *result = buf; -- if (OPENAT_BUFFER_SIZE < bufsize) -- { -- result = malloc (bufsize); -- if (! result) -- return NULL; -- } -- sprintf (result, PROC_SELF_FD_FORMAT, fd, file); -- return result; -- } -+ int proc_self_fd = open ("/proc/self/fd", -+ O_SEARCH | O_DIRECTORY | O_NOCTTY | O_NONBLOCK); -+ if (proc_self_fd < 0) -+ proc_status = -1; -+ else -+ { -+ /* Detect whether /proc/self/fd/%i/../fd exists, where %i is the -+ number of a file descriptor open on /proc/self/fd. On Linux, -+ that name resolves to /proc/self/fd, which was opened above. -+ However, on Solaris, it may resolve to /proc/self/fd/fd, which -+ cannot exist, since all names in /proc/self/fd are numeric. */ -+ char dotdot_buf[PROC_SELF_FD_DIR_SIZE_BOUND + sizeof "../fd" - 1]; -+ sprintf (dotdot_buf, PROC_SELF_FD_FORMAT "../fd", proc_self_fd); -+ proc_status = access (dotdot_buf, F_OK) ? -1 : 1; -+ close (proc_self_fd); -+ } -+ } -+ -+ if (proc_status < 0) -+ return NULL; -+ else -+ { -+ size_t bufsize = PROC_SELF_FD_DIR_SIZE_BOUND + strlen (file); -+ if (OPENAT_BUFFER_SIZE < bufsize) -+ { -+ result = malloc (bufsize); -+ if (! result) -+ return NULL; -+ } -+ -+ dirlen = sprintf (result, PROC_SELF_FD_FORMAT, fd); -+ } -+ } -+#else -+ /* OS/2 kLIBC provides a function to retrieve a path from a fd. */ -+ { -+ char dir[_MAX_PATH]; -+ size_t bufsize; -+ -+ if (__libc_Back_ioFHToPath (fd, dir, sizeof dir)) -+ return NULL; -+ -+ dirlen = strlen (dir); -+ bufsize = dirlen + 1 + strlen (file) + 1; /* 1 for '/', 1 for null */ -+ if (OPENAT_BUFFER_SIZE < bufsize) -+ { -+ result = malloc (bufsize); -+ if (! result) -+ return NULL; -+ } -+ -+ strcpy (result, dir); -+ result[dirlen++] = '/'; -+ } -+#endif -+ -+ strcpy (result + dirlen, file); -+ return result; - } -diff -durN inetutils-1.9.4.orig/lib/opendir.c inetutils-1.9.4/lib/opendir.c ---- inetutils-1.9.4.orig/lib/opendir.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/opendir.c 2017-05-15 17:51:25.109375000 +0800 -@@ -1,5 +1,5 @@ - /* Start reading the entries of a directory. -- Copyright (C) 2006-2015 Free Software Foundation, Inc. -+ Copyright (C) 2006-2017 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 -@@ -40,6 +40,11 @@ - # include - #endif - -+#ifdef __KLIBC__ -+# include -+# include -+#endif -+ - DIR * - opendir (const char *dir_name) - { -@@ -51,6 +56,22 @@ - if (dirp == NULL) - return NULL; - -+# ifdef __KLIBC__ -+ { -+ int fd = open (dir_name, O_RDONLY); -+ if (fd == -1 || _gl_register_dirp_fd (fd, dirp)) -+ { -+ int saved_errno = errno; -+ -+ close (fd); -+ closedir (dirp); -+ -+ errno = saved_errno; -+ -+ return NULL; -+ } -+ } -+# endif - #else - - char dir_name_mask[MAX_PATH + 1 + 1 + 1]; -diff -durN inetutils-1.9.4.orig/lib/openpty.c inetutils-1.9.4/lib/openpty.c ---- inetutils-1.9.4.orig/lib/openpty.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/openpty.c 2017-05-15 17:51:25.265625000 +0800 -@@ -1,5 +1,5 @@ - /* Open a pseudo-terminal. -- Copyright (C) 2010-2015 Free Software Foundation, Inc. -+ Copyright (C) 2010-2017 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 -diff -durN inetutils-1.9.4.orig/lib/pathmax.h inetutils-1.9.4/lib/pathmax.h ---- inetutils-1.9.4.orig/lib/pathmax.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/pathmax.h 2017-05-15 17:51:25.437500000 +0800 -@@ -1,5 +1,5 @@ - /* Define PATH_MAX somehow. Requires sys/types.h. -- Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2015 Free Software -+ Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2017 Free Software - Foundation, Inc. - - This program is free software; you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/pipe-safer.c inetutils-1.9.4/lib/pipe-safer.c ---- inetutils-1.9.4.orig/lib/pipe-safer.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/pipe-safer.c 2017-05-15 17:51:25.593750000 +0800 -@@ -1,5 +1,5 @@ - /* Invoke pipe, but avoid some glitches. -- Copyright (C) 2005-2006, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2005-2006, 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/poll.c inetutils-1.9.4/lib/poll.c ---- inetutils-1.9.4.orig/lib/poll.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/poll.c 2017-05-15 17:51:25.765625000 +0800 -@@ -1,7 +1,7 @@ - /* Emulation for poll(2) - Contributed by Paolo Bonzini. - -- Copyright 2001-2003, 2006-2015 Free Software Foundation, Inc. -+ Copyright 2001-2003, 2006-2017 Free Software Foundation, Inc. - - This file is part of gnulib. - -@@ -41,7 +41,11 @@ - # include - # include - # include --# include "msvc-nothrow.h" -+# if GNULIB_MSVC_NOTHROW -+# include "msvc-nothrow.h" -+# else -+# include -+# endif - #else - # include - # include -@@ -72,6 +76,14 @@ - - #ifdef WINDOWS_NATIVE - -+/* Here we need the recv() function from Windows, that takes a SOCKET as -+ first argument, not any possible gnulib override. */ -+# undef recv -+ -+/* Here we need the select() function from Windows, because we pass bit masks -+ of SOCKETs, not bit masks of FDs. */ -+# undef select -+ - static BOOL IsConsoleHandle (HANDLE h) - { - DWORD mode; -@@ -335,13 +347,13 @@ - int maxfd, rc; - nfds_t i; - -- if (nfd < 0) -+ if (nfd > INT_MAX) - { - errno = EINVAL; - return -1; - } -- /* Don't check directly for NFD too large. Any practical use of a -- too-large NFD is caught by one of the other checks below, and -+ /* Don't check directly for NFD greater than OPEN_MAX. Any practical use -+ of a too-large NFD is caught by one of the other checks below, and - checking directly for getdtablesize is too much of a portability - and/or performance and/or correctness hassle. */ - -@@ -433,7 +445,7 @@ - int rc = 0; - nfds_t i; - -- if (nfd < 0 || timeout < -1) -+ if (nfd > INT_MAX || timeout < -1) - { - errno = EINVAL; - return -1; -diff -durN inetutils-1.9.4.orig/lib/poll.in.h inetutils-1.9.4/lib/poll.in.h ---- inetutils-1.9.4.orig/lib/poll.in.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/poll.in.h 2017-05-15 17:51:25.921875000 +0800 -@@ -1,7 +1,7 @@ - /* Header for poll(2) emulation - Contributed by Paolo Bonzini. - -- Copyright 2001-2003, 2007, 2009-2015 Free Software Foundation, Inc. -+ Copyright 2001-2003, 2007, 2009-2017 Free Software Foundation, Inc. - - This file is part of gnulib. - -diff -durN inetutils-1.9.4.orig/lib/posix_openpt.c inetutils-1.9.4/lib/posix_openpt.c ---- inetutils-1.9.4.orig/lib/posix_openpt.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/posix_openpt.c 2017-05-15 17:51:26.062500000 +0800 -@@ -1,5 +1,5 @@ - /* Open the master side of a pseudo-terminal. -- Copyright (C) 2010-2015 Free Software Foundation, Inc. -+ Copyright (C) 2010-2017 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 -diff -durN inetutils-1.9.4.orig/lib/printf-args.c inetutils-1.9.4/lib/printf-args.c ---- inetutils-1.9.4.orig/lib/printf-args.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/printf-args.c 2017-05-15 17:51:26.234375000 +0800 -@@ -1,5 +1,5 @@ - /* Decomposed printf argument list. -- Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2015 Free Software -+ Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2017 Free Software - Foundation, Inc. - - This program is free software; you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/printf-args.h inetutils-1.9.4/lib/printf-args.h ---- inetutils-1.9.4.orig/lib/printf-args.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/printf-args.h 2017-05-15 17:51:26.437500000 +0800 -@@ -1,5 +1,5 @@ - /* Decomposed printf argument list. -- Copyright (C) 1999, 2002-2003, 2006-2007, 2011-2015 Free Software -+ Copyright (C) 1999, 2002-2003, 2006-2007, 2011-2017 Free Software - Foundation, Inc. - - This program is free software; you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/printf-parse.c inetutils-1.9.4/lib/printf-parse.c ---- inetutils-1.9.4.orig/lib/printf-parse.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/printf-parse.c 2017-05-15 17:51:26.593750000 +0800 -@@ -1,5 +1,5 @@ - /* Formatted output to strings. -- Copyright (C) 1999-2000, 2002-2003, 2006-2015 Free Software Foundation, Inc. -+ Copyright (C) 1999-2000, 2002-2003, 2006-2017 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 -diff -durN inetutils-1.9.4.orig/lib/printf-parse.h inetutils-1.9.4/lib/printf-parse.h ---- inetutils-1.9.4.orig/lib/printf-parse.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/printf-parse.h 2017-05-15 17:51:26.750000000 +0800 -@@ -1,5 +1,5 @@ - /* Parse printf format string. -- Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2015 Free Software -+ Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2017 Free Software - Foundation, Inc. - - This program is free software; you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/progname.c inetutils-1.9.4/lib/progname.c ---- inetutils-1.9.4.orig/lib/progname.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/progname.c 2017-05-15 17:51:26.937500000 +0800 -@@ -1,5 +1,5 @@ - /* Program name management. -- Copyright (C) 2001-2003, 2005-2015 Free Software Foundation, Inc. -+ Copyright (C) 2001-2003, 2005-2017 Free Software Foundation, Inc. - Written by Bruno Haible , 2001. - - This program is free software: you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/progname.h inetutils-1.9.4/lib/progname.h ---- inetutils-1.9.4.orig/lib/progname.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/progname.h 2017-05-15 17:51:27.109375000 +0800 -@@ -1,5 +1,5 @@ - /* Program name management. -- Copyright (C) 2001-2004, 2006, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2001-2004, 2006, 2009-2017 Free Software Foundation, Inc. - Written by Bruno Haible , 2001. - - This program is free software: you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/pty.in.h inetutils-1.9.4/lib/pty.in.h ---- inetutils-1.9.4.orig/lib/pty.in.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/pty.in.h 2017-05-15 17:51:27.265625000 +0800 -@@ -1,5 +1,5 @@ - /* Substitute for and wrapper around . -- Copyright (C) 2010-2015 Free Software Foundation, Inc. -+ Copyright (C) 2010-2017 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 -diff -durN inetutils-1.9.4.orig/lib/rawmemchr.c inetutils-1.9.4/lib/rawmemchr.c ---- inetutils-1.9.4.orig/lib/rawmemchr.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/rawmemchr.c 2017-05-15 17:51:27.406250000 +0800 -@@ -1,5 +1,5 @@ - /* Searching in a string. -- Copyright (C) 2008-2015 Free Software Foundation, Inc. -+ Copyright (C) 2008-2017 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 -diff -durN inetutils-1.9.4.orig/lib/readdir.c inetutils-1.9.4/lib/readdir.c ---- inetutils-1.9.4.orig/lib/readdir.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/readdir.c 2017-05-15 17:51:28.015625000 +0800 -@@ -1,5 +1,5 @@ - /* Read the next entry of a directory. -- Copyright (C) 2011-2015 Free Software Foundation, Inc. -+ Copyright (C) 2011-2017 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 -diff -durN inetutils-1.9.4.orig/lib/read-file.c inetutils-1.9.4/lib/read-file.c ---- inetutils-1.9.4.orig/lib/read-file.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/read-file.c 2017-05-15 17:51:27.734375000 +0800 -@@ -1,5 +1,5 @@ - /* read-file.c -- read file contents into a string -- Copyright (C) 2006, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc. - Written by Simon Josefsson and Bruno Haible. - - This program is free software; you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/read-file.h inetutils-1.9.4/lib/read-file.h ---- inetutils-1.9.4.orig/lib/read-file.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/read-file.h 2017-05-15 17:51:27.875000000 +0800 -@@ -1,5 +1,5 @@ - /* read-file.h -- read file contents into a string -- Copyright (C) 2006, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc. - Written by Simon Josefsson. - - This program is free software; you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/readutmp.c inetutils-1.9.4/lib/readutmp.c ---- inetutils-1.9.4.orig/lib/readutmp.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/readutmp.c 2017-05-15 17:51:28.234375000 +0800 -@@ -1,6 +1,6 @@ - /* GNU's read utmp module. - -- Copyright (C) 1992-2001, 2003-2006, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 1992-2001, 2003-2006, 2009-2017 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 -@@ -97,7 +97,7 @@ - Solaris' utmpname returns 1 upon success -- which is contrary - to what the GNU libc version does. In addition, older GNU libc - versions are actually void. */ -- UTMP_NAME_FUNCTION (file); -+ UTMP_NAME_FUNCTION ((char *) file); - - SET_UTMP_ENT (); - -diff -durN inetutils-1.9.4.orig/lib/readutmp.h inetutils-1.9.4/lib/readutmp.h ---- inetutils-1.9.4.orig/lib/readutmp.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/readutmp.h 2017-05-15 17:51:28.437500000 +0800 -@@ -1,6 +1,6 @@ - /* Declarations for GNU's read utmp module. - -- Copyright (C) 1992-2007, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 1992-2007, 2009-2017 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 -@@ -47,6 +47,8 @@ - # define END_UTMP_ENT endutxent - # ifdef HAVE_UTMPXNAME - # define UTMP_NAME_FUNCTION utmpxname -+# elif defined UTXDB_ACTIVE -+# define UTMP_NAME_FUNCTION(x) setutxdb (UTXDB_ACTIVE, x) - # endif - - # if HAVE_STRUCT_UTMPX_UT_EXIT_E_TERMINATION -diff -durN inetutils-1.9.4.orig/lib/realloc.c inetutils-1.9.4/lib/realloc.c ---- inetutils-1.9.4.orig/lib/realloc.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/realloc.c 2017-05-15 17:51:28.625000000 +0800 -@@ -1,6 +1,6 @@ - /* realloc() function that is glibc compatible. - -- Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2015 Free Software -+ Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2017 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/ref-add.sin inetutils-1.9.4/lib/ref-add.sin ---- inetutils-1.9.4.orig/lib/ref-add.sin 2015-03-31 15:08:16.000000000 +0800 -+++ inetutils-1.9.4/lib/ref-add.sin 2017-05-15 17:51:28.781250000 +0800 -@@ -1,6 +1,6 @@ - # Add this package to a list of references stored in a text file. - # --# Copyright (C) 2000, 2009-2015 Free Software Foundation, Inc. -+# Copyright (C) 2000, 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/ref-del.sin inetutils-1.9.4/lib/ref-del.sin ---- inetutils-1.9.4.orig/lib/ref-del.sin 2015-03-31 15:08:16.000000000 +0800 -+++ inetutils-1.9.4/lib/ref-del.sin 2017-05-15 17:51:28.953125000 +0800 -@@ -1,6 +1,6 @@ - # Remove this package from a list of references stored in a text file. - # --# Copyright (C) 2000, 2009-2015 Free Software Foundation, Inc. -+# Copyright (C) 2000, 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/regcomp.c inetutils-1.9.4/lib/regcomp.c ---- inetutils-1.9.4.orig/lib/regcomp.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/regcomp.c 2017-05-15 17:51:29.140625000 +0800 -@@ -1,5 +1,5 @@ - /* Extended regular expression matching and search library. -- Copyright (C) 2002-2015 Free Software Foundation, Inc. -+ Copyright (C) 2002-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Isamu Hasegawa . - -@@ -17,6 +17,10 @@ - License along with the GNU C Library; if not, see - . */ - -+#ifdef _LIBC -+# include -+#endif -+ - static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern, - size_t length, reg_syntax_t syntax); - static void re_compile_fastmap_iter (regex_t *bufp, -@@ -149,9 +153,9 @@ - gettext_noop ("Invalid back reference") /* REG_ESUBREG */ - "\0" - #define REG_EBRACK_IDX (REG_ESUBREG_IDX + sizeof "Invalid back reference") -- gettext_noop ("Unmatched [ or [^") /* REG_EBRACK */ -+ gettext_noop ("Unmatched [, [^, [:, [., or [=") /* REG_EBRACK */ - "\0" --#define REG_EPAREN_IDX (REG_EBRACK_IDX + sizeof "Unmatched [ or [^") -+#define REG_EPAREN_IDX (REG_EBRACK_IDX + sizeof "Unmatched [, [^, [:, [., or [=") - gettext_noop ("Unmatched ( or \\(") /* REG_EPAREN */ - "\0" - #define REG_EBRACE_IDX (REG_EPAREN_IDX + sizeof "Unmatched ( or \\(") -@@ -209,17 +213,9 @@ - Assumes the 'allocated' (and perhaps 'buffer') and 'translate' fields - are set in BUFP on entry. */ - --#ifdef _LIBC --const char * --re_compile_pattern (pattern, length, bufp) -- const char *pattern; -- size_t length; -- struct re_pattern_buffer *bufp; --#else /* size_t might promote */ - const char * - re_compile_pattern (const char *pattern, size_t length, - struct re_pattern_buffer *bufp) --#endif - { - reg_errcode_t ret; - -@@ -257,8 +253,7 @@ - defined in regex.h. We return the old syntax. */ - - reg_syntax_t --re_set_syntax (syntax) -- reg_syntax_t syntax; -+re_set_syntax (reg_syntax_t syntax) - { - reg_syntax_t ret = re_syntax_options; - -@@ -270,8 +265,7 @@ - #endif - - int --re_compile_fastmap (bufp) -- struct re_pattern_buffer *bufp; -+re_compile_fastmap (struct re_pattern_buffer *bufp) - { - re_dfa_t *dfa = bufp->buffer; - char *fastmap = bufp->fastmap; -@@ -335,7 +329,7 @@ - memset (&state, '\0', sizeof (state)); - if (__mbrtowc (&wc, (const char *) buf, p - buf, - &state) == p - buf -- && (__wcrtomb ((char *) buf, towlower (wc), &state) -+ && (__wcrtomb ((char *) buf, __towlower (wc), &state) - != (size_t) -1)) - re_set_fastmap (fastmap, false, buf[0]); - } -@@ -411,7 +405,7 @@ - re_set_fastmap (fastmap, icase, *(unsigned char *) buf); - if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1) - { -- if (__wcrtomb (buf, towlower (cset->mbchars[i]), &state) -+ if (__wcrtomb (buf, __towlower (cset->mbchars[i]), &state) - != (size_t) -1) - re_set_fastmap (fastmap, false, *(unsigned char *) buf); - } -@@ -470,10 +464,7 @@ - the return codes and their meanings.) */ - - int --regcomp (preg, pattern, cflags) -- regex_t *_Restrict_ preg; -- const char *_Restrict_ pattern; -- int cflags; -+regcomp (regex_t *_Restrict_ preg, const char *_Restrict_ pattern, int cflags) - { - reg_errcode_t ret; - reg_syntax_t syntax = ((cflags & REG_EXTENDED) ? RE_SYNTAX_POSIX_EXTENDED -@@ -531,18 +522,9 @@ - /* Returns a message corresponding to an error code, ERRCODE, returned - from either regcomp or regexec. We don't use PREG here. */ - --#ifdef _LIBC - size_t --regerror (errcode, preg, errbuf, errbuf_size) -- int errcode; -- const regex_t *_Restrict_ preg; -- char *_Restrict_ errbuf; -- size_t errbuf_size; --#else /* size_t might promote */ --size_t --regerror (int errcode, const regex_t *_Restrict_ preg, -- char *_Restrict_ errbuf, size_t errbuf_size) --#endif -+regerror (int errcode, const regex_t *_Restrict_ preg, char *_Restrict_ errbuf, -+ size_t errbuf_size) - { - const char *msg; - size_t msg_size; -@@ -658,8 +640,7 @@ - /* Free dynamically allocated space used by PREG. */ - - void --regfree (preg) -- regex_t *preg; -+regfree (regex_t *preg) - { - re_dfa_t *dfa = preg->buffer; - if (BE (dfa != NULL, 1)) -@@ -695,8 +676,7 @@ - regcomp/regexec above without link errors. */ - weak_function - # endif --re_comp (s) -- const char *s; -+re_comp (const char *s) - { - reg_errcode_t ret; - char *fastmap; -@@ -1417,7 +1397,7 @@ - { - node->first = node; - node->node_idx = re_dfa_add_node (dfa, node->token); -- if (BE (node->node_idx == REG_MISSING, 0)) -+ if (BE (node->node_idx == -1, 0)) - return REG_ESPACE; - if (node->token.type == ANCHOR) - dfa->nodes[node->node_idx].constraint = node->token.opr.ctx_type; -@@ -1478,8 +1458,8 @@ - right = node->right->first->node_idx; - else - right = node->next->node_idx; -- assert (REG_VALID_INDEX (left)); -- assert (REG_VALID_INDEX (right)); -+ assert (left > -1); -+ assert (right > -1); - err = re_node_set_init_2 (dfa->edests + idx, left, right); - } - break; -@@ -1529,7 +1509,7 @@ - org_dest = dfa->nexts[org_node]; - re_node_set_empty (dfa->edests + clone_node); - clone_dest = duplicate_node (dfa, org_dest, constraint); -- if (BE (clone_dest == REG_MISSING, 0)) -+ if (BE (clone_dest == -1, 0)) - return REG_ESPACE; - dfa->nexts[clone_node] = dfa->nexts[org_node]; - ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); -@@ -1562,7 +1542,7 @@ - /* In case the node has another constraint, append it. */ - constraint |= dfa->nodes[org_node].constraint; - clone_dest = duplicate_node (dfa, org_dest, constraint); -- if (BE (clone_dest == REG_MISSING, 0)) -+ if (BE (clone_dest == -1, 0)) - return REG_ESPACE; - ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); - if (BE (! ok, 0)) -@@ -1576,12 +1556,12 @@ - re_node_set_empty (dfa->edests + clone_node); - /* Search for a duplicated node which satisfies the constraint. */ - clone_dest = search_duplicated_node (dfa, org_dest, constraint); -- if (clone_dest == REG_MISSING) -+ if (clone_dest == -1) - { - /* There is no such duplicated node, create a new one. */ - reg_errcode_t err; - clone_dest = duplicate_node (dfa, org_dest, constraint); -- if (BE (clone_dest == REG_MISSING, 0)) -+ if (BE (clone_dest == -1, 0)) - return REG_ESPACE; - ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); - if (BE (! ok, 0)) -@@ -1602,7 +1582,7 @@ - - org_dest = dfa->edests[org_node].elems[1]; - clone_dest = duplicate_node (dfa, org_dest, constraint); -- if (BE (clone_dest == REG_MISSING, 0)) -+ if (BE (clone_dest == -1, 0)) - return REG_ESPACE; - ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); - if (BE (! ok, 0)) -@@ -1628,18 +1608,18 @@ - && constraint == dfa->nodes[idx].constraint) - return idx; /* Found. */ - } -- return REG_MISSING; /* Not found. */ -+ return -1; /* Not found. */ - } - - /* Duplicate the node whose index is ORG_IDX and set the constraint CONSTRAINT. -- Return the index of the new node, or REG_MISSING if insufficient storage is -+ Return the index of the new node, or -1 if insufficient storage is - available. */ - - static Idx - duplicate_node (re_dfa_t *dfa, Idx org_idx, unsigned int constraint) - { - Idx dup_idx = re_dfa_add_node (dfa, dfa->nodes[org_idx]); -- if (BE (dup_idx != REG_MISSING, 1)) -+ if (BE (dup_idx != -1, 1)) - { - dfa->nodes[dup_idx].constraint = constraint; - dfa->nodes[dup_idx].constraint |= dfa->nodes[org_idx].constraint; -@@ -1698,7 +1678,7 @@ - } - - #ifdef DEBUG -- assert (dfa->eclosures[node_idx].nelem != REG_MISSING); -+ assert (dfa->eclosures[node_idx].nelem != -1); - #endif - - /* If we have already calculated, skip it. */ -@@ -1734,7 +1714,7 @@ - - /* This indicates that we are calculating this node now. - We reference this value to avoid infinite loop. */ -- dfa->eclosures[node].nelem = REG_MISSING; -+ dfa->eclosures[node].nelem = -1; - - /* If the current node has constraints, duplicate all nodes - since they must inherit the constraints. */ -@@ -1756,7 +1736,7 @@ - Idx edest = dfa->edests[node].elems[i]; - /* If calculating the epsilon closure of 'edest' is in progress, - return intermediate result. */ -- if (dfa->eclosures[edest].nelem == REG_MISSING) -+ if (dfa->eclosures[edest].nelem == -1) - { - incomplete = true; - continue; -@@ -2187,6 +2167,7 @@ - { - re_dfa_t *dfa = preg->buffer; - bin_tree_t *tree, *branch = NULL; -+ bitset_word_t initial_bkref_map = dfa->completed_bkref_map; - tree = parse_branch (regexp, preg, token, syntax, nest, err); - if (BE (*err != REG_NOERROR && tree == NULL, 0)) - return NULL; -@@ -2197,6 +2178,8 @@ - if (token->type != OP_ALT && token->type != END_OF_RE - && (nest == 0 || token->type != OP_CLOSE_SUBEXP)) - { -+ bitset_word_t accumulated_bkref_map = dfa->completed_bkref_map; -+ dfa->completed_bkref_map = initial_bkref_map; - branch = parse_branch (regexp, preg, token, syntax, nest, err); - if (BE (*err != REG_NOERROR && branch == NULL, 0)) - { -@@ -2204,6 +2187,7 @@ - postorder (tree, free_tree, NULL); - return NULL; - } -+ dfa->completed_bkref_map |= accumulated_bkref_map; - } - else - branch = NULL; -@@ -2549,7 +2533,7 @@ - { - end = 0; - start = fetch_number (regexp, token, syntax); -- if (start == REG_MISSING) -+ if (start == -1) - { - if (token->type == CHARACTER && token->opr.c == ',') - start = 0; /* We treat "{,m}" as "{0,m}". */ -@@ -2559,14 +2543,14 @@ - return NULL; - } - } -- if (BE (start != REG_ERROR, 1)) -+ if (BE (start != -2, 1)) - { - /* We treat "{n}" as "{n,n}". */ - end = ((token->type == OP_CLOSE_DUP_NUM) ? start - : ((token->type == CHARACTER && token->opr.c == ',') -- ? fetch_number (regexp, token, syntax) : REG_ERROR)); -+ ? fetch_number (regexp, token, syntax) : -2)); - } -- if (BE (start == REG_ERROR || end == REG_ERROR, 0)) -+ if (BE (start == -2 || end == -2, 0)) - { - /* Invalid sequence. */ - if (BE (!(syntax & RE_INVALID_INTERVAL_ORD), 0)) -@@ -2588,7 +2572,7 @@ - return elem; - } - -- if (BE ((end != REG_MISSING && start > end) -+ if (BE ((end != -1 && start > end) - || token->type != OP_CLOSE_DUP_NUM, 0)) - { - /* First number greater than second. */ -@@ -2596,7 +2580,7 @@ - return NULL; - } - -- if (BE (RE_DUP_MAX < (end == REG_MISSING ? start : end), 0)) -+ if (BE (RE_DUP_MAX < (end == -1 ? start : end), 0)) - { - *err = REG_ESIZE; - return NULL; -@@ -2605,7 +2589,7 @@ - else - { - start = (token->type == OP_DUP_PLUS) ? 1 : 0; -- end = (token->type == OP_DUP_QUESTION) ? 1 : REG_MISSING; -+ end = (token->type == OP_DUP_QUESTION) ? 1 : -1; - } - - fetch_token (token, regexp, syntax); -@@ -2649,7 +2633,7 @@ - } - - tree = create_tree (dfa, elem, NULL, -- (end == REG_MISSING ? OP_DUP_ASTERISK : OP_ALT)); -+ (end == -1 ? OP_DUP_ASTERISK : OP_ALT)); - if (BE (tree == NULL, 0)) - goto parse_dup_op_espace; - -@@ -2657,10 +2641,10 @@ - True if the arithmetic type T is signed. */ - #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) - -- /* This loop is actually executed only when end != REG_MISSING, -+ /* This loop is actually executed only when end != -1, - to rewrite {0,n} as ((...?)?)?... We have - already created the start+1-th copy. */ -- if (TYPE_SIGNED (Idx) || end != REG_MISSING) -+ if (TYPE_SIGNED (Idx) || end != -1) - for (i = start + 2; i <= end; ++i) - { - elem = duplicate_tree (elem, dfa); -@@ -2688,6 +2672,19 @@ - #define BRACKET_NAME_BUF_SIZE 32 - - #ifndef _LIBC -+ -+# ifdef RE_ENABLE_I18N -+/* Convert the byte B to the corresponding wide character. In a -+ unibyte locale, treat B as itself if it is an encoding error. -+ In a multibyte locale, return WEOF if B is an encoding error. */ -+static wint_t -+parse_byte (unsigned char b, re_charset_t *mbcset) -+{ -+ wint_t wc = __btowc (b); -+ return wc == WEOF && !mbcset ? b : wc; -+} -+#endif -+ - /* Local function for parse_bracket_exp only used in case of NOT _LIBC. - Build the range expression which starts from START_ELEM, and ends - at END_ELEM. The result are written to MBCSET and SBCSET. -@@ -2739,9 +2736,9 @@ - : ((end_elem->type == COLL_SYM) ? end_elem->opr.name[0] - : 0)); - start_wc = ((start_elem->type == SB_CHAR || start_elem->type == COLL_SYM) -- ? __btowc (start_ch) : start_elem->opr.wch); -+ ? parse_byte (start_ch, mbcset) : start_elem->opr.wch); - end_wc = ((end_elem->type == SB_CHAR || end_elem->type == COLL_SYM) -- ? __btowc (end_ch) : end_elem->opr.wch); -+ ? parse_byte (end_ch, mbcset) : end_elem->opr.wch); - if (start_wc == WEOF || end_wc == WEOF) - return REG_ECOLLATE; - else if (BE ((syntax & RE_NO_EMPTY_RANGES) && start_wc > end_wc, 0)) -@@ -2771,7 +2768,11 @@ - new_nranges); - - if (BE (new_array_start == NULL || new_array_end == NULL, 0)) -- return REG_ESPACE; -+ { -+ re_free (new_array_start); -+ re_free (new_array_end); -+ return REG_ESPACE; -+ } - - mbcset->range_starts = new_array_start; - mbcset->range_ends = new_array_end; -@@ -3175,6 +3176,7 @@ - re_token_t token2; - - start_elem.opr.name = start_name_buf; -+ start_elem.type = COLL_SYM; - ret = parse_bracket_element (&start_elem, regexp, token, token_len, dfa, - syntax, first_round); - if (BE (ret != REG_NOERROR, 0)) -@@ -3218,6 +3220,7 @@ - if (is_range_exp == true) - { - end_elem.opr.name = end_name_buf; -+ end_elem.type = COLL_SYM; - ret = parse_bracket_element (&end_elem, regexp, &token2, token_len2, - dfa, syntax, true); - if (BE (ret != REG_NOERROR, 0)) -@@ -3492,8 +3495,6 @@ - int32_t idx1, idx2; - unsigned int ch; - size_t len; -- /* This #include defines a local function! */ --# include - /* Calculate the index for equivalence class. */ - cp = name; - table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); -@@ -3503,7 +3504,7 @@ - _NL_COLLATE_EXTRAMB); - indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE, - _NL_COLLATE_INDIRECTMB); -- idx1 = findidx (&cp, -1); -+ idx1 = findidx (table, indirect, extra, &cp, -1); - if (BE (idx1 == 0 || *cp != '\0', 0)) - /* This isn't a valid character. */ - return REG_ECOLLATE; -@@ -3514,7 +3515,7 @@ - { - char_buf[0] = ch; - cp = char_buf; -- idx2 = findidx (&cp, 1); -+ idx2 = findidx (table, indirect, extra, &cp, 1); - /* - idx2 = table[ch]; - */ -@@ -3668,26 +3669,21 @@ - bin_tree_t *tree; - - sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); --#ifdef RE_ENABLE_I18N -- mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1); --#endif /* RE_ENABLE_I18N */ -- --#ifdef RE_ENABLE_I18N -- if (BE (sbcset == NULL || mbcset == NULL, 0)) --#else /* not RE_ENABLE_I18N */ - if (BE (sbcset == NULL, 0)) --#endif /* not RE_ENABLE_I18N */ - { - *err = REG_ESPACE; - return NULL; - } -- -- if (non_match) -- { - #ifdef RE_ENABLE_I18N -- mbcset->non_match = 1; --#endif /* not RE_ENABLE_I18N */ -+ mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1); -+ if (BE (mbcset == NULL, 0)) -+ { -+ re_free (sbcset); -+ *err = REG_ESPACE; -+ return NULL; - } -+ mbcset->non_match = non_match; -+#endif /* RE_ENABLE_I18N */ - - /* We don't care the syntax in this case. */ - ret = build_charclass (trans, sbcset, -@@ -3720,6 +3716,9 @@ - #endif - - /* Build a tree for simple bracket. */ -+#if defined GCC_LINT || defined lint -+ memset (&br_token, 0, sizeof br_token); -+#endif - br_token.type = SIMPLE_BRACKET; - br_token.opr.sbcset = sbcset; - tree = create_token_tree (dfa, NULL, NULL, &br_token); -@@ -3762,27 +3761,26 @@ - - /* This is intended for the expressions like "a{1,3}". - Fetch a number from 'input', and return the number. -- Return REG_MISSING if the number field is empty like "{,1}". -+ Return -1 if the number field is empty like "{,1}". - Return RE_DUP_MAX + 1 if the number field is too large. -- Return REG_ERROR if an error occurred. */ -+ Return -2 if an error occurred. */ - - static Idx - fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax) - { -- Idx num = REG_MISSING; -+ Idx num = -1; - unsigned char c; - while (1) - { - fetch_token (token, input, syntax); - c = token->opr.c; - if (BE (token->type == END_OF_RE, 0)) -- return REG_ERROR; -+ return -2; - if (token->type == OP_CLOSE_DUP_NUM || c == ',') - break; -- num = ((token->type != CHARACTER || c < '0' || '9' < c -- || num == REG_ERROR) -- ? REG_ERROR -- : num == REG_MISSING -+ num = ((token->type != CHARACTER || c < '0' || '9' < c || num == -2) -+ ? -2 -+ : num == -1 - ? c - '0' - : MIN (RE_DUP_MAX + 1, num * 10 + c - '0')); - } -@@ -3814,6 +3812,9 @@ - re_token_type_t type) - { - re_token_t t; -+#if defined GCC_LINT || defined lint -+ memset (&t, 0, sizeof t); -+#endif - t.type = type; - return create_token_tree (dfa, left, right, &t); - } -@@ -3843,7 +3844,7 @@ - tree->token.opt_subexp = 0; - tree->first = NULL; - tree->next = NULL; -- tree->node_idx = REG_MISSING; -+ tree->node_idx = -1; - - if (left != NULL) - left->parent = tree; -diff -durN inetutils-1.9.4.orig/lib/regex.c inetutils-1.9.4/lib/regex.c ---- inetutils-1.9.4.orig/lib/regex.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/regex.c 2017-05-15 17:51:29.281250000 +0800 -@@ -1,5 +1,5 @@ - /* Extended regular expression matching and search library. -- Copyright (C) 2002-2015 Free Software Foundation, Inc. -+ Copyright (C) 2002-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Isamu Hasegawa . - -diff -durN inetutils-1.9.4.orig/lib/regex.h inetutils-1.9.4/lib/regex.h ---- inetutils-1.9.4.orig/lib/regex.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/regex.h 2017-05-15 17:51:29.437500000 +0800 -@@ -1,6 +1,6 @@ - /* Definitions for data structures and routines for the regular - expression library. -- Copyright (C) 1985, 1989-1993, 1995-1998, 2000-2003, 2005-2015 Free Software -+ Copyright (C) 1985, 1989-1993, 1995-1998, 2000-2003, 2005-2017 Free Software - Foundation, Inc. - This file is part of the GNU C Library. - -@@ -42,11 +42,6 @@ - supported within glibc itself, and glibc users should not define - _REGEX_LARGE_OFFSETS. */ - --/* The type of nonnegative object indexes. Traditionally, GNU regex -- uses 'int' for these. Code that uses __re_idx_t should work -- regardless of whether the type is signed. */ --typedef size_t __re_idx_t; -- - /* The type of object sizes. */ - typedef size_t __re_size_t; - -@@ -58,7 +53,6 @@ - - /* The traditional GNU regex implementation mishandles strings longer - than INT_MAX. */ --typedef int __re_idx_t; - typedef unsigned int __re_size_t; - typedef unsigned long int __re_long_size_t; - -@@ -244,19 +238,16 @@ - | RE_INVALID_INTERVAL_ORD) - - # define RE_SYNTAX_GREP \ -- (RE_BK_PLUS_QM | RE_CHAR_CLASSES \ -- | RE_HAT_LISTS_NOT_NEWLINE | RE_INTERVALS \ -- | RE_NEWLINE_ALT) -+ ((RE_SYNTAX_POSIX_BASIC | RE_NEWLINE_ALT) \ -+ & ~(RE_CONTEXT_INVALID_DUP | RE_DOT_NOT_NULL)) - - # define RE_SYNTAX_EGREP \ -- (RE_CHAR_CLASSES | RE_CONTEXT_INDEP_ANCHORS \ -- | RE_CONTEXT_INDEP_OPS | RE_HAT_LISTS_NOT_NEWLINE \ -- | RE_NEWLINE_ALT | RE_NO_BK_PARENS \ -- | RE_NO_BK_VBAR) -+ ((RE_SYNTAX_POSIX_EXTENDED | RE_INVALID_INTERVAL_ORD | RE_NEWLINE_ALT) \ -+ & ~(RE_CONTEXT_INVALID_OPS | RE_DOT_NOT_NULL)) - -+/* POSIX grep -E behavior is no longer incompatible with GNU. */ - # define RE_SYNTAX_POSIX_EGREP \ -- (RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES \ -- | RE_INVALID_INTERVAL_ORD) -+ RE_SYNTAX_EGREP - - /* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */ - # define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC -@@ -491,7 +482,8 @@ - #ifdef _REGEX_LARGE_OFFSETS - /* POSIX 1003.1-2008 requires that regoff_t be at least as wide as - ptrdiff_t and ssize_t. We don't know of any hosts where ptrdiff_t -- is wider than ssize_t, so ssize_t is safe. */ -+ is wider than ssize_t, so ssize_t is safe. ptrdiff_t is not -+ visible here, so use ssize_t. */ - typedef ssize_t regoff_t; - #else - /* The traditional GNU regex implementation mishandles strings longer -@@ -541,7 +533,7 @@ - BUFFER. Return NULL if successful, and an error string if not. - - To free the allocated storage, you must call 'regfree' on BUFFER. -- Note that the translate table must either have been initialised by -+ Note that the translate table must either have been initialized by - 'regcomp', with a malloc'ed value, or set to NULL before calling - 'regfree'. */ - extern const char *re_compile_pattern (const char *__pattern, size_t __length, -@@ -560,34 +552,34 @@ - match, or -2 for an internal error. Also return register - information in REGS (if REGS and BUFFER->no_sub are nonzero). */ - extern regoff_t re_search (struct re_pattern_buffer *__buffer, -- const char *__string, __re_idx_t __length, -- __re_idx_t __start, regoff_t __range, -+ const char *__String, regoff_t __length, -+ regoff_t __start, regoff_t __range, - struct re_registers *__regs); - - - /* Like 're_search', but search in the concatenation of STRING1 and - STRING2. Also, stop searching at index START + STOP. */ - extern regoff_t re_search_2 (struct re_pattern_buffer *__buffer, -- const char *__string1, __re_idx_t __length1, -- const char *__string2, __re_idx_t __length2, -- __re_idx_t __start, regoff_t __range, -+ const char *__string1, regoff_t __length1, -+ const char *__string2, regoff_t __length2, -+ regoff_t __start, regoff_t __range, - struct re_registers *__regs, -- __re_idx_t __stop); -+ regoff_t __stop); - - - /* Like 're_search', but return how many characters in STRING the regexp - in BUFFER matched, starting at position START. */ - extern regoff_t re_match (struct re_pattern_buffer *__buffer, -- const char *__string, __re_idx_t __length, -- __re_idx_t __start, struct re_registers *__regs); -+ const char *__String, regoff_t __length, -+ regoff_t __start, struct re_registers *__regs); - - - /* Relates to 're_match' as 're_search_2' relates to 're_search'. */ - extern regoff_t re_match_2 (struct re_pattern_buffer *__buffer, -- const char *__string1, __re_idx_t __length1, -- const char *__string2, __re_idx_t __length2, -- __re_idx_t __start, struct re_registers *__regs, -- __re_idx_t __stop); -+ const char *__string1, regoff_t __length1, -+ const char *__string2, regoff_t __length2, -+ regoff_t __start, struct re_registers *__regs, -+ regoff_t __stop); - - - /* Set REGS to hold NUM_REGS registers, storing them in STARTS and -@@ -650,7 +642,7 @@ - int __cflags); - - extern int regexec (const regex_t *_Restrict_ __preg, -- const char *_Restrict_ __string, size_t __nmatch, -+ const char *_Restrict_ __String, size_t __nmatch, - regmatch_t __pmatch[_Restrict_arr_], - int __eflags); - -diff -durN inetutils-1.9.4.orig/lib/regex_internal.c inetutils-1.9.4/lib/regex_internal.c ---- inetutils-1.9.4.orig/lib/regex_internal.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/regex_internal.c 2017-05-15 17:51:29.625000000 +0800 -@@ -1,5 +1,5 @@ - /* Extended regular expression matching and search library. -- Copyright (C) 2002-2015 Free Software Foundation, Inc. -+ Copyright (C) 2002-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Isamu Hasegawa . - -@@ -311,12 +311,12 @@ - + byte_idx), remain_len, &pstr->cur_state); - if (BE (mbclen < (size_t) -2, 1)) - { -- wchar_t wcu = towupper (wc); -+ wchar_t wcu = __towupper (wc); - if (wcu != wc) - { - size_t mbcdlen; - -- mbcdlen = wcrtomb (buf, wcu, &prev_st); -+ mbcdlen = __wcrtomb (buf, wcu, &prev_st); - if (BE (mbclen == mbcdlen, 1)) - memcpy (pstr->mbs + byte_idx, buf, mbclen); - else -@@ -380,7 +380,7 @@ - mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state); - if (BE (mbclen < (size_t) -2, 1)) - { -- wchar_t wcu = towupper (wc); -+ wchar_t wcu = __towupper (wc); - if (wcu != wc) - { - size_t mbcdlen; -@@ -922,7 +922,7 @@ - re_string_context_at (const re_string_t *input, Idx idx, int eflags) - { - int c; -- if (BE (! REG_VALID_INDEX (idx), 0)) -+ if (BE (idx < 0, 0)) - /* In this case, we use the value stored in input->tip_context, - since we can't know the character in input->mbs[-1] here. */ - return input->tip_context; -@@ -938,10 +938,10 @@ - { - #if defined DEBUG && DEBUG - /* It must not happen. */ -- assert (REG_VALID_INDEX (wc_idx)); -+ assert (wc_idx >= 0); - #endif - --wc_idx; -- if (! REG_VALID_INDEX (wc_idx)) -+ if (wc_idx < 0) - return input->tip_context; - } - wc = input->wcs[wc_idx]; -@@ -1077,25 +1077,25 @@ - if (src1->elems[i1] == src2->elems[i2]) - { - /* Try to find the item in DEST. Maybe we could binary search? */ -- while (REG_VALID_INDEX (id) && dest->elems[id] > src1->elems[i1]) -+ while (id >= 0 && dest->elems[id] > src1->elems[i1]) - --id; - -- if (! REG_VALID_INDEX (id) || dest->elems[id] != src1->elems[i1]) -+ if (id < 0 || dest->elems[id] != src1->elems[i1]) - dest->elems[--sbase] = src1->elems[i1]; - -- if (! REG_VALID_INDEX (--i1) || ! REG_VALID_INDEX (--i2)) -+ if (--i1 < 0 || --i2 < 0) - break; - } - - /* Lower the highest of the two items. */ - else if (src1->elems[i1] < src2->elems[i2]) - { -- if (! REG_VALID_INDEX (--i2)) -+ if (--i2 < 0) - break; - } - else - { -- if (! REG_VALID_INDEX (--i1)) -+ if (--i1 < 0) - break; - } - } -@@ -1108,7 +1108,7 @@ - DEST elements are already in place; this is more or - less the same loop that is in re_node_set_merge. */ - dest->nelem += delta; -- if (delta > 0 && REG_VALID_INDEX (id)) -+ if (delta > 0 && id >= 0) - for (;;) - { - if (dest->elems[is] > dest->elems[id]) -@@ -1122,7 +1122,7 @@ - { - /* Slide from the bottom. */ - dest->elems[id + delta] = dest->elems[id]; -- if (! REG_VALID_INDEX (--id)) -+ if (--id < 0) - break; - } - } -@@ -1216,8 +1216,7 @@ - /* Copy into the top of DEST the items of SRC that are not - found in DEST. Maybe we could binary search in DEST? */ - for (sbase = dest->nelem + 2 * src->nelem, -- is = src->nelem - 1, id = dest->nelem - 1; -- REG_VALID_INDEX (is) && REG_VALID_INDEX (id); ) -+ is = src->nelem - 1, id = dest->nelem - 1; is >= 0 && id >= 0; ) - { - if (dest->elems[id] == src->elems[is]) - is--, id--; -@@ -1227,7 +1226,7 @@ - --id; - } - -- if (REG_VALID_INDEX (is)) -+ if (is >= 0) - { - /* If DEST is exhausted, the remaining items of SRC must be unique. */ - sbase -= is + 1; -@@ -1256,7 +1255,7 @@ - { - /* Slide from the bottom. */ - dest->elems[id + delta] = dest->elems[id]; -- if (! REG_VALID_INDEX (--id)) -+ if (--id < 0) - { - /* Copy remaining SRC elements. */ - memcpy (dest->elems, dest->elems + sbase, -@@ -1355,7 +1354,7 @@ - Idx i; - if (set1 == NULL || set2 == NULL || set1->nelem != set2->nelem) - return false; -- for (i = set1->nelem ; REG_VALID_INDEX (--i) ; ) -+ for (i = set1->nelem ; --i >= 0 ; ) - if (set1->elems[i] != set2->elems[i]) - return false; - return true; -@@ -1368,7 +1367,7 @@ - re_node_set_contains (const re_node_set *set, Idx elem) - { - __re_size_t idx, right, mid; -- if (! REG_VALID_NONZERO_INDEX (set->nelem)) -+ if (set->nelem <= 0) - return 0; - - /* Binary search the element. */ -@@ -1398,7 +1397,7 @@ - - - /* Add the token TOKEN to dfa->nodes, and return the index of the token. -- Or return REG_MISSING if an error occurred. */ -+ Or return -1 if an error occurred. */ - - static Idx - internal_function -@@ -1416,11 +1415,11 @@ - MAX (sizeof (re_node_set), - sizeof (Idx))); - if (BE (MIN (IDX_MAX, SIZE_MAX / max_object_size) < new_nodes_alloc, 0)) -- return REG_MISSING; -+ return -1; - - new_nodes = re_realloc (dfa->nodes, re_token_t, new_nodes_alloc); - if (BE (new_nodes == NULL, 0)) -- return REG_MISSING; -+ return -1; - dfa->nodes = new_nodes; - new_nexts = re_realloc (dfa->nexts, Idx, new_nodes_alloc); - new_indices = re_realloc (dfa->org_indices, Idx, new_nodes_alloc); -@@ -1428,7 +1427,13 @@ - new_eclosures = re_realloc (dfa->eclosures, re_node_set, new_nodes_alloc); - if (BE (new_nexts == NULL || new_indices == NULL - || new_edests == NULL || new_eclosures == NULL, 0)) -- return REG_MISSING; -+ { -+ re_free (new_nexts); -+ re_free (new_indices); -+ re_free (new_edests); -+ re_free (new_eclosures); -+ return -1; -+ } - dfa->nexts = new_nexts; - dfa->org_indices = new_indices; - dfa->edests = new_edests; -@@ -1442,7 +1447,7 @@ - ((token.type == OP_PERIOD && dfa->mb_cur_max > 1) - || token.type == COMPLEX_BRACKET); - #endif -- dfa->nexts[dfa->nodes_len] = REG_MISSING; -+ dfa->nexts[dfa->nodes_len] = -1; - re_node_set_init_empty (dfa->edests + dfa->nodes_len); - re_node_set_init_empty (dfa->eclosures + dfa->nodes_len); - return dfa->nodes_len++; -@@ -1477,7 +1482,7 @@ - re_dfastate_t *new_state; - struct re_state_table_entry *spot; - Idx i; --#ifdef lint -+#if defined GCC_LINT || defined lint - /* Suppress bogus uninitialized-variable warnings. */ - *err = REG_NOERROR; - #endif -@@ -1525,7 +1530,7 @@ - re_dfastate_t *new_state; - struct re_state_table_entry *spot; - Idx i; --#ifdef lint -+#if defined GCC_LINT || defined lint - /* Suppress bogus uninitialized-variable warnings. */ - *err = REG_NOERROR; - #endif -diff -durN inetutils-1.9.4.orig/lib/regex_internal.h inetutils-1.9.4/lib/regex_internal.h ---- inetutils-1.9.4.orig/lib/regex_internal.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/regex_internal.h 2017-05-15 17:51:29.765625000 +0800 -@@ -1,5 +1,5 @@ - /* Extended regular expression matching and search library. -- Copyright (C) 2002-2015 Free Software Foundation, Inc. -+ Copyright (C) 2002-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Isamu Hasegawa . - -@@ -33,8 +33,10 @@ - #include - #include - -+#include "intprops.h" -+ - #ifdef _LIBC --# include -+# include - # define lock_define(name) __libc_lock_define (, name) - # define lock_init(lock) (__libc_lock_init (lock), 0) - # define lock_fini(lock) 0 -@@ -87,7 +89,6 @@ - # ifndef _RE_DEFINE_LOCALE_FUNCTIONS - # define _RE_DEFINE_LOCALE_FUNCTIONS 1 - # include --# include - # include - # endif - #endif -@@ -101,6 +102,7 @@ - __dcgettext (_libc_intl_domainname, msgid, LC_MESSAGES) - # endif - #else -+# undef gettext - # define gettext(msgid) (msgid) - #endif - -@@ -114,11 +116,7 @@ - # define RE_ENABLE_I18N - #endif - --#if __GNUC__ >= 3 --# define BE(expr, val) __builtin_expect (expr, val) --#else --# define BE(expr, val) (expr) --#endif -+#define BE(expr, val) __builtin_expect (expr, val) - - /* Number of ASCII characters. */ - #define ASCII_CHARS 0x80 -@@ -137,7 +135,10 @@ - # undef __wctype - # undef __iswctype - # define __wctype wctype -+# define __iswalnum iswalnum - # define __iswctype iswctype -+# define __towlower towlower -+# define __towupper towupper - # define __btowc btowc - # define __mbrtowc mbrtowc - # define __wcrtomb wcrtomb -@@ -149,31 +150,22 @@ - # define __attribute__(arg) - #endif - --typedef __re_idx_t Idx; --#ifdef _REGEX_LARGE_OFFSETS --# define IDX_MAX (SIZE_MAX - 2) --#else --# define IDX_MAX INT_MAX --#endif -- --/* Special return value for failure to match. */ --#define REG_MISSING ((Idx) -1) -- --/* Special return value for internal error. */ --#define REG_ERROR ((Idx) -2) -- --/* Test whether N is a valid index, and is not one of the above. */ --#ifdef _REGEX_LARGE_OFFSETS --# define REG_VALID_INDEX(n) ((Idx) (n) < REG_ERROR) --#else --# define REG_VALID_INDEX(n) (0 <= (n)) -+#ifndef SSIZE_MAX -+# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2)) - #endif - --/* Test whether N is a valid nonzero index. */ -+/* The type of indexes into strings. This is signed, not size_t, -+ since the API requires indexes to fit in regoff_t anyway, and using -+ signed integers makes the code a bit smaller and presumably faster. -+ The traditional GNU regex implementation uses int for indexes. -+ The POSIX-compatible implementation uses a possibly-wider type. -+ The name 'Idx' is three letters to minimize the hassle of -+ reindenting a lot of regex code that formerly used 'int'. */ -+typedef regoff_t Idx; - #ifdef _REGEX_LARGE_OFFSETS --# define REG_VALID_NONZERO_INDEX(n) ((Idx) ((n) - 1) < (Idx) (REG_ERROR - 1)) -+# define IDX_MAX SSIZE_MAX - #else --# define REG_VALID_NONZERO_INDEX(n) (0 < (n)) -+# define IDX_MAX INT_MAX - #endif - - /* A hash value, suitable for computing hash tables. */ -@@ -447,23 +439,23 @@ - - #ifndef _LIBC - # define internal_function -+# define IS_IN(libc) false - #endif - --#ifndef NOT_IN_libc - static reg_errcode_t re_string_realloc_buffers (re_string_t *pstr, - Idx new_buf_len) - internal_function; --# ifdef RE_ENABLE_I18N -+#ifdef RE_ENABLE_I18N - static void build_wcs_buffer (re_string_t *pstr) internal_function; - static reg_errcode_t build_wcs_upper_buffer (re_string_t *pstr) - internal_function; --# endif /* RE_ENABLE_I18N */ -+#endif /* RE_ENABLE_I18N */ - static void build_upper_buffer (re_string_t *pstr) internal_function; - static void re_string_translate_buffer (re_string_t *pstr) internal_function; - static unsigned int re_string_context_at (const re_string_t *input, Idx idx, - int eflags) - internal_function __attribute__ ((pure)); --#endif -+ - #define re_string_peek_byte(pstr, offset) \ - ((pstr)->mbs[(pstr)->cur_idx + offset]) - #define re_string_fetch_byte(pstr) \ -@@ -556,7 +548,7 @@ - - #define IS_WORD_CHAR(ch) (isalnum (ch) || (ch) == '_') - #define IS_NEWLINE(ch) ((ch) == NEWLINE_CHAR) --#define IS_WIDE_WORD_CHAR(ch) (iswalnum (ch) || (ch) == L'_') -+#define IS_WIDE_WORD_CHAR(ch) (__iswalnum (ch) || (ch) == L'_') - #define IS_WIDE_NEWLINE(ch) ((ch) == WIDE_NEWLINE_CHAR) - - #define NOT_SATISFY_PREV_CONSTRAINT(constraint,context) \ -@@ -860,15 +852,17 @@ - return (wint_t) pstr->wcs[idx]; - } - --# ifndef NOT_IN_libc -+# ifdef _LIBC -+# include -+# endif -+ - static int - internal_function __attribute__ ((pure, unused)) - re_string_elem_size_at (const re_string_t *pstr, Idx idx) - { --# ifdef _LIBC -+# ifdef _LIBC - const unsigned char *p, *extra; - const int32_t *table, *indirect; --# include - uint_fast32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); - - if (nrules != 0) -@@ -879,14 +873,13 @@ - indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE, - _NL_COLLATE_INDIRECTMB); - p = pstr->mbs + idx; -- findidx (&p, pstr->len - idx); -+ findidx (table, indirect, extra, &p, pstr->len - idx); - return p - pstr->mbs - idx; - } - else --# endif /* _LIBC */ -+# endif /* _LIBC */ - return 1; - } --# endif - #endif /* RE_ENABLE_I18N */ - - #ifndef __GNUC_PREREQ -diff -durN inetutils-1.9.4.orig/lib/regexec.c inetutils-1.9.4/lib/regexec.c ---- inetutils-1.9.4.orig/lib/regexec.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/regexec.c 2017-05-15 17:51:29.937500000 +0800 -@@ -1,5 +1,5 @@ - /* Extended regular expression matching and search library. -- Copyright (C) 2002-2015 Free Software Foundation, Inc. -+ Copyright (C) 2002-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Isamu Hasegawa . - -@@ -219,12 +219,8 @@ - We return 0 if we find a match and REG_NOMATCH if not. */ - - int --regexec (preg, string, nmatch, pmatch, eflags) -- const regex_t *_Restrict_ preg; -- const char *_Restrict_ string; -- size_t nmatch; -- regmatch_t pmatch[_Restrict_arr_]; -- int eflags; -+regexec (const regex_t *_Restrict_ preg, const char *_Restrict_ string, -+ size_t nmatch, regmatch_t pmatch[], int eflags) - { - reg_errcode_t err; - Idx start, length; -@@ -305,11 +301,8 @@ - match was found and -2 indicates an internal error. */ - - regoff_t --re_match (bufp, string, length, start, regs) -- struct re_pattern_buffer *bufp; -- const char *string; -- Idx length, start; -- struct re_registers *regs; -+re_match (struct re_pattern_buffer *bufp, const char *string, Idx length, -+ Idx start, struct re_registers *regs) - { - return re_search_stub (bufp, string, length, start, 0, length, regs, true); - } -@@ -318,12 +311,8 @@ - #endif - - regoff_t --re_search (bufp, string, length, start, range, regs) -- struct re_pattern_buffer *bufp; -- const char *string; -- Idx length, start; -- regoff_t range; -- struct re_registers *regs; -+re_search (struct re_pattern_buffer *bufp, const char *string, Idx length, -+ Idx start, regoff_t range, struct re_registers *regs) - { - return re_search_stub (bufp, string, length, start, range, length, regs, - false); -@@ -333,11 +322,9 @@ - #endif - - regoff_t --re_match_2 (bufp, string1, length1, string2, length2, start, regs, stop) -- struct re_pattern_buffer *bufp; -- const char *string1, *string2; -- Idx length1, length2, start, stop; -- struct re_registers *regs; -+re_match_2 (struct re_pattern_buffer *bufp, const char *string1, Idx length1, -+ const char *string2, Idx length2, Idx start, -+ struct re_registers *regs, Idx stop) - { - return re_search_2_stub (bufp, string1, length1, string2, length2, - start, 0, regs, stop, true); -@@ -347,12 +334,9 @@ - #endif - - regoff_t --re_search_2 (bufp, string1, length1, string2, length2, start, range, regs, stop) -- struct re_pattern_buffer *bufp; -- const char *string1, *string2; -- Idx length1, length2, start, stop; -- regoff_t range; -- struct re_registers *regs; -+re_search_2 (struct re_pattern_buffer *bufp, const char *string1, Idx length1, -+ const char *string2, Idx length2, Idx start, regoff_t range, -+ struct re_registers *regs, Idx stop) - { - return re_search_2_stub (bufp, string1, length1, string2, length2, - start, range, regs, stop, false); -@@ -362,18 +346,20 @@ - #endif - - static regoff_t --re_search_2_stub (struct re_pattern_buffer *bufp, -- const char *string1, Idx length1, -- const char *string2, Idx length2, -- Idx start, regoff_t range, struct re_registers *regs, -+internal_function -+re_search_2_stub (struct re_pattern_buffer *bufp, const char *string1, -+ Idx length1, const char *string2, Idx length2, Idx start, -+ regoff_t range, struct re_registers *regs, - Idx stop, bool ret_len) - { - const char *str; - regoff_t rval; -- Idx len = length1 + length2; -+ Idx len; - char *s = NULL; - -- if (BE (length1 < 0 || length2 < 0 || stop < 0 || len < length1, 0)) -+ if (BE ((length1 < 0 || length2 < 0 || stop < 0 -+ || INT_ADD_WRAPV (length1, length2, &len)), -+ 0)) - return -2; - - /* Concatenate the strings. */ -@@ -409,8 +395,8 @@ - otherwise the position of the match is returned. */ - - static regoff_t --re_search_stub (struct re_pattern_buffer *bufp, -- const char *string, Idx length, -+internal_function -+re_search_stub (struct re_pattern_buffer *bufp, const char *string, Idx length, - Idx start, regoff_t range, Idx stop, struct re_registers *regs, - bool ret_len) - { -@@ -499,6 +485,7 @@ - } - - static unsigned -+internal_function - re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, Idx nregs, - int regs_allocated) - { -@@ -577,11 +564,8 @@ - freeing the old data. */ - - void --re_set_registers (bufp, regs, num_regs, starts, ends) -- struct re_pattern_buffer *bufp; -- struct re_registers *regs; -- __re_size_t num_regs; -- regoff_t *starts, *ends; -+re_set_registers (struct re_pattern_buffer *bufp, struct re_registers *regs, -+ __re_size_t num_regs, regoff_t *starts, regoff_t *ends) - { - if (num_regs) - { -@@ -609,8 +593,7 @@ - # ifdef _LIBC - weak_function - # endif --re_exec (s) -- const char *s; -+re_exec (const char *s) - { - return 0 == regexec (&re_comp_buf, s, 0, NULL, 0); - } -@@ -628,12 +611,10 @@ - (0 <= LAST_START && LAST_START <= LENGTH) */ - - static reg_errcode_t --__attribute_warn_unused_result__ --re_search_internal (const regex_t *preg, -- const char *string, Idx length, -- Idx start, Idx last_start, Idx stop, -- size_t nmatch, regmatch_t pmatch[], -- int eflags) -+__attribute_warn_unused_result__ internal_function -+re_search_internal (const regex_t *preg, const char *string, Idx length, -+ Idx start, Idx last_start, Idx stop, size_t nmatch, -+ regmatch_t pmatch[], int eflags) - { - reg_errcode_t err; - const re_dfa_t *dfa = preg->buffer; -@@ -642,7 +623,7 @@ - bool fl_longest_match; - int match_kind; - Idx match_first; -- Idx match_last = REG_MISSING; -+ Idx match_last = -1; - Idx extra_nmatch; - bool sb; - int ch; -@@ -851,9 +832,9 @@ - mctx.state_log_top = mctx.nbkref_ents = mctx.max_mb_elem_len = 0; - match_last = check_matching (&mctx, fl_longest_match, - start <= last_start ? &match_first : NULL); -- if (match_last != REG_MISSING) -+ if (match_last != -1) - { -- if (BE (match_last == REG_ERROR, 0)) -+ if (BE (match_last == -2, 0)) - { - err = REG_ESPACE; - goto free_return; -@@ -875,7 +856,7 @@ - break; - if (BE (err != REG_NOMATCH, 0)) - goto free_return; -- match_last = REG_MISSING; -+ match_last = -1; - } - else - break; /* We found a match. */ -@@ -886,7 +867,7 @@ - } - - #ifdef DEBUG -- assert (match_last != REG_MISSING); -+ assert (match_last != -1); - assert (err == REG_NOERROR); - #endif - -@@ -964,7 +945,7 @@ - } - - static reg_errcode_t --__attribute_warn_unused_result__ -+internal_function __attribute_warn_unused_result__ - prune_impossible_nodes (re_match_context_t *mctx) - { - const re_dfa_t *const dfa = mctx->dfa; -@@ -1012,7 +993,7 @@ - do - { - --match_last; -- if (! REG_VALID_INDEX (match_last)) -+ if (match_last < 0) - { - ret = REG_NOMATCH; - goto free_return; -@@ -1093,8 +1074,8 @@ - } - - /* Check whether the regular expression match input string INPUT or not, -- and return the index where the matching end. Return REG_MISSING if -- there is no match, and return REG_ERROR in case of an error. -+ and return the index where the matching end. Return -1 if -+ there is no match, and return -2 in case of an error. - FL_LONGEST_MATCH means we want the POSIX longest matching. - If P_MATCH_FIRST is not NULL, and the match fails, it is set to the - next place where we may want to try matching. -@@ -1109,7 +1090,7 @@ - const re_dfa_t *const dfa = mctx->dfa; - reg_errcode_t err; - Idx match = 0; -- Idx match_last = REG_MISSING; -+ Idx match_last = -1; - Idx cur_str_idx = re_string_cur_idx (&mctx->input); - re_dfastate_t *cur_state; - bool at_init_state = p_match_first != NULL; -@@ -1121,7 +1102,7 @@ - if (BE (cur_state == NULL, 0)) - { - assert (err == REG_ESPACE); -- return REG_ERROR; -+ return -2; - } - - if (mctx->state_log != NULL) -@@ -1176,7 +1157,7 @@ - if (BE (err != REG_NOERROR, 0)) - { - assert (err == REG_ESPACE); -- return REG_ERROR; -+ return -2; - } - } - -@@ -1190,7 +1171,7 @@ - state using the state log, if available and if we have not - already found a valid (even if not the longest) match. */ - if (BE (err != REG_NOERROR, 0)) -- return REG_ERROR; -+ return -2; - - if (mctx->state_log == NULL - || (match && !fl_longest_match) -@@ -1273,7 +1254,7 @@ - /* Compute the next node to which "NFA" transit from NODE("NFA" is a NFA - corresponding to the DFA). - Return the destination node, and update EPS_VIA_NODES; -- return REG_MISSING in case of errors. */ -+ return -1 in case of errors. */ - - static Idx - internal_function -@@ -1291,15 +1272,15 @@ - Idx dest_node; - ok = re_node_set_insert (eps_via_nodes, node); - if (BE (! ok, 0)) -- return REG_ERROR; -- /* Pick up a valid destination, or return REG_MISSING if none -+ return -2; -+ /* Pick up a valid destination, or return -1 if none - is found. */ -- for (dest_node = REG_MISSING, i = 0; i < edests->nelem; ++i) -+ for (dest_node = -1, i = 0; i < edests->nelem; ++i) - { - Idx candidate = edests->elems[i]; - if (!re_node_set_contains (cur_nodes, candidate)) - continue; -- if (dest_node == REG_MISSING) -+ if (dest_node == -1) - dest_node = candidate; - - else -@@ -1313,7 +1294,7 @@ - else if (fs != NULL - && push_fail_stack (fs, *pidx, candidate, nregs, regs, - eps_via_nodes)) -- return REG_ERROR; -+ return -2; - - /* We know we are going to exit. */ - break; -@@ -1338,13 +1319,13 @@ - if (fs != NULL) - { - if (regs[subexp_idx].rm_so == -1 || regs[subexp_idx].rm_eo == -1) -- return REG_MISSING; -+ return -1; - else if (naccepted) - { - char *buf = (char *) re_string_get_buffer (&mctx->input); - if (memcmp (buf + regs[subexp_idx].rm_so, buf + *pidx, - naccepted) != 0) -- return REG_MISSING; -+ return -1; - } - } - -@@ -1353,7 +1334,7 @@ - Idx dest_node; - ok = re_node_set_insert (eps_via_nodes, node); - if (BE (! ok, 0)) -- return REG_ERROR; -+ return -2; - dest_node = dfa->edests[node].elems[0]; - if (re_node_set_contains (&mctx->state_log[*pidx]->nodes, - dest_node)) -@@ -1369,12 +1350,12 @@ - if (fs && (*pidx > mctx->match_last || mctx->state_log[*pidx] == NULL - || !re_node_set_contains (&mctx->state_log[*pidx]->nodes, - dest_node))) -- return REG_MISSING; -+ return -1; - re_node_set_empty (eps_via_nodes); - return dest_node; - } - } -- return REG_MISSING; -+ return -1; - } - - static reg_errcode_t -@@ -1410,7 +1391,7 @@ - regmatch_t *regs, re_node_set *eps_via_nodes) - { - Idx num = --fs->num; -- assert (REG_VALID_INDEX (num)); -+ assert (num >= 0); - *pidx = fs->stack[num].idx; - memcpy (regs, fs->stack[num].regs, sizeof (regmatch_t) * nregs); - re_node_set_free (eps_via_nodes); -@@ -1503,9 +1484,9 @@ - cur_node = proceed_next_node (mctx, nmatch, pmatch, &idx, cur_node, - &eps_via_nodes, fs); - -- if (BE (! REG_VALID_INDEX (cur_node), 0)) -+ if (BE (cur_node < 0, 0)) - { -- if (BE (cur_node == REG_ERROR, 0)) -+ if (BE (cur_node == -2, 0)) - { - re_node_set_free (&eps_via_nodes); - if (prev_idx_match_malloced) -@@ -1889,10 +1870,10 @@ - { - Idx edst1 = dfa->edests[cur_node].elems[0]; - Idx edst2 = ((dfa->edests[cur_node].nelem > 1) -- ? dfa->edests[cur_node].elems[1] : REG_MISSING); -+ ? dfa->edests[cur_node].elems[1] : -1); - if ((!re_node_set_contains (inv_eclosure, edst1) - && re_node_set_contains (dest_nodes, edst1)) -- || (REG_VALID_NONZERO_INDEX (edst2) -+ || (edst2 > 0 - && !re_node_set_contains (inv_eclosure, edst2) - && re_node_set_contains (dest_nodes, edst2))) - { -@@ -1972,7 +1953,7 @@ - switch (dfa->nodes[node].type) - { - case OP_BACK_REF: -- if (bkref_idx != REG_MISSING) -+ if (bkref_idx != -1) - { - struct re_backref_cache_entry *ent = mctx->bkref_ents + bkref_idx; - do -@@ -2088,8 +2069,8 @@ - subexp_idx = dfa->nodes[ent->node].opr.idx; - if (ent->subexp_to == str_idx) - { -- Idx ops_node = REG_MISSING; -- Idx cls_node = REG_MISSING; -+ Idx ops_node = -1; -+ Idx cls_node = -1; - for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx) - { - Idx node = dest_nodes->elems[node_idx]; -@@ -2104,7 +2085,7 @@ - - /* Check the limitation of the open subexpression. */ - /* Note that (ent->subexp_to = str_idx != ent->subexp_from). */ -- if (REG_VALID_INDEX (ops_node)) -+ if (ops_node >= 0) - { - err = sub_epsilon_src_nodes (dfa, ops_node, dest_nodes, - candidates); -@@ -2113,7 +2094,7 @@ - } - - /* Check the limitation of the close subexpression. */ -- if (REG_VALID_INDEX (cls_node)) -+ if (cls_node >= 0) - for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx) - { - Idx node = dest_nodes->elems[node_idx]; -@@ -2166,7 +2147,7 @@ - re_sift_context_t local_sctx; - Idx first_idx = search_cur_bkref_entry (mctx, str_idx); - -- if (first_idx == REG_MISSING) -+ if (first_idx == -1) - return REG_NOERROR; - - local_sctx.sifted_states = NULL; /* Mark that it hasn't been initialized. */ -@@ -2570,7 +2551,7 @@ - if (BE (err != REG_NOERROR, 0)) - return err; - #ifdef DEBUG -- assert (dfa->nexts[cur_node_idx] != REG_MISSING); -+ assert (dfa->nexts[cur_node_idx] != -1); - #endif - new_nodes = dfa->eclosures + dfa->nexts[cur_node_idx]; - -@@ -2636,7 +2617,7 @@ - /* And add the epsilon closures (which is 'new_dest_nodes') of - the backreference to appropriate state_log. */ - #ifdef DEBUG -- assert (dfa->nexts[node_idx] != REG_MISSING); -+ assert (dfa->nexts[node_idx] != -1); - #endif - for (; bkc_idx < mctx->nbkref_ents; ++bkc_idx) - { -@@ -2720,7 +2701,7 @@ - const char *buf = (const char *) re_string_get_buffer (&mctx->input); - /* Return if we have already checked BKREF_NODE at BKREF_STR_IDX. */ - Idx cache_idx = search_cur_bkref_entry (mctx, bkref_str_idx); -- if (cache_idx != REG_MISSING) -+ if (cache_idx != -1) - { - const struct re_backref_cache_entry *entry - = mctx->bkref_ents + cache_idx; -@@ -2825,7 +2806,7 @@ - nodes = &mctx->state_log[sl_str]->nodes; - cls_node = find_subexp_node (dfa, nodes, subexp_num, - OP_CLOSE_SUBEXP); -- if (cls_node == REG_MISSING) -+ if (cls_node == -1) - continue; /* No. */ - if (sub_top->path == NULL) - { -@@ -2904,7 +2885,7 @@ - && node->opr.idx == subexp_idx) - return cls_node; - } -- return REG_MISSING; -+ return -1; - } - - /* Check whether the node TOP_NODE at TOP_STR can arrive to the node -@@ -3180,7 +3161,7 @@ - Idx cur_node = cur_nodes->elems[idx]; - const re_node_set *eclosure = dfa->eclosures + cur_node; - outside_node = find_subexp_node (dfa, eclosure, ex_subexp, type); -- if (outside_node == REG_MISSING) -+ if (outside_node == -1) - { - /* There are no problematic nodes, just merge them. */ - err = re_node_set_merge (&new_nodes, eclosure); -@@ -3266,7 +3247,7 @@ - Idx cache_idx_start = search_cur_bkref_entry (mctx, cur_str); - struct re_backref_cache_entry *ent; - -- if (cache_idx_start == REG_MISSING) -+ if (cache_idx_start == -1) - return REG_NOERROR; - - restart: -@@ -3391,7 +3372,7 @@ - /* At first, group all nodes belonging to 'state' into several - destinations. */ - ndests = group_nodes_into_DFAstates (dfa, state, dests_node, dests_ch); -- if (BE (! REG_VALID_NONZERO_INDEX (ndests), 0)) -+ if (BE (ndests <= 0, 0)) - { - if (dests_node_malloced) - free (dests_alloc); -@@ -3453,7 +3434,7 @@ - for (j = 0; j < dests_node[i].nelem; ++j) - { - next_node = dfa->nexts[dests_node[i].elems[j]]; -- if (next_node != REG_MISSING) -+ if (next_node != -1) - { - err = re_node_set_merge (&follows, dfa->eclosures + next_node); - if (BE (err != REG_NOERROR, 0)) -@@ -3764,7 +3745,7 @@ - error_return: - for (j = 0; j < ndests; ++j) - re_node_set_free (dests_node + j); -- return REG_MISSING; -+ return -1; - } - - #ifdef RE_ENABLE_I18N -@@ -3776,6 +3757,10 @@ - one collating element like '.', '[a-z]', opposite to the other nodes - can only accept one byte. */ - -+# ifdef _LIBC -+# include -+# endif -+ - static int - internal_function - check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx, -@@ -3895,8 +3880,6 @@ - const int32_t *table, *indirect; - const unsigned char *weights, *extra; - const char *collseqwc; -- /* This #include defines a local function! */ --# include - - /* match with collating_symbol? */ - if (cset->ncoll_syms) -@@ -3953,7 +3936,7 @@ - _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB); - indirect = (const int32_t *) - _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB); -- int32_t idx = findidx (&cp, elem_len); -+ int32_t idx = findidx (table, indirect, extra, &cp, elem_len); - if (idx > 0) - for (i = 0; i < cset->nequiv_classes; ++i) - { -@@ -4193,7 +4176,7 @@ - match_ctx_init (re_match_context_t *mctx, int eflags, Idx n) - { - mctx->eflags = eflags; -- mctx->match_last = REG_MISSING; -+ mctx->match_last = -1; - if (n > 0) - { - /* Avoid overflow. */ -@@ -4314,7 +4297,7 @@ - return REG_NOERROR; - } - --/* Return the first entry with the same str_idx, or REG_MISSING if none is -+/* Return the first entry with the same str_idx, or -1 if none is - found. Note that MCTX->BKREF_ENTS is already sorted by MCTX->STR_IDX. */ - - static Idx -@@ -4334,7 +4317,7 @@ - if (left < last && mctx->bkref_ents[left].str_idx == str_idx) - return left; - else -- return REG_MISSING; -+ return -1; - } - - /* Register the node NODE, whose type is OP_OPEN_SUBEXP, and which matches -diff -durN inetutils-1.9.4.orig/lib/rewinddir.c inetutils-1.9.4/lib/rewinddir.c ---- inetutils-1.9.4.orig/lib/rewinddir.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/rewinddir.c 2017-05-15 17:51:30.078125000 +0800 -@@ -1,5 +1,5 @@ - /* Restart reading the entries of a directory from the beginning. -- Copyright (C) 2011-2015 Free Software Foundation, Inc. -+ Copyright (C) 2011-2017 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 -diff -durN inetutils-1.9.4.orig/lib/save-cwd.c inetutils-1.9.4/lib/save-cwd.c ---- inetutils-1.9.4.orig/lib/save-cwd.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/save-cwd.c 2017-05-15 17:51:30.234375000 +0800 -@@ -1,6 +1,6 @@ - /* save-cwd.c -- Save and restore current working directory. - -- Copyright (C) 1995, 1997-1998, 2003-2006, 2009-2015 Free Software -+ Copyright (C) 1995, 1997-1998, 2003-2006, 2009-2017 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/save-cwd.h inetutils-1.9.4/lib/save-cwd.h ---- inetutils-1.9.4.orig/lib/save-cwd.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/save-cwd.h 2017-05-15 17:51:30.375000000 +0800 -@@ -1,6 +1,6 @@ - /* Save and restore current working directory. - -- Copyright (C) 1995, 1997-1998, 2003, 2009-2015 Free Software Foundation, -+ Copyright (C) 1995, 1997-1998, 2003, 2009-2017 Free Software Foundation, - Inc. - - This program is free software: you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/secure_getenv.c inetutils-1.9.4/lib/secure_getenv.c ---- inetutils-1.9.4.orig/lib/secure_getenv.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/secure_getenv.c 2017-05-15 17:51:30.578125000 +0800 -@@ -1,6 +1,6 @@ --/* Look up an environment variable more securely. -+/* Look up an environment variable, returning NULL in insecure situations. - -- Copyright 2013-2015 Free Software Foundation, Inc. -+ Copyright 2013-2017 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 -@@ -20,22 +20,35 @@ - #include - - #if !HAVE___SECURE_GETENV --# if HAVE_ISSETUGID -+# if HAVE_ISSETUGID || (HAVE_GETUID && HAVE_GETEUID && HAVE_GETGID && HAVE_GETEGID) - # include --# else --# undef issetugid --# define issetugid() 1 - # endif - #endif - - char * - secure_getenv (char const *name) - { --#if HAVE___SECURE_GETENV -+#if HAVE___SECURE_GETENV /* glibc */ - return __secure_getenv (name); --#else -+#elif HAVE_ISSETUGID /* OS X, FreeBSD, NetBSD, OpenBSD */ - if (issetugid ()) -- return 0; -+ return NULL; - return getenv (name); -+#elif HAVE_GETUID && HAVE_GETEUID && HAVE_GETGID && HAVE_GETEGID /* other Unix */ -+ if (geteuid () != getuid () || getegid () != getgid ()) -+ return NULL; -+ return getenv (name); -+#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* native Windows */ -+ /* On native Windows, there is no such concept as setuid or setgid binaries. -+ - Programs launched as system services have high privileges, but they don't -+ inherit environment variables from a user. -+ - Programs launched by a user with "Run as Administrator" have high -+ privileges and use the environment variables, but the user has been asked -+ whether he agrees. -+ - Programs launched by a user without "Run as Administrator" cannot gain -+ high privileges, therefore there is no risk. */ -+ return getenv (name); -+#else -+ return NULL; - #endif - } -diff -durN inetutils-1.9.4.orig/lib/select.c inetutils-1.9.4/lib/select.c ---- inetutils-1.9.4.orig/lib/select.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/select.c 2017-05-15 17:51:30.843750000 +0800 -@@ -1,7 +1,7 @@ - /* Emulation for select(2) - Contributed by Paolo Bonzini. - -- Copyright 2008-2015 Free Software Foundation, Inc. -+ Copyright 2008-2017 Free Software Foundation, Inc. - - This file is part of gnulib. - -@@ -39,7 +39,11 @@ - /* Get the overridden 'struct timeval'. */ - #include - --#include "msvc-nothrow.h" -+#if GNULIB_MSVC_NOTHROW -+# include "msvc-nothrow.h" -+#else -+# include -+#endif - - #undef select - -diff -durN inetutils-1.9.4.orig/lib/setenv.c inetutils-1.9.4/lib/setenv.c ---- inetutils-1.9.4.orig/lib/setenv.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/setenv.c 2017-05-15 17:51:31.000000000 +0800 -@@ -1,4 +1,4 @@ --/* Copyright (C) 1992, 1995-2003, 2005-2015 Free Software Foundation, Inc. -+/* Copyright (C) 1992, 1995-2003, 2005-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - This program is free software: you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/sethostname.c inetutils-1.9.4/lib/sethostname.c ---- inetutils-1.9.4.orig/lib/sethostname.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/sethostname.c 2017-05-15 17:51:31.140625000 +0800 -@@ -1,6 +1,6 @@ - /* sethostname emulation for glibc compliance. - -- Copyright (C) 2011-2015 Free Software Foundation, Inc. -+ Copyright (C) 2011-2017 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 -@@ -89,7 +89,7 @@ - - /* Ensure that declares SetComputerNameEx. */ - #undef _WIN32_WINNT --#define _WIN32_WINNT 0x500 -+#define _WIN32_WINNT _WIN32_WINNT_WIN2K - - #define WIN32_LEAN_AND_MEAN - -diff -durN inetutils-1.9.4.orig/lib/signal.in.h inetutils-1.9.4/lib/signal.in.h ---- inetutils-1.9.4.orig/lib/signal.in.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/signal.in.h 2017-05-15 17:51:31.281250000 +0800 -@@ -1,6 +1,6 @@ - /* A GNU-like . - -- Copyright (C) 2006-2015 Free Software Foundation, Inc. -+ Copyright (C) 2006-2017 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 -diff -durN inetutils-1.9.4.orig/lib/size_max.h inetutils-1.9.4/lib/size_max.h ---- inetutils-1.9.4.orig/lib/size_max.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/size_max.h 2017-05-15 17:51:31.421875000 +0800 -@@ -1,5 +1,5 @@ - /* size_max.h -- declare SIZE_MAX through system headers -- Copyright (C) 2005-2006, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2005-2006, 2009-2017 Free Software Foundation, Inc. - Written by Simon Josefsson. - - This program is free software; you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/sleep.c inetutils-1.9.4/lib/sleep.c ---- inetutils-1.9.4.orig/lib/sleep.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/sleep.c 2017-05-15 17:51:31.562500000 +0800 -@@ -1,5 +1,5 @@ - /* Pausing execution of the current thread. -- Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. - Written by Bruno Haible , 2007. - - This program is free software: you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/snprintf.c inetutils-1.9.4/lib/snprintf.c ---- inetutils-1.9.4.orig/lib/snprintf.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/snprintf.c 2017-05-15 17:51:31.703125000 +0800 -@@ -1,5 +1,5 @@ - /* Formatted output to strings. -- Copyright (C) 2004, 2006-2015 Free Software Foundation, Inc. -+ Copyright (C) 2004, 2006-2017 Free Software Foundation, Inc. - Written by Simon Josefsson and Paul Eggert. - - This program is free software; you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/sockets.c inetutils-1.9.4/lib/sockets.c ---- inetutils-1.9.4.orig/lib/sockets.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/sockets.c 2017-05-15 17:51:31.843750000 +0800 -@@ -1,6 +1,6 @@ - /* sockets.c --- wrappers for Windows socket functions - -- Copyright (C) 2008-2015 Free Software Foundation, Inc. -+ Copyright (C) 2008-2017 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 -@@ -28,7 +28,11 @@ - # include - - # include "fd-hook.h" --# include "msvc-nothrow.h" -+# if GNULIB_MSVC_NOTHROW -+# include "msvc-nothrow.h" -+# else -+# include -+# endif - - /* Get set_winsock_errno, FD_TO_SOCKET etc. */ - # include "w32sock.h" -@@ -121,8 +125,11 @@ - if (err != 0) - return 1; - -- if (data.wVersion < version) -- return 2; -+ if (data.wVersion != version) -+ { -+ WSACleanup (); -+ return 2; -+ } - - if (initialized_sockets_version == 0) - register_fd_hook (close_fd_maybe_socket, ioctl_fd_maybe_socket, -diff -durN inetutils-1.9.4.orig/lib/sockets.h inetutils-1.9.4/lib/sockets.h ---- inetutils-1.9.4.orig/lib/sockets.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/sockets.h 2017-05-15 17:51:32.000000000 +0800 -@@ -1,6 +1,6 @@ - /* sockets.h - wrappers for Windows socket functions - -- Copyright (C) 2008-2015 Free Software Foundation, Inc. -+ Copyright (C) 2008-2017 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 -@@ -18,22 +18,22 @@ - /* Written by Simon Josefsson */ - - #ifndef SOCKETS_H --# define SOCKETS_H 1 -+#define SOCKETS_H 1 - --#define SOCKETS_1_0 0x100 /* don't use - does not work on Windows XP */ --#define SOCKETS_1_1 0x101 --#define SOCKETS_2_0 0x200 /* don't use - does not work on Windows XP */ --#define SOCKETS_2_1 0x201 --#define SOCKETS_2_2 0x202 -+#define SOCKETS_1_0 0x0001 -+#define SOCKETS_1_1 0x0101 -+#define SOCKETS_2_0 0x0002 -+#define SOCKETS_2_1 0x0102 -+#define SOCKETS_2_2 0x0202 - - int gl_sockets_startup (int version) --#if !WINDOWS_SOCKETS -+#ifndef WINDOWS_SOCKETS - _GL_ATTRIBUTE_CONST - #endif - ; - - int gl_sockets_cleanup (void) --#if !WINDOWS_SOCKETS -+#ifndef WINDOWS_SOCKETS - _GL_ATTRIBUTE_CONST - #endif - ; -@@ -41,11 +41,15 @@ - /* This function is useful it you create a socket using gnulib's - Winsock wrappers but needs to pass on the socket handle to some - other library that only accepts sockets. */ --#if WINDOWS_SOCKETS -+#ifdef WINDOWS_SOCKETS - --#include -+# include - --#include "msvc-nothrow.h" -+# if GNULIB_MSVC_NOTHROW -+# include "msvc-nothrow.h" -+# else -+# include -+# endif - - static inline SOCKET - gl_fd_to_handle (int fd) -@@ -55,7 +59,7 @@ - - #else - --#define gl_fd_to_handle(x) (x) -+# define gl_fd_to_handle(x) (x) - - #endif /* WINDOWS_SOCKETS */ - -diff -durN inetutils-1.9.4.orig/lib/stat.c inetutils-1.9.4/lib/stat.c ---- inetutils-1.9.4.orig/lib/stat.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/stat.c 2017-05-15 17:51:32.515625000 +0800 -@@ -1,5 +1,5 @@ - /* Work around platform bugs in stat. -- Copyright (C) 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2009-2017 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 -@@ -14,7 +14,7 @@ - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - --/* written by Eric Blake */ -+/* Written by Eric Blake and Bruno Haible. */ - - /* If the user's config.h happens to include , let it include only - the system's here, so that orig_stat doesn't recurse to -@@ -28,26 +28,19 @@ - #undef __need_system_sys_stat_h - - #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ --# if _GL_WINDOWS_64_BIT_ST_SIZE --# undef stat /* avoid warning on mingw64 with _FILE_OFFSET_BITS=64 */ --# define stat _stati64 --# define REPLACE_FUNC_STAT_DIR 1 --# undef REPLACE_FUNC_STAT_FILE --# elif REPLACE_FUNC_STAT_FILE --/* mingw64 has a broken stat() function, based on _stat(), in libmingwex.a. -- Bypass it. */ --# define stat _stat --# define REPLACE_FUNC_STAT_DIR 1 --# undef REPLACE_FUNC_STAT_FILE --# endif -+# define WINDOWS_NATIVE - #endif - -+#if !defined WINDOWS_NATIVE -+ - static int - orig_stat (const char *filename, struct stat *buf) - { - return stat (filename, buf); - } - -+#endif -+ - /* Specification. */ - /* Write "sys/stat.h" here, not , otherwise OSF/1 5.1 DTK cc - eliminates this include because of the preliminary #include -@@ -58,16 +51,42 @@ - #include - #include - #include --#include "dosname.h" -+#include "filename.h" -+#include "malloca.h" - #include "verify.h" - --#if REPLACE_FUNC_STAT_DIR --# include "pathmax.h" -- /* The only known systems where REPLACE_FUNC_STAT_DIR is needed also -- have a constant PATH_MAX. */ --# ifndef PATH_MAX --# error "Please port this replacement to your platform" --# endif -+#ifdef WINDOWS_NATIVE -+# define WIN32_LEAN_AND_MEAN -+# include -+# include "stat-w32.h" -+#endif -+ -+#ifdef WINDOWS_NATIVE -+/* Return TRUE if the given file name denotes an UNC root. */ -+static BOOL -+is_unc_root (const char *rname) -+{ -+ /* Test whether it has the syntax '\\server\share'. */ -+ if (ISSLASH (rname[0]) && ISSLASH (rname[1])) -+ { -+ /* It starts with two slashes. Find the next slash. */ -+ const char *p = rname + 2; -+ const char *q = p; -+ while (*q != '\0' && !ISSLASH (*q)) -+ q++; -+ if (q > p && *q != '\0') -+ { -+ /* Found the next slash at q. */ -+ q++; -+ const char *r = q; -+ while (*r != '\0' && !ISSLASH (*r)) -+ r++; -+ if (r > q && *r == '\0') -+ return TRUE; -+ } -+ } -+ return FALSE; -+} - #endif - - /* Store information about NAME into ST. Work around bugs with -@@ -77,62 +96,328 @@ - correctly. */ - - int --rpl_stat (char const *name, struct stat *st) -+rpl_stat (char const *name, struct stat *buf) - { -- int result = orig_stat (name, st); --#if REPLACE_FUNC_STAT_FILE -- /* Solaris 9 mistakenly succeeds when given a non-directory with a -- trailing slash. */ -- if (result == 0 && !S_ISDIR (st->st_mode)) -+#ifdef WINDOWS_NATIVE -+ /* Fill the fields ourselves, because the original stat function returns -+ values for st_atime, st_mtime, st_ctime that depend on the current time -+ zone. See -+ */ -+ /* XXX Should we convert to wchar_t* and prepend '\\?\', in order to work -+ around length limitations -+ ? */ -+ -+ /* POSIX -+ specifies: "More than two leading characters shall be treated as -+ a single character." */ -+ if (ISSLASH (name[0]) && ISSLASH (name[1]) && ISSLASH (name[2])) - { -- size_t len = strlen (name); -- if (ISSLASH (name[len - 1])) -+ name += 2; -+ while (ISSLASH (name[1])) -+ name++; -+ } -+ -+ size_t len = strlen (name); -+ size_t drive_prefix_len = (HAS_DEVICE (name) ? 2 : 0); -+ -+ /* Remove trailing slashes (except the very first one, at position -+ drive_prefix_len), but remember their presence. */ -+ size_t rlen; -+ bool check_dir = false; -+ -+ rlen = len; -+ while (rlen > drive_prefix_len && ISSLASH (name[rlen-1])) -+ { -+ check_dir = true; -+ if (rlen == drive_prefix_len + 1) -+ break; -+ rlen--; -+ } -+ -+ /* Handle '' and 'C:'. */ -+ if (!check_dir && rlen == drive_prefix_len) -+ { -+ errno = ENOENT; -+ return -1; -+ } -+ -+ /* Handle '\\'. */ -+ if (rlen == 1 && ISSLASH (name[0]) && len >= 2) -+ { -+ errno = ENOENT; -+ return -1; -+ } -+ -+ const char *rname; -+ char *malloca_rname; -+ if (rlen == len) -+ { -+ rname = name; -+ malloca_rname = NULL; -+ } -+ else -+ { -+ malloca_rname = malloca (rlen + 1); -+ if (malloca_rname == NULL) - { -- errno = ENOTDIR; -+ errno = ENOMEM; - return -1; - } -+ memcpy (malloca_rname, name, rlen); -+ malloca_rname[rlen] = '\0'; -+ rname = malloca_rname; - } --#endif /* REPLACE_FUNC_STAT_FILE */ --#if REPLACE_FUNC_STAT_DIR - -- if (result == -1 && errno == ENOENT) -+ /* There are two ways to get at the requested information: -+ - by scanning the parent directory and examining the relevant -+ directory entry, -+ - by opening the file directly. -+ The first approach fails for root directories (e.g. 'C:\') and -+ UNC root directories (e.g. '\\server\share'). -+ The second approach fails for some system files (e.g. 'C:\pagefile.sys' -+ and 'C:\hiberfil.sys'): ERROR_SHARING_VIOLATION. -+ The second approach gives more information (in particular, correct -+ st_dev, st_ino, st_nlink fields). -+ So we use the second approach and, as a fallback except for root and -+ UNC root directories, also the first approach. */ -+ { -+ int ret; -+ - { -- /* Due to mingw's oddities, there are some directories (like -- c:\) where stat() only succeeds with a trailing slash, and -- other directories (like c:\windows) where stat() only -- succeeds without a trailing slash. But we want the two to be -- synonymous, since chdir() manages either style. Likewise, Mingw also -- reports ENOENT for names longer than PATH_MAX, when we want -- ENAMETOOLONG, and for stat("file/"), when we want ENOTDIR. -- Fortunately, mingw PATH_MAX is small enough for stack -- allocation. */ -- char fixed_name[PATH_MAX + 1] = {0}; -- size_t len = strlen (name); -- bool check_dir = false; -- verify (PATH_MAX <= 4096); -- if (PATH_MAX <= len) -- errno = ENAMETOOLONG; -- else if (len) -+ /* Approach based on the file. */ -+ -+ /* Open a handle to the file. -+ CreateFile -+ -+ */ -+ HANDLE h = -+ CreateFile (rname, -+ FILE_READ_ATTRIBUTES, -+ FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, -+ NULL, -+ OPEN_EXISTING, -+ /* FILE_FLAG_POSIX_SEMANTICS (treat file names that differ only -+ in case as different) makes sense only when applied to *all* -+ filesystem operations. */ -+ FILE_FLAG_BACKUP_SEMANTICS /* | FILE_FLAG_POSIX_SEMANTICS */, -+ NULL); -+ if (h != INVALID_HANDLE_VALUE) - { -- strcpy (fixed_name, name); -- if (ISSLASH (fixed_name[len - 1])) -- { -- check_dir = true; -- while (len && ISSLASH (fixed_name[len - 1])) -- fixed_name[--len] = '\0'; -- if (!len) -- fixed_name[0] = '/'; -- } -- else -- fixed_name[len++] = '/'; -- result = orig_stat (fixed_name, st); -- if (result == 0 && check_dir && !S_ISDIR (st->st_mode)) -+ ret = _gl_fstat_by_handle (h, rname, buf); -+ CloseHandle (h); -+ goto done; -+ } -+ } -+ -+ /* Test for root and UNC root directories. */ -+ if ((rlen == drive_prefix_len + 1 && ISSLASH (rname[drive_prefix_len])) -+ || is_unc_root (rname)) -+ goto failed; -+ -+ /* Fallback. */ -+ { -+ /* Approach based on the directory entry. */ -+ -+ if (strchr (rname, '?') != NULL || strchr (rname, '*') != NULL) -+ { -+ /* Other Windows API functions would fail with error -+ ERROR_INVALID_NAME. */ -+ if (malloca_rname != NULL) -+ freea (malloca_rname); -+ errno = ENOENT; -+ return -1; -+ } -+ -+ /* Get the details about the directory entry. This can be done through -+ FindFirstFile -+ -+ -+ or through -+ FindFirstFileEx with argument FindExInfoBasic -+ -+ -+ */ -+ WIN32_FIND_DATA info; -+ HANDLE h = FindFirstFile (rname, &info); -+ if (h == INVALID_HANDLE_VALUE) -+ goto failed; -+ -+ /* Test for error conditions before starting to fill *buf. */ -+ if (sizeof (buf->st_size) <= 4 && info.nFileSizeHigh > 0) -+ { -+ FindClose (h); -+ if (malloca_rname != NULL) -+ freea (malloca_rname); -+ errno = EOVERFLOW; -+ return -1; -+ } -+ -+# if _GL_WINDOWS_STAT_INODES -+ buf->st_dev = 0; -+# if _GL_WINDOWS_STAT_INODES == 2 -+ buf->st_ino._gl_ino[0] = buf->st_ino._gl_ino[1] = 0; -+# else /* _GL_WINDOWS_STAT_INODES == 1 */ -+ buf->st_ino = 0; -+# endif -+# else -+ /* st_ino is not wide enough for identifying a file on a device. -+ Without st_ino, st_dev is pointless. */ -+ buf->st_dev = 0; -+ buf->st_ino = 0; -+# endif -+ -+ /* st_mode. */ -+ unsigned int mode = -+ /* XXX How to handle FILE_ATTRIBUTE_REPARSE_POINT ? */ -+ ((info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? _S_IFDIR | S_IEXEC_UGO : _S_IFREG) -+ | S_IREAD_UGO -+ | ((info.dwFileAttributes & FILE_ATTRIBUTE_READONLY) ? 0 : S_IWRITE_UGO); -+ if (!(info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) -+ { -+ /* Determine whether the file is executable by looking at the file -+ name suffix. */ -+ if (info.nFileSizeHigh > 0 || info.nFileSizeLow > 0) - { -- result = -1; -- errno = ENOTDIR; -+ const char *last_dot = NULL; -+ const char *p; -+ for (p = info.cFileName; *p != '\0'; p++) -+ if (*p == '.') -+ last_dot = p; -+ if (last_dot != NULL) -+ { -+ const char *suffix = last_dot + 1; -+ if (_stricmp (suffix, "exe") == 0 -+ || _stricmp (suffix, "bat") == 0 -+ || _stricmp (suffix, "cmd") == 0 -+ || _stricmp (suffix, "com") == 0) -+ mode |= S_IEXEC_UGO; -+ } - } - } -+ buf->st_mode = mode; -+ -+ /* st_nlink. Ignore hard links here. */ -+ buf->st_nlink = 1; -+ -+ /* There's no easy way to map the Windows SID concept to an integer. */ -+ buf->st_uid = 0; -+ buf->st_gid = 0; -+ -+ /* st_rdev is irrelevant for normal files and directories. */ -+ buf->st_rdev = 0; -+ -+ /* st_size. */ -+ if (sizeof (buf->st_size) <= 4) -+ /* Range check already done above. */ -+ buf->st_size = info.nFileSizeLow; -+ else -+ buf->st_size = ((long long) info.nFileSizeHigh << 32) | (long long) info.nFileSizeLow; -+ -+ /* st_atime, st_mtime, st_ctime. */ -+# if _GL_WINDOWS_STAT_TIMESPEC -+ buf->st_atim = _gl_convert_FILETIME_to_timespec (&info.ftLastAccessTime); -+ buf->st_mtim = _gl_convert_FILETIME_to_timespec (&info.ftLastWriteTime); -+ buf->st_ctim = _gl_convert_FILETIME_to_timespec (&info.ftCreationTime); -+# else -+ buf->st_atime = _gl_convert_FILETIME_to_POSIX (&info.ftLastAccessTime); -+ buf->st_mtime = _gl_convert_FILETIME_to_POSIX (&info.ftLastWriteTime); -+ buf->st_ctime = _gl_convert_FILETIME_to_POSIX (&info.ftCreationTime); -+# endif -+ -+ FindClose (h); -+ -+ ret = 0; -+ } -+ -+ done: -+ if (ret >= 0 && check_dir && !S_ISDIR (buf->st_mode)) -+ { -+ errno = ENOTDIR; -+ ret = -1; -+ } -+ if (malloca_rname != NULL) -+ { -+ int saved_errno = errno; -+ freea (malloca_rname); -+ errno = saved_errno; -+ } -+ return ret; -+ } -+ -+ failed: -+ { -+ DWORD error = GetLastError (); -+ #if 0 -+ fprintf (stderr, "rpl_stat error 0x%x\n", (unsigned int) error); -+ #endif -+ -+ if (malloca_rname != NULL) -+ freea (malloca_rname); -+ -+ switch (error) -+ { -+ /* Some of these errors probably cannot happen with the specific flags -+ that we pass to CreateFile. But who knows... */ -+ case ERROR_FILE_NOT_FOUND: /* The last component of rname does not exist. */ -+ case ERROR_PATH_NOT_FOUND: /* Some directory component in rname does not exist. */ -+ case ERROR_BAD_PATHNAME: /* rname is such as '\\server'. */ -+ case ERROR_BAD_NET_NAME: /* rname is such as '\\server\nonexistentshare'. */ -+ case ERROR_INVALID_NAME: /* rname contains wildcards, misplaced colon, etc. */ -+ case ERROR_DIRECTORY: -+ errno = ENOENT; -+ break; -+ -+ case ERROR_ACCESS_DENIED: /* rname is such as 'C:\System Volume Information\foo'. */ -+ case ERROR_SHARING_VIOLATION: /* rname is such as 'C:\pagefile.sys' (second approach only). */ -+ /* XXX map to EACCESS or EPERM? */ -+ errno = EACCES; -+ break; -+ -+ case ERROR_OUTOFMEMORY: -+ errno = ENOMEM; -+ break; -+ -+ case ERROR_WRITE_PROTECT: -+ errno = EROFS; -+ break; -+ -+ case ERROR_WRITE_FAULT: -+ case ERROR_READ_FAULT: -+ case ERROR_GEN_FAILURE: -+ errno = EIO; -+ break; -+ -+ case ERROR_BUFFER_OVERFLOW: -+ case ERROR_FILENAME_EXCED_RANGE: -+ errno = ENAMETOOLONG; -+ break; -+ -+ case ERROR_DELETE_PENDING: /* XXX map to EACCESS or EPERM? */ -+ errno = EPERM; -+ break; -+ -+ default: -+ errno = EINVAL; -+ break; -+ } -+ -+ return -1; -+ } -+#else -+ int result = orig_stat (name, buf); -+# if REPLACE_FUNC_STAT_FILE -+ /* Solaris 9 mistakenly succeeds when given a non-directory with a -+ trailing slash. */ -+ if (result == 0 && !S_ISDIR (buf->st_mode)) -+ { -+ size_t len = strlen (name); -+ if (ISSLASH (name[len - 1])) -+ { -+ errno = ENOTDIR; -+ return -1; -+ } - } --#endif /* REPLACE_FUNC_STAT_DIR */ -+# endif /* REPLACE_FUNC_STAT_FILE */ - return result; -+#endif - } -diff -durN inetutils-1.9.4.orig/lib/stat-w32.c inetutils-1.9.4/lib/stat-w32.c ---- inetutils-1.9.4.orig/lib/stat-w32.c 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/lib/stat-w32.c 2017-05-15 17:51:32.171875000 +0800 -@@ -0,0 +1,415 @@ -+/* Core of implementation of fstat and stat for native Windows. -+ Copyright (C) 2017 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 -+ the Free Software Foundation; either version 3 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, see . */ -+ -+/* Written by Bruno Haible. */ -+ -+#include -+ -+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -+ -+/* Ensure that defines FILE_ID_INFO. */ -+#undef _WIN32_WINNT -+#define _WIN32_WINNT _WIN32_WINNT_WIN8 -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+/* Specification. */ -+#include "stat-w32.h" -+ -+#include "pathmax.h" -+#include "verify.h" -+ -+#if _GL_WINDOWS_STAT_INODES == 2 -+/* GetFileInformationByHandleEx was introduced only in Windows Vista. */ -+typedef DWORD (WINAPI * GetFileInformationByHandleExFuncType) (HANDLE hFile, -+ FILE_INFO_BY_HANDLE_CLASS fiClass, -+ LPVOID lpBuffer, -+ DWORD dwBufferSize); -+static GetFileInformationByHandleExFuncType GetFileInformationByHandleExFunc = NULL; -+#endif -+/* GetFinalPathNameByHandle was introduced only in Windows Vista. */ -+typedef DWORD (WINAPI * GetFinalPathNameByHandleFuncType) (HANDLE hFile, -+ LPTSTR lpFilePath, -+ DWORD lenFilePath, -+ DWORD dwFlags); -+static GetFinalPathNameByHandleFuncType GetFinalPathNameByHandleFunc = NULL; -+static BOOL initialized = FALSE; -+ -+static void -+initialize (void) -+{ -+ HMODULE kernel32 = LoadLibrary ("kernel32.dll"); -+ if (kernel32 != NULL) -+ { -+#if _GL_WINDOWS_STAT_INODES == 2 -+ GetFileInformationByHandleExFunc = -+ (GetFileInformationByHandleExFuncType) GetProcAddress (kernel32, "GetFileInformationByHandleEx"); -+#endif -+ GetFinalPathNameByHandleFunc = -+ (GetFinalPathNameByHandleFuncType) GetProcAddress (kernel32, "GetFinalPathNameByHandleA"); -+ } -+ initialized = TRUE; -+} -+ -+/* Converts a FILETIME to GMT time since 1970-01-01 00:00:00. */ -+#if _GL_WINDOWS_STAT_TIMESPEC -+struct timespec -+_gl_convert_FILETIME_to_timespec (const FILETIME *ft) -+{ -+ struct timespec result; -+ /* FILETIME: */ -+ unsigned long long since_1601 = -+ ((unsigned long long) ft->dwHighDateTime << 32) -+ | (unsigned long long) ft->dwLowDateTime; -+ if (since_1601 == 0) -+ { -+ result.tv_sec = 0; -+ result.tv_nsec = 0; -+ } -+ else -+ { -+ /* Between 1601-01-01 and 1970-01-01 there were 280 normal years and 89 -+ leap years, in total 134774 days. */ -+ unsigned long long since_1970 = -+ since_1601 - (unsigned long long) 134774 * (unsigned long long) 86400 * (unsigned long long) 10000000; -+ result.tv_sec = since_1970 / (unsigned long long) 10000000; -+ result.tv_nsec = (unsigned long) (since_1970 % (unsigned long long) 10000000) * 100; -+ } -+ return result; -+} -+#else -+time_t -+_gl_convert_FILETIME_to_POSIX (const FILETIME *ft) -+{ -+ /* FILETIME: */ -+ unsigned long long since_1601 = -+ ((unsigned long long) ft->dwHighDateTime << 32) -+ | (unsigned long long) ft->dwLowDateTime; -+ if (since_1601 == 0) -+ return 0; -+ else -+ { -+ /* Between 1601-01-01 and 1970-01-01 there were 280 normal years and 89 -+ leap years, in total 134774 days. */ -+ unsigned long long since_1970 = -+ since_1601 - (unsigned long long) 134774 * (unsigned long long) 86400 * (unsigned long long) 10000000; -+ return since_1970 / (unsigned long long) 10000000; -+ } -+} -+#endif -+ -+/* Fill *BUF with information about the file designated by H. -+ PATH is the file name, if known, otherwise NULL. -+ Return 0 if successful, or -1 with errno set upon failure. */ -+int -+_gl_fstat_by_handle (HANDLE h, const char *path, struct stat *buf) -+{ -+ /* GetFileType -+ */ -+ DWORD type = GetFileType (h); -+ if (type == FILE_TYPE_DISK) -+ { -+ if (!initialized) -+ initialize (); -+ -+ /* st_mode can be determined through -+ GetFileAttributesEx -+ -+ -+ or through -+ GetFileInformationByHandle -+ -+ -+ or through -+ GetFileInformationByHandleEx with argument FileBasicInfo -+ -+ -+ The latter requires -D_WIN32_WINNT=_WIN32_WINNT_VISTA or higher. */ -+ BY_HANDLE_FILE_INFORMATION info; -+ if (! GetFileInformationByHandle (h, &info)) -+ goto failed; -+ -+ /* Test for error conditions before starting to fill *buf. */ -+ if (sizeof (buf->st_size) <= 4 && info.nFileSizeHigh > 0) -+ { -+ errno = EOVERFLOW; -+ return -1; -+ } -+ -+#if _GL_WINDOWS_STAT_INODES -+ /* st_ino can be determined through -+ GetFileInformationByHandle -+ -+ -+ as 64 bits, or through -+ GetFileInformationByHandleEx with argument FileIdInfo -+ -+ -+ as 128 bits. -+ The latter requires -D_WIN32_WINNT=_WIN32_WINNT_WIN8 or higher. */ -+ /* Experiments show that GetFileInformationByHandleEx does not provide -+ much more information than GetFileInformationByHandle: -+ * The dwVolumeSerialNumber from GetFileInformationByHandle is equal -+ to the low 32 bits of the 64-bit VolumeSerialNumber from -+ GetFileInformationByHandleEx, and is apparently sufficient for -+ identifying the device. -+ * The nFileIndex from GetFileInformationByHandle is equal to the low -+ 64 bits of the 128-bit FileId from GetFileInformationByHandleEx, -+ and the high 64 bits of this 128-bit FileId are zero. -+ * On a FAT file system, GetFileInformationByHandleEx fails with error -+ ERROR_INVALID_PARAMETER, whereas GetFileInformationByHandle -+ succeeds. -+ * On a CIFS/SMB file system, GetFileInformationByHandleEx fails with -+ error ERROR_INVALID_LEVEL, whereas GetFileInformationByHandle -+ succeeds. */ -+# if _GL_WINDOWS_STAT_INODES == 2 -+ if (GetFileInformationByHandleExFunc != NULL) -+ { -+ FILE_ID_INFO id; -+ if (GetFileInformationByHandleExFunc (h, FileIdInfo, &id, sizeof (id))) -+ { -+ buf->st_dev = id.VolumeSerialNumber; -+ verify (sizeof (ino_t) == sizeof (id.FileId)); -+ memcpy (&buf->st_ino, &id.FileId, sizeof (ino_t)); -+ goto ino_done; -+ } -+ else -+ { -+ switch (GetLastError ()) -+ { -+ case ERROR_INVALID_PARAMETER: /* older Windows version, or FAT */ -+ case ERROR_INVALID_LEVEL: /* CIFS/SMB file system */ -+ goto fallback; -+ default: -+ goto failed; -+ } -+ } -+ } -+ fallback: ; -+ /* Fallback for older Windows versions. */ -+ buf->st_dev = info.dwVolumeSerialNumber; -+ buf->st_ino._gl_ino[0] = ((ULONGLONG) info.nFileIndexHigh << 32) | (ULONGLONG) info.nFileIndexLow; -+ buf->st_ino._gl_ino[1] = 0; -+ ino_done: ; -+# else /* _GL_WINDOWS_STAT_INODES == 1 */ -+ buf->st_dev = info.dwVolumeSerialNumber; -+ buf->st_ino = ((ULONGLONG) info.nFileIndexHigh << 32) | (ULONGLONG) info.nFileIndexLow; -+# endif -+#else -+ /* st_ino is not wide enough for identifying a file on a device. -+ Without st_ino, st_dev is pointless. */ -+ buf->st_dev = 0; -+ buf->st_ino = 0; -+#endif -+ -+ /* st_mode. */ -+ unsigned int mode = -+ /* XXX How to handle FILE_ATTRIBUTE_REPARSE_POINT ? */ -+ ((info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? _S_IFDIR | S_IEXEC_UGO : _S_IFREG) -+ | S_IREAD_UGO -+ | ((info.dwFileAttributes & FILE_ATTRIBUTE_READONLY) ? 0 : S_IWRITE_UGO); -+ if (!(info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) -+ { -+ /* Determine whether the file is executable by looking at the file -+ name suffix. -+ If the file name is already known, use it. Otherwise, for -+ non-empty files, it can be determined through -+ GetFinalPathNameByHandle -+ -+ or through -+ GetFileInformationByHandleEx with argument FileNameInfo -+ -+ -+ Both require -D_WIN32_WINNT=_WIN32_WINNT_VISTA or higher. */ -+ if (info.nFileSizeHigh > 0 || info.nFileSizeLow > 0) -+ { -+ char fpath[PATH_MAX]; -+ if (path != NULL -+ || (GetFinalPathNameByHandleFunc != NULL -+ && GetFinalPathNameByHandleFunc (h, fpath, sizeof (fpath), VOLUME_NAME_NONE) -+ < sizeof (fpath) -+ && (path = fpath, 1))) -+ { -+ const char *last_dot = NULL; -+ const char *p; -+ for (p = path; *p != '\0'; p++) -+ if (*p == '.') -+ last_dot = p; -+ if (last_dot != NULL) -+ { -+ const char *suffix = last_dot + 1; -+ if (_stricmp (suffix, "exe") == 0 -+ || _stricmp (suffix, "bat") == 0 -+ || _stricmp (suffix, "cmd") == 0 -+ || _stricmp (suffix, "com") == 0) -+ mode |= S_IEXEC_UGO; -+ } -+ } -+ else -+ /* Cannot determine file name. Pretend that it is executable. */ -+ mode |= S_IEXEC_UGO; -+ } -+ } -+ buf->st_mode = mode; -+ -+ /* st_nlink can be determined through -+ GetFileInformationByHandle -+ -+ -+ or through -+ GetFileInformationByHandleEx with argument FileStandardInfo -+ -+ -+ The latter requires -D_WIN32_WINNT=_WIN32_WINNT_VISTA or higher. */ -+ buf->st_nlink = (info.nNumberOfLinks > SHRT_MAX ? SHRT_MAX : info.nNumberOfLinks); -+ -+ /* There's no easy way to map the Windows SID concept to an integer. */ -+ buf->st_uid = 0; -+ buf->st_gid = 0; -+ -+ /* st_rdev is irrelevant for normal files and directories. */ -+ buf->st_rdev = 0; -+ -+ /* st_size can be determined through -+ GetFileSizeEx -+ -+ or through -+ GetFileAttributesEx -+ -+ -+ or through -+ GetFileInformationByHandle -+ -+ -+ or through -+ GetFileInformationByHandleEx with argument FileStandardInfo -+ -+ -+ The latter requires -D_WIN32_WINNT=_WIN32_WINNT_VISTA or higher. */ -+ if (sizeof (buf->st_size) <= 4) -+ /* Range check already done above. */ -+ buf->st_size = info.nFileSizeLow; -+ else -+ buf->st_size = ((long long) info.nFileSizeHigh << 32) | (long long) info.nFileSizeLow; -+ -+ /* st_atime, st_mtime, st_ctime can be determined through -+ GetFileTime -+ -+ or through -+ GetFileAttributesEx -+ -+ -+ or through -+ GetFileInformationByHandle -+ -+ -+ or through -+ GetFileInformationByHandleEx with argument FileBasicInfo -+ -+ -+ The latter requires -D_WIN32_WINNT=_WIN32_WINNT_VISTA or higher. */ -+#if _GL_WINDOWS_STAT_TIMESPEC -+ buf->st_atim = _gl_convert_FILETIME_to_timespec (&info.ftLastAccessTime); -+ buf->st_mtim = _gl_convert_FILETIME_to_timespec (&info.ftLastWriteTime); -+ buf->st_ctim = _gl_convert_FILETIME_to_timespec (&info.ftCreationTime); -+#else -+ buf->st_atime = _gl_convert_FILETIME_to_POSIX (&info.ftLastAccessTime); -+ buf->st_mtime = _gl_convert_FILETIME_to_POSIX (&info.ftLastWriteTime); -+ buf->st_ctime = _gl_convert_FILETIME_to_POSIX (&info.ftCreationTime); -+#endif -+ -+ return 0; -+ } -+ else if (type == FILE_TYPE_CHAR || type == FILE_TYPE_PIPE) -+ { -+ buf->st_dev = 0; -+#if _GL_WINDOWS_STAT_INODES == 2 -+ buf->st_ino._gl_ino[0] = buf->st_ino._gl_ino[1] = 0; -+#else -+ buf->st_ino = 0; -+#endif -+ buf->st_mode = (type == FILE_TYPE_PIPE ? _S_IFIFO : _S_IFCHR); -+ buf->st_nlink = 1; -+ buf->st_uid = 0; -+ buf->st_gid = 0; -+ buf->st_rdev = 0; -+ if (type == FILE_TYPE_PIPE) -+ { -+ /* PeekNamedPipe -+ */ -+ DWORD bytes_available; -+ if (PeekNamedPipe (h, NULL, 0, NULL, &bytes_available, NULL)) -+ buf->st_size = bytes_available; -+ else -+ buf->st_size = 0; -+ } -+ else -+ buf->st_size = 0; -+#if _GL_WINDOWS_STAT_TIMESPEC -+ buf->st_atim.tv_sec = 0; buf->st_atim.tv_nsec = 0; -+ buf->st_mtim.tv_sec = 0; buf->st_mtim.tv_nsec = 0; -+ buf->st_ctim.tv_sec = 0; buf->st_ctim.tv_nsec = 0; -+#else -+ buf->st_atime = 0; -+ buf->st_mtime = 0; -+ buf->st_ctime = 0; -+#endif -+ return 0; -+ } -+ else -+ { -+ errno = ENOENT; -+ return -1; -+ } -+ -+ failed: -+ { -+ DWORD error = GetLastError (); -+ #if 0 -+ fprintf (stderr, "_gl_fstat_by_handle error 0x%x\n", (unsigned int) error); -+ #endif -+ switch (error) -+ { -+ case ERROR_ACCESS_DENIED: -+ case ERROR_SHARING_VIOLATION: -+ errno = EACCES; -+ break; -+ -+ case ERROR_OUTOFMEMORY: -+ errno = ENOMEM; -+ break; -+ -+ case ERROR_WRITE_FAULT: -+ case ERROR_READ_FAULT: -+ case ERROR_GEN_FAILURE: -+ errno = EIO; -+ break; -+ -+ default: -+ errno = EINVAL; -+ break; -+ } -+ return -1; -+ } -+} -+ -+#endif -diff -durN inetutils-1.9.4.orig/lib/stat-w32.h inetutils-1.9.4/lib/stat-w32.h ---- inetutils-1.9.4.orig/lib/stat-w32.h 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/lib/stat-w32.h 2017-05-15 17:51:32.312500000 +0800 -@@ -0,0 +1,37 @@ -+/* Core of implementation of fstat and stat for native Windows. -+ Copyright (C) 2017 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 -+ the Free Software Foundation; either version 3 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, see . */ -+ -+#ifndef _STAT_W32_H -+#define _STAT_W32_H 1 -+ -+/* Converts a FILETIME to GMT time since 1970-01-01 00:00:00. */ -+#if _GL_WINDOWS_STAT_TIMESPEC -+extern struct timespec _gl_convert_FILETIME_to_timespec (const FILETIME *ft); -+#else -+extern time_t _gl_convert_FILETIME_to_POSIX (const FILETIME *ft); -+#endif -+ -+/* Fill *BUF with information about the file designated by H. -+ PATH is the file name, if known, otherwise NULL. -+ Return 0 if successful, or -1 with errno set upon failure. */ -+extern int _gl_fstat_by_handle (HANDLE h, const char *path, struct stat *buf); -+ -+/* Bitmasks for st_mode. */ -+#define S_IREAD_UGO (_S_IREAD | (_S_IREAD >> 3) | (_S_IREAD >> 6)) -+#define S_IWRITE_UGO (_S_IWRITE | (_S_IWRITE >> 3) | (_S_IWRITE >> 6)) -+#define S_IEXEC_UGO (_S_IEXEC | (_S_IEXEC >> 3) | (_S_IEXEC >> 6)) -+ -+#endif /* _STAT_W32_H */ -diff -durN inetutils-1.9.4.orig/lib/stdalign.in.h inetutils-1.9.4/lib/stdalign.in.h ---- inetutils-1.9.4.orig/lib/stdalign.in.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/stdalign.in.h 2017-05-15 17:51:32.781250000 +0800 -@@ -1,6 +1,6 @@ - /* A substitute for ISO C11 . - -- Copyright 2011-2015 Free Software Foundation, Inc. -+ Copyright 2011-2017 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 -@@ -52,7 +52,10 @@ - #undef _Alignas - #undef _Alignof - --#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 -+/* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023 -+ . */ -+#if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \ -+ || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9))) - # ifdef __cplusplus - # if 201103 <= __cplusplus - # define _Alignof(type) alignof (type) -@@ -64,7 +67,9 @@ - # define _Alignof(type) offsetof (struct { char __a; type __b; }, __b) - # endif - #endif --#define alignof _Alignof -+#if ! (defined __cplusplus && 201103 <= __cplusplus) -+# define alignof _Alignof -+#endif - #define __alignof_is_defined 1 - - /* alignas (A), also known as _Alignas (A), aligns a variable or type -@@ -98,15 +103,18 @@ - # elif ((defined __APPLE__ && defined __MACH__ \ - ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \ - : __GNUC__) \ -- || __HP_cc || __HP_aCC || __IBMC__ || __IBMCPP__ \ -- || __ICC || 0x5110 <= __SUNPRO_C) -+ || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \ -+ || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__) - # define _Alignas(a) __attribute__ ((__aligned__ (a))) - # elif 1300 <= _MSC_VER - # define _Alignas(a) __declspec (align (a)) - # endif - #endif --#if defined _Alignas || (defined __STDC_VERSION && 201112 <= __STDC_VERSION__) -+#if ((defined _Alignas && ! (defined __cplusplus && 201103 <= __cplusplus)) \ -+ || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__)) - # define alignas _Alignas -+#endif -+#if defined alignas || (defined __cplusplus && 201103 <= __cplusplus) - # define __alignas_is_defined 1 - #endif - -diff -durN inetutils-1.9.4.orig/lib/stdarg.in.h inetutils-1.9.4/lib/stdarg.in.h ---- inetutils-1.9.4.orig/lib/stdarg.in.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/stdarg.in.h 2017-05-15 17:51:32.953125000 +0800 -@@ -1,5 +1,5 @@ - /* Substitute for and wrapper around . -- Copyright (C) 2008-2015 Free Software Foundation, Inc. -+ Copyright (C) 2008-2017 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 -diff -durN inetutils-1.9.4.orig/lib/stdbool.in.h inetutils-1.9.4/lib/stdbool.in.h ---- inetutils-1.9.4.orig/lib/stdbool.in.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/stdbool.in.h 2017-05-15 17:51:33.156250000 +0800 -@@ -1,4 +1,4 @@ --/* Copyright (C) 2001-2003, 2006-2015 Free Software Foundation, Inc. -+/* Copyright (C) 2001-2003, 2006-2017 Free Software Foundation, Inc. - Written by Bruno Haible , 2001. - - This program is free software; you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/stddef.in.h inetutils-1.9.4/lib/stddef.in.h ---- inetutils-1.9.4.orig/lib/stddef.in.h 2015-05-12 20:15:29.000000000 +0800 -+++ inetutils-1.9.4/lib/stddef.in.h 2017-05-15 17:51:33.359375000 +0800 -@@ -1,6 +1,6 @@ - /* A substitute for POSIX 2008 , for platforms that have issues. - -- Copyright (C) 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2009-2017 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 -@@ -81,8 +81,10 @@ - # define wchar_t int - #endif - --/* Some platforms lack max_align_t. */ --#if !@HAVE_MAX_ALIGN_T@ -+/* Some platforms lack max_align_t. The check for _GCC_MAX_ALIGN_T is -+ a hack in case the configure-time test was done with g++ even though -+ we are currently compiling with gcc. */ -+#if ! (@HAVE_MAX_ALIGN_T@ || defined _GCC_MAX_ALIGN_T) - /* On the x86, the maximum storage alignment of double, long, etc. is 4, - but GCC's C11 ABI for x86 says that max_align_t has an alignment of 8, - and the C11 standard allows this. Work around this problem by -diff -durN inetutils-1.9.4.orig/lib/stdint.in.h inetutils-1.9.4/lib/stdint.in.h ---- inetutils-1.9.4.orig/lib/stdint.in.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/stdint.in.h 2017-05-15 17:51:33.531250000 +0800 -@@ -1,4 +1,4 @@ --/* Copyright (C) 2001-2002, 2004-2015 Free Software Foundation, Inc. -+/* Copyright (C) 2001-2002, 2004-2017 Free Software Foundation, Inc. - Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. - This file is part of gnulib. - -@@ -79,54 +79,65 @@ - #if ! defined _@GUARD_PREFIX@_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H - #define _@GUARD_PREFIX@_STDINT_H - -+/* Get SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, INT_MIN, INT_MAX, -+ LONG_MIN, LONG_MAX, ULONG_MAX, _GL_INTEGER_WIDTH. */ -+#include -+ -+/* Override WINT_MIN and WINT_MAX if gnulib's or overrides -+ wint_t. */ -+#if @GNULIB_OVERRIDES_WINT_T@ -+# undef WINT_MIN -+# undef WINT_MAX -+# define WINT_MIN 0x0U -+# define WINT_MAX 0xffffffffU -+#endif -+ -+#if ! @HAVE_C99_STDINT_H@ -+ - /* defines some of the stdint.h types as well, on glibc, - IRIX 6.5, and OpenBSD 3.8 (via ). - AIX 5.2 isn't needed and causes troubles. - Mac OS X 10.4.6 includes (which is us), but - relies on the system definitions, so include - after @NEXT_STDINT_H@. */ --#if @HAVE_SYS_TYPES_H@ && ! defined _AIX --# include --#endif -- --/* Get SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, INT_MIN, INT_MAX, -- LONG_MIN, LONG_MAX, ULONG_MAX. */ --#include -+# if @HAVE_SYS_TYPES_H@ && ! defined _AIX -+# include -+# endif - --#if @HAVE_INTTYPES_H@ -+# if @HAVE_INTTYPES_H@ - /* In OpenBSD 3.8, includes , which defines - int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__. - also defines intptr_t and uintptr_t. */ --# include --#elif @HAVE_SYS_INTTYPES_H@ -+# include -+# elif @HAVE_SYS_INTTYPES_H@ - /* Solaris 7 has the types except the *_fast*_t types, and - the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX. */ --# include --#endif -+# include -+# endif - --#if @HAVE_SYS_BITYPES_H@ && ! defined __BIT_TYPES_DEFINED__ -+# if @HAVE_SYS_BITYPES_H@ && ! defined __BIT_TYPES_DEFINED__ - /* Linux libc4 >= 4.6.7 and libc5 have a that defines - int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is - included by . */ --# include --#endif -+# include -+# endif - --#undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H -+# undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H - - /* Minimum and maximum values for an integer type under the usual assumption. - Return an unspecified value if BITS == 0, adding a check to pacify - picky compilers. */ - --#define _STDINT_MIN(signed, bits, zero) \ -- ((signed) ? (- ((zero) + 1) << ((bits) ? (bits) - 1 : 0)) : (zero)) -+/* These are separate macros, because if you try to merge these macros into -+ a single one, HP-UX cc rejects the resulting expression in constant -+ expressions. */ -+# define _STDINT_UNSIGNED_MIN(bits, zero) \ -+ (zero) -+# define _STDINT_SIGNED_MIN(bits, zero) \ -+ (~ _STDINT_MAX (1, bits, zero)) - --#define _STDINT_MAX(signed, bits, zero) \ -- ((signed) \ -- ? ~ _STDINT_MIN (signed, bits, zero) \ -- : /* The expression for the unsigned case. The subtraction of (signed) \ -- is a nop in the unsigned case and avoids "signed integer overflow" \ -- warnings in the signed case. */ \ -- ((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1) -+# define _STDINT_MAX(signed, bits, zero) \ -+ (((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1) - - #if !GNULIB_defined_stdint_types - -@@ -135,26 +146,26 @@ - /* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. */ - --#undef int8_t --#undef uint8_t -+# undef int8_t -+# undef uint8_t - typedef signed char gl_int8_t; - typedef unsigned char gl_uint8_t; --#define int8_t gl_int8_t --#define uint8_t gl_uint8_t -+# define int8_t gl_int8_t -+# define uint8_t gl_uint8_t - --#undef int16_t --#undef uint16_t -+# undef int16_t -+# undef uint16_t - typedef short int gl_int16_t; - typedef unsigned short int gl_uint16_t; --#define int16_t gl_int16_t --#define uint16_t gl_uint16_t -+# define int16_t gl_int16_t -+# define uint16_t gl_uint16_t - --#undef int32_t --#undef uint32_t -+# undef int32_t -+# undef uint32_t - typedef int gl_int32_t; - typedef unsigned int gl_uint32_t; --#define int32_t gl_int32_t --#define uint32_t gl_uint32_t -+# define int32_t gl_int32_t -+# define uint32_t gl_uint32_t - - /* If the system defines INT64_MAX, assume int64_t works. That way, - if the underlying platform defines int64_t to be a 64-bit long long -@@ -162,54 +173,54 @@ - int, which would mess up C++ name mangling. We must use #ifdef - rather than #if, to avoid an error with HP-UX 10.20 cc. */ - --#ifdef INT64_MAX --# define GL_INT64_T --#else -+# ifdef INT64_MAX -+# define GL_INT64_T -+# else - /* Do not undefine int64_t if gnulib is not being used with 64-bit - types, since otherwise it breaks platforms like Tandem/NSK. */ --# if LONG_MAX >> 31 >> 31 == 1 --# undef int64_t -+# if LONG_MAX >> 31 >> 31 == 1 -+# undef int64_t - typedef long int gl_int64_t; --# define int64_t gl_int64_t --# define GL_INT64_T --# elif defined _MSC_VER --# undef int64_t -+# define int64_t gl_int64_t -+# define GL_INT64_T -+# elif defined _MSC_VER -+# undef int64_t - typedef __int64 gl_int64_t; --# define int64_t gl_int64_t --# define GL_INT64_T --# elif @HAVE_LONG_LONG_INT@ --# undef int64_t -+# define int64_t gl_int64_t -+# define GL_INT64_T -+# elif @HAVE_LONG_LONG_INT@ -+# undef int64_t - typedef long long int gl_int64_t; --# define int64_t gl_int64_t --# define GL_INT64_T -+# define int64_t gl_int64_t -+# define GL_INT64_T -+# endif - # endif --#endif - --#ifdef UINT64_MAX --# define GL_UINT64_T --#else --# if ULONG_MAX >> 31 >> 31 >> 1 == 1 --# undef uint64_t --typedef unsigned long int gl_uint64_t; --# define uint64_t gl_uint64_t -+# ifdef UINT64_MAX - # define GL_UINT64_T --# elif defined _MSC_VER --# undef uint64_t -+# else -+# if ULONG_MAX >> 31 >> 31 >> 1 == 1 -+# undef uint64_t -+typedef unsigned long int gl_uint64_t; -+# define uint64_t gl_uint64_t -+# define GL_UINT64_T -+# elif defined _MSC_VER -+# undef uint64_t - typedef unsigned __int64 gl_uint64_t; --# define uint64_t gl_uint64_t --# define GL_UINT64_T --# elif @HAVE_UNSIGNED_LONG_LONG_INT@ --# undef uint64_t -+# define uint64_t gl_uint64_t -+# define GL_UINT64_T -+# elif @HAVE_UNSIGNED_LONG_LONG_INT@ -+# undef uint64_t - typedef unsigned long long int gl_uint64_t; --# define uint64_t gl_uint64_t --# define GL_UINT64_T -+# define uint64_t gl_uint64_t -+# define GL_UINT64_T -+# endif - # endif --#endif - - /* Avoid collision with Solaris 2.5.1 etc. */ --#define _UINT8_T --#define _UINT32_T --#define _UINT64_T -+# define _UINT8_T -+# define _UINT32_T -+# define _UINT64_T - - - /* 7.18.1.2. Minimum-width integer types */ -@@ -218,26 +229,26 @@ - types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types - are the same as the corresponding N_t types. */ - --#undef int_least8_t --#undef uint_least8_t --#undef int_least16_t --#undef uint_least16_t --#undef int_least32_t --#undef uint_least32_t --#undef int_least64_t --#undef uint_least64_t --#define int_least8_t int8_t --#define uint_least8_t uint8_t --#define int_least16_t int16_t --#define uint_least16_t uint16_t --#define int_least32_t int32_t --#define uint_least32_t uint32_t --#ifdef GL_INT64_T --# define int_least64_t int64_t --#endif --#ifdef GL_UINT64_T --# define uint_least64_t uint64_t --#endif -+# undef int_least8_t -+# undef uint_least8_t -+# undef int_least16_t -+# undef uint_least16_t -+# undef int_least32_t -+# undef uint_least32_t -+# undef int_least64_t -+# undef uint_least64_t -+# define int_least8_t int8_t -+# define uint_least8_t uint8_t -+# define int_least16_t int16_t -+# define uint_least16_t uint16_t -+# define int_least32_t int32_t -+# define uint_least32_t uint32_t -+# ifdef GL_INT64_T -+# define int_least64_t int64_t -+# endif -+# ifdef GL_UINT64_T -+# define uint_least64_t uint64_t -+# endif - - /* 7.18.1.3. Fastest minimum-width integer types */ - -@@ -250,50 +261,55 @@ - uses types consistent with glibc, as that lessens the chance of - incompatibility with older GNU hosts. */ - --#undef int_fast8_t --#undef uint_fast8_t --#undef int_fast16_t --#undef uint_fast16_t --#undef int_fast32_t --#undef uint_fast32_t --#undef int_fast64_t --#undef uint_fast64_t -+# undef int_fast8_t -+# undef uint_fast8_t -+# undef int_fast16_t -+# undef uint_fast16_t -+# undef int_fast32_t -+# undef uint_fast32_t -+# undef int_fast64_t -+# undef uint_fast64_t - typedef signed char gl_int_fast8_t; - typedef unsigned char gl_uint_fast8_t; - --#ifdef __sun -+# ifdef __sun - /* Define types compatible with SunOS 5.10, so that code compiled under - earlier SunOS versions works with code compiled under SunOS 5.10. */ - typedef int gl_int_fast32_t; - typedef unsigned int gl_uint_fast32_t; --#else -+# else - typedef long int gl_int_fast32_t; - typedef unsigned long int gl_uint_fast32_t; --#endif -+# endif - typedef gl_int_fast32_t gl_int_fast16_t; - typedef gl_uint_fast32_t gl_uint_fast16_t; - --#define int_fast8_t gl_int_fast8_t --#define uint_fast8_t gl_uint_fast8_t --#define int_fast16_t gl_int_fast16_t --#define uint_fast16_t gl_uint_fast16_t --#define int_fast32_t gl_int_fast32_t --#define uint_fast32_t gl_uint_fast32_t --#ifdef GL_INT64_T --# define int_fast64_t int64_t --#endif --#ifdef GL_UINT64_T --# define uint_fast64_t uint64_t --#endif -+# define int_fast8_t gl_int_fast8_t -+# define uint_fast8_t gl_uint_fast8_t -+# define int_fast16_t gl_int_fast16_t -+# define uint_fast16_t gl_uint_fast16_t -+# define int_fast32_t gl_int_fast32_t -+# define uint_fast32_t gl_uint_fast32_t -+# ifdef GL_INT64_T -+# define int_fast64_t int64_t -+# endif -+# ifdef GL_UINT64_T -+# define uint_fast64_t uint64_t -+# endif - - /* 7.18.1.4. Integer types capable of holding object pointers */ - --#undef intptr_t --#undef uintptr_t -+/* kLIBC's stdint.h defines _INTPTR_T_DECLARED and needs its own -+ definitions of intptr_t and uintptr_t (which use int and unsigned) -+ to avoid clashes with declarations of system functions like sbrk. */ -+# ifndef _INTPTR_T_DECLARED -+# undef intptr_t -+# undef uintptr_t - typedef long int gl_intptr_t; - typedef unsigned long int gl_uintptr_t; --#define intptr_t gl_intptr_t --#define uintptr_t gl_uintptr_t -+# define intptr_t gl_intptr_t -+# define uintptr_t gl_uintptr_t -+# endif - - /* 7.18.1.5. Greatest-width integer types */ - -@@ -304,33 +320,33 @@ - similarly for UINTMAX_MAX and uintmax_t. This avoids problems with - assuming one type where another is used by the system. */ - --#ifndef INTMAX_MAX --# undef INTMAX_C --# undef intmax_t --# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 -+# ifndef INTMAX_MAX -+# undef INTMAX_C -+# undef intmax_t -+# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 - typedef long long int gl_intmax_t; --# define intmax_t gl_intmax_t --# elif defined GL_INT64_T --# define intmax_t int64_t --# else -+# define intmax_t gl_intmax_t -+# elif defined GL_INT64_T -+# define intmax_t int64_t -+# else - typedef long int gl_intmax_t; --# define intmax_t gl_intmax_t -+# define intmax_t gl_intmax_t -+# endif - # endif --#endif - --#ifndef UINTMAX_MAX --# undef UINTMAX_C --# undef uintmax_t --# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 -+# ifndef UINTMAX_MAX -+# undef UINTMAX_C -+# undef uintmax_t -+# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 - typedef unsigned long long int gl_uintmax_t; --# define uintmax_t gl_uintmax_t --# elif defined GL_UINT64_T --# define uintmax_t uint64_t --# else -+# define uintmax_t gl_uintmax_t -+# elif defined GL_UINT64_T -+# define uintmax_t uint64_t -+# else - typedef unsigned long int gl_uintmax_t; --# define uintmax_t gl_uintmax_t -+# define uintmax_t gl_uintmax_t -+# endif - # endif --#endif - - /* Verify that intmax_t and uintmax_t have the same size. Too much code - breaks if this is not the case. If this check fails, the reason is likely -@@ -338,8 +354,8 @@ - typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) - ? 1 : -1]; - --#define GNULIB_defined_stdint_types 1 --#endif /* !GNULIB_defined_stdint_types */ -+# define GNULIB_defined_stdint_types 1 -+# endif /* !GNULIB_defined_stdint_types */ - - /* 7.18.2. Limits of specified-width integer types */ - -@@ -348,37 +364,37 @@ - /* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. */ - --#undef INT8_MIN --#undef INT8_MAX --#undef UINT8_MAX --#define INT8_MIN (~ INT8_MAX) --#define INT8_MAX 127 --#define UINT8_MAX 255 -+# undef INT8_MIN -+# undef INT8_MAX -+# undef UINT8_MAX -+# define INT8_MIN (~ INT8_MAX) -+# define INT8_MAX 127 -+# define UINT8_MAX 255 - --#undef INT16_MIN --#undef INT16_MAX --#undef UINT16_MAX --#define INT16_MIN (~ INT16_MAX) --#define INT16_MAX 32767 --#define UINT16_MAX 65535 -+# undef INT16_MIN -+# undef INT16_MAX -+# undef UINT16_MAX -+# define INT16_MIN (~ INT16_MAX) -+# define INT16_MAX 32767 -+# define UINT16_MAX 65535 - --#undef INT32_MIN --#undef INT32_MAX --#undef UINT32_MAX --#define INT32_MIN (~ INT32_MAX) --#define INT32_MAX 2147483647 --#define UINT32_MAX 4294967295U -+# undef INT32_MIN -+# undef INT32_MAX -+# undef UINT32_MAX -+# define INT32_MIN (~ INT32_MAX) -+# define INT32_MAX 2147483647 -+# define UINT32_MAX 4294967295U - --#if defined GL_INT64_T && ! defined INT64_MAX -+# if defined GL_INT64_T && ! defined INT64_MAX - /* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0 - evaluates the latter incorrectly in preprocessor expressions. */ --# define INT64_MIN (- INTMAX_C (1) << 63) --# define INT64_MAX INTMAX_C (9223372036854775807) --#endif -+# define INT64_MIN (- INTMAX_C (1) << 63) -+# define INT64_MAX INTMAX_C (9223372036854775807) -+# endif - --#if defined GL_UINT64_T && ! defined UINT64_MAX --# define UINT64_MAX UINTMAX_C (18446744073709551615) --#endif -+# if defined GL_UINT64_T && ! defined UINT64_MAX -+# define UINT64_MAX UINTMAX_C (18446744073709551615) -+# endif - - /* 7.18.2.2. Limits of minimum-width integer types */ - -@@ -386,38 +402,38 @@ - types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types - are the same as the corresponding N_t types. */ - --#undef INT_LEAST8_MIN --#undef INT_LEAST8_MAX --#undef UINT_LEAST8_MAX --#define INT_LEAST8_MIN INT8_MIN --#define INT_LEAST8_MAX INT8_MAX --#define UINT_LEAST8_MAX UINT8_MAX -+# undef INT_LEAST8_MIN -+# undef INT_LEAST8_MAX -+# undef UINT_LEAST8_MAX -+# define INT_LEAST8_MIN INT8_MIN -+# define INT_LEAST8_MAX INT8_MAX -+# define UINT_LEAST8_MAX UINT8_MAX - --#undef INT_LEAST16_MIN --#undef INT_LEAST16_MAX --#undef UINT_LEAST16_MAX --#define INT_LEAST16_MIN INT16_MIN --#define INT_LEAST16_MAX INT16_MAX --#define UINT_LEAST16_MAX UINT16_MAX -+# undef INT_LEAST16_MIN -+# undef INT_LEAST16_MAX -+# undef UINT_LEAST16_MAX -+# define INT_LEAST16_MIN INT16_MIN -+# define INT_LEAST16_MAX INT16_MAX -+# define UINT_LEAST16_MAX UINT16_MAX - --#undef INT_LEAST32_MIN --#undef INT_LEAST32_MAX --#undef UINT_LEAST32_MAX --#define INT_LEAST32_MIN INT32_MIN --#define INT_LEAST32_MAX INT32_MAX --#define UINT_LEAST32_MAX UINT32_MAX -+# undef INT_LEAST32_MIN -+# undef INT_LEAST32_MAX -+# undef UINT_LEAST32_MAX -+# define INT_LEAST32_MIN INT32_MIN -+# define INT_LEAST32_MAX INT32_MAX -+# define UINT_LEAST32_MAX UINT32_MAX - --#undef INT_LEAST64_MIN --#undef INT_LEAST64_MAX --#ifdef GL_INT64_T --# define INT_LEAST64_MIN INT64_MIN --# define INT_LEAST64_MAX INT64_MAX --#endif -+# undef INT_LEAST64_MIN -+# undef INT_LEAST64_MAX -+# ifdef GL_INT64_T -+# define INT_LEAST64_MIN INT64_MIN -+# define INT_LEAST64_MAX INT64_MAX -+# endif - --#undef UINT_LEAST64_MAX --#ifdef GL_UINT64_T --# define UINT_LEAST64_MAX UINT64_MAX --#endif -+# undef UINT_LEAST64_MAX -+# ifdef GL_UINT64_T -+# define UINT_LEAST64_MAX UINT64_MAX -+# endif - - /* 7.18.2.3. Limits of fastest minimum-width integer types */ - -@@ -425,117 +441,121 @@ - types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types - are taken from the same list of types. */ - --#undef INT_FAST8_MIN --#undef INT_FAST8_MAX --#undef UINT_FAST8_MAX --#define INT_FAST8_MIN SCHAR_MIN --#define INT_FAST8_MAX SCHAR_MAX --#define UINT_FAST8_MAX UCHAR_MAX -+# undef INT_FAST8_MIN -+# undef INT_FAST8_MAX -+# undef UINT_FAST8_MAX -+# define INT_FAST8_MIN SCHAR_MIN -+# define INT_FAST8_MAX SCHAR_MAX -+# define UINT_FAST8_MAX UCHAR_MAX - --#undef INT_FAST16_MIN --#undef INT_FAST16_MAX --#undef UINT_FAST16_MAX --#define INT_FAST16_MIN INT_FAST32_MIN --#define INT_FAST16_MAX INT_FAST32_MAX --#define UINT_FAST16_MAX UINT_FAST32_MAX -+# undef INT_FAST16_MIN -+# undef INT_FAST16_MAX -+# undef UINT_FAST16_MAX -+# define INT_FAST16_MIN INT_FAST32_MIN -+# define INT_FAST16_MAX INT_FAST32_MAX -+# define UINT_FAST16_MAX UINT_FAST32_MAX - --#undef INT_FAST32_MIN --#undef INT_FAST32_MAX --#undef UINT_FAST32_MAX --#ifdef __sun --# define INT_FAST32_MIN INT_MIN --# define INT_FAST32_MAX INT_MAX --# define UINT_FAST32_MAX UINT_MAX --#else --# define INT_FAST32_MIN LONG_MIN --# define INT_FAST32_MAX LONG_MAX --# define UINT_FAST32_MAX ULONG_MAX --#endif -+# undef INT_FAST32_MIN -+# undef INT_FAST32_MAX -+# undef UINT_FAST32_MAX -+# ifdef __sun -+# define INT_FAST32_MIN INT_MIN -+# define INT_FAST32_MAX INT_MAX -+# define UINT_FAST32_MAX UINT_MAX -+# else -+# define INT_FAST32_MIN LONG_MIN -+# define INT_FAST32_MAX LONG_MAX -+# define UINT_FAST32_MAX ULONG_MAX -+# endif - --#undef INT_FAST64_MIN --#undef INT_FAST64_MAX --#ifdef GL_INT64_T --# define INT_FAST64_MIN INT64_MIN --# define INT_FAST64_MAX INT64_MAX --#endif -+# undef INT_FAST64_MIN -+# undef INT_FAST64_MAX -+# ifdef GL_INT64_T -+# define INT_FAST64_MIN INT64_MIN -+# define INT_FAST64_MAX INT64_MAX -+# endif - --#undef UINT_FAST64_MAX --#ifdef GL_UINT64_T --# define UINT_FAST64_MAX UINT64_MAX --#endif -+# undef UINT_FAST64_MAX -+# ifdef GL_UINT64_T -+# define UINT_FAST64_MAX UINT64_MAX -+# endif - - /* 7.18.2.4. Limits of integer types capable of holding object pointers */ - --#undef INTPTR_MIN --#undef INTPTR_MAX --#undef UINTPTR_MAX --#define INTPTR_MIN LONG_MIN --#define INTPTR_MAX LONG_MAX --#define UINTPTR_MAX ULONG_MAX -+# undef INTPTR_MIN -+# undef INTPTR_MAX -+# undef UINTPTR_MAX -+# define INTPTR_MIN LONG_MIN -+# define INTPTR_MAX LONG_MAX -+# define UINTPTR_MAX ULONG_MAX - - /* 7.18.2.5. Limits of greatest-width integer types */ - --#ifndef INTMAX_MAX --# undef INTMAX_MIN --# ifdef INT64_MAX --# define INTMAX_MIN INT64_MIN --# define INTMAX_MAX INT64_MAX --# else --# define INTMAX_MIN INT32_MIN --# define INTMAX_MAX INT32_MAX -+# ifndef INTMAX_MAX -+# undef INTMAX_MIN -+# ifdef INT64_MAX -+# define INTMAX_MIN INT64_MIN -+# define INTMAX_MAX INT64_MAX -+# else -+# define INTMAX_MIN INT32_MIN -+# define INTMAX_MAX INT32_MAX -+# endif - # endif --#endif - --#ifndef UINTMAX_MAX --# ifdef UINT64_MAX --# define UINTMAX_MAX UINT64_MAX --# else --# define UINTMAX_MAX UINT32_MAX -+# ifndef UINTMAX_MAX -+# ifdef UINT64_MAX -+# define UINTMAX_MAX UINT64_MAX -+# else -+# define UINTMAX_MAX UINT32_MAX -+# endif - # endif --#endif - - /* 7.18.3. Limits of other integer types */ - - /* ptrdiff_t limits */ --#undef PTRDIFF_MIN --#undef PTRDIFF_MAX --#if @APPLE_UNIVERSAL_BUILD@ --# ifdef _LP64 --# define PTRDIFF_MIN _STDINT_MIN (1, 64, 0l) --# define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l) -+# undef PTRDIFF_MIN -+# undef PTRDIFF_MAX -+# if @APPLE_UNIVERSAL_BUILD@ -+# ifdef _LP64 -+# define PTRDIFF_MIN _STDINT_SIGNED_MIN (64, 0l) -+# define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l) -+# else -+# define PTRDIFF_MIN _STDINT_SIGNED_MIN (32, 0) -+# define PTRDIFF_MAX _STDINT_MAX (1, 32, 0) -+# endif - # else --# define PTRDIFF_MIN _STDINT_MIN (1, 32, 0) --# define PTRDIFF_MAX _STDINT_MAX (1, 32, 0) --# endif --#else --# define PTRDIFF_MIN \ -- _STDINT_MIN (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) --# define PTRDIFF_MAX \ -+# define PTRDIFF_MIN \ -+ _STDINT_SIGNED_MIN (@BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) -+# define PTRDIFF_MAX \ - _STDINT_MAX (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) --#endif -+# endif - - /* sig_atomic_t limits */ --#undef SIG_ATOMIC_MIN --#undef SIG_ATOMIC_MAX --#define SIG_ATOMIC_MIN \ -- _STDINT_MIN (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \ -- 0@SIG_ATOMIC_T_SUFFIX@) --#define SIG_ATOMIC_MAX \ -+# undef SIG_ATOMIC_MIN -+# undef SIG_ATOMIC_MAX -+# if @HAVE_SIGNED_SIG_ATOMIC_T@ -+# define SIG_ATOMIC_MIN \ -+ _STDINT_SIGNED_MIN (@BITSIZEOF_SIG_ATOMIC_T@, 0@SIG_ATOMIC_T_SUFFIX@) -+# else -+# define SIG_ATOMIC_MIN \ -+ _STDINT_UNSIGNED_MIN (@BITSIZEOF_SIG_ATOMIC_T@, 0@SIG_ATOMIC_T_SUFFIX@) -+# endif -+# define SIG_ATOMIC_MAX \ - _STDINT_MAX (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \ - 0@SIG_ATOMIC_T_SUFFIX@) - - - /* size_t limit */ --#undef SIZE_MAX --#if @APPLE_UNIVERSAL_BUILD@ --# ifdef _LP64 --# define SIZE_MAX _STDINT_MAX (0, 64, 0ul) -+# undef SIZE_MAX -+# if @APPLE_UNIVERSAL_BUILD@ -+# ifdef _LP64 -+# define SIZE_MAX _STDINT_MAX (0, 64, 0ul) -+# else -+# define SIZE_MAX _STDINT_MAX (0, 32, 0ul) -+# endif - # else --# define SIZE_MAX _STDINT_MAX (0, 32, 0ul) -+# define SIZE_MAX _STDINT_MAX (0, @BITSIZEOF_SIZE_T@, 0@SIZE_T_SUFFIX@) - # endif --#else --# define SIZE_MAX _STDINT_MAX (0, @BITSIZEOF_SIZE_T@, 0@SIZE_T_SUFFIX@) --#endif - - /* wchar_t limits */ - /* Get WCHAR_MIN, WCHAR_MAX. -@@ -543,29 +563,39 @@ - sequence of nested includes - -> -> -> , and the latter includes - and assumes its types are already defined. */ --#if @HAVE_WCHAR_H@ && ! (defined WCHAR_MIN && defined WCHAR_MAX) -+# if @HAVE_WCHAR_H@ && ! (defined WCHAR_MIN && defined WCHAR_MAX) - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ --# include --# include --# include --# define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H --# include --# undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H --#endif --#undef WCHAR_MIN --#undef WCHAR_MAX --#define WCHAR_MIN \ -- _STDINT_MIN (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) --#define WCHAR_MAX \ -+# include -+# include -+# include -+# define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H -+# include -+# undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H -+# endif -+# undef WCHAR_MIN -+# undef WCHAR_MAX -+# if @HAVE_SIGNED_WCHAR_T@ -+# define WCHAR_MIN \ -+ _STDINT_SIGNED_MIN (@BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) -+# else -+# define WCHAR_MIN \ -+ _STDINT_UNSIGNED_MIN (@BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) -+# endif -+# define WCHAR_MAX \ - _STDINT_MAX (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) - - /* wint_t limits */ --#undef WINT_MIN --#undef WINT_MAX --#define WINT_MIN \ -- _STDINT_MIN (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) --#define WINT_MAX \ -+# undef WINT_MIN -+# undef WINT_MAX -+# if @HAVE_SIGNED_WINT_T@ -+# define WINT_MIN \ -+ _STDINT_SIGNED_MIN (@BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) -+# else -+# define WINT_MIN \ -+ _STDINT_UNSIGNED_MIN (@BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) -+# endif -+# define WINT_MAX \ - _STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) - - /* 7.18.4. Macros for integer constants */ -@@ -576,59 +606,120 @@ - /* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits, and int is 32 bits. */ - --#undef INT8_C --#undef UINT8_C --#define INT8_C(x) x --#define UINT8_C(x) x -+# undef INT8_C -+# undef UINT8_C -+# define INT8_C(x) x -+# define UINT8_C(x) x - --#undef INT16_C --#undef UINT16_C --#define INT16_C(x) x --#define UINT16_C(x) x -+# undef INT16_C -+# undef UINT16_C -+# define INT16_C(x) x -+# define UINT16_C(x) x - --#undef INT32_C --#undef UINT32_C --#define INT32_C(x) x --#define UINT32_C(x) x ## U -+# undef INT32_C -+# undef UINT32_C -+# define INT32_C(x) x -+# define UINT32_C(x) x ## U - --#undef INT64_C --#undef UINT64_C --#if LONG_MAX >> 31 >> 31 == 1 --# define INT64_C(x) x##L --#elif defined _MSC_VER --# define INT64_C(x) x##i64 --#elif @HAVE_LONG_LONG_INT@ --# define INT64_C(x) x##LL --#endif --#if ULONG_MAX >> 31 >> 31 >> 1 == 1 --# define UINT64_C(x) x##UL --#elif defined _MSC_VER --# define UINT64_C(x) x##ui64 --#elif @HAVE_UNSIGNED_LONG_LONG_INT@ --# define UINT64_C(x) x##ULL --#endif -+# undef INT64_C -+# undef UINT64_C -+# if LONG_MAX >> 31 >> 31 == 1 -+# define INT64_C(x) x##L -+# elif defined _MSC_VER -+# define INT64_C(x) x##i64 -+# elif @HAVE_LONG_LONG_INT@ -+# define INT64_C(x) x##LL -+# endif -+# if ULONG_MAX >> 31 >> 31 >> 1 == 1 -+# define UINT64_C(x) x##UL -+# elif defined _MSC_VER -+# define UINT64_C(x) x##ui64 -+# elif @HAVE_UNSIGNED_LONG_LONG_INT@ -+# define UINT64_C(x) x##ULL -+# endif - - /* 7.18.4.2. Macros for greatest-width integer constants */ - --#ifndef INTMAX_C --# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 --# define INTMAX_C(x) x##LL --# elif defined GL_INT64_T --# define INTMAX_C(x) INT64_C(x) --# else --# define INTMAX_C(x) x##L -+# ifndef INTMAX_C -+# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 -+# define INTMAX_C(x) x##LL -+# elif defined GL_INT64_T -+# define INTMAX_C(x) INT64_C(x) -+# else -+# define INTMAX_C(x) x##L -+# endif - # endif --#endif - --#ifndef UINTMAX_C --# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 --# define UINTMAX_C(x) x##ULL --# elif defined GL_UINT64_T --# define UINTMAX_C(x) UINT64_C(x) --# else --# define UINTMAX_C(x) x##UL -+# ifndef UINTMAX_C -+# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 -+# define UINTMAX_C(x) x##ULL -+# elif defined GL_UINT64_T -+# define UINTMAX_C(x) UINT64_C(x) -+# else -+# define UINTMAX_C(x) x##UL -+# endif - # endif --#endif -+ -+#endif /* !@HAVE_C99_STDINT_H@ */ -+ -+/* Macros specified by ISO/IEC TS 18661-1:2014. */ -+ -+#if (!defined UINTMAX_WIDTH \ -+ && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__)) -+# ifdef INT8_MAX -+# define INT8_WIDTH _GL_INTEGER_WIDTH (INT8_MIN, INT8_MAX) -+# endif -+# ifdef UINT8_MAX -+# define UINT8_WIDTH _GL_INTEGER_WIDTH (0, UINT8_MAX) -+# endif -+# ifdef INT16_MAX -+# define INT16_WIDTH _GL_INTEGER_WIDTH (INT16_MIN, INT16_MAX) -+# endif -+# ifdef UINT16_MAX -+# define UINT16_WIDTH _GL_INTEGER_WIDTH (0, UINT16_MAX) -+# endif -+# ifdef INT32_MAX -+# define INT32_WIDTH _GL_INTEGER_WIDTH (INT32_MIN, INT32_MAX) -+# endif -+# ifdef UINT32_MAX -+# define UINT32_WIDTH _GL_INTEGER_WIDTH (0, UINT32_MAX) -+# endif -+# ifdef INT64_MAX -+# define INT64_WIDTH _GL_INTEGER_WIDTH (INT64_MIN, INT64_MAX) -+# endif -+# ifdef UINT64_MAX -+# define UINT64_WIDTH _GL_INTEGER_WIDTH (0, UINT64_MAX) -+# endif -+# define INT_LEAST8_WIDTH _GL_INTEGER_WIDTH (INT_LEAST8_MIN, INT_LEAST8_MAX) -+# define UINT_LEAST8_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST8_MAX) -+# define INT_LEAST16_WIDTH _GL_INTEGER_WIDTH (INT_LEAST16_MIN, INT_LEAST16_MAX) -+# define UINT_LEAST16_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST16_MAX) -+# define INT_LEAST32_WIDTH _GL_INTEGER_WIDTH (INT_LEAST32_MIN, INT_LEAST32_MAX) -+# define UINT_LEAST32_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST32_MAX) -+# define INT_LEAST64_WIDTH _GL_INTEGER_WIDTH (INT_LEAST64_MIN, INT_LEAST64_MAX) -+# define UINT_LEAST64_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST64_MAX) -+# define INT_FAST8_WIDTH _GL_INTEGER_WIDTH (INT_FAST8_MIN, INT_FAST8_MAX) -+# define UINT_FAST8_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST8_MAX) -+# define INT_FAST16_WIDTH _GL_INTEGER_WIDTH (INT_FAST16_MIN, INT_FAST16_MAX) -+# define UINT_FAST16_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST16_MAX) -+# define INT_FAST32_WIDTH _GL_INTEGER_WIDTH (INT_FAST32_MIN, INT_FAST32_MAX) -+# define UINT_FAST32_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST32_MAX) -+# define INT_FAST64_WIDTH _GL_INTEGER_WIDTH (INT_FAST64_MIN, INT_FAST64_MAX) -+# define UINT_FAST64_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST64_MAX) -+# define INTPTR_WIDTH _GL_INTEGER_WIDTH (INTPTR_MIN, INTPTR_MAX) -+# define UINTPTR_WIDTH _GL_INTEGER_WIDTH (0, UINTPTR_MAX) -+# define INTMAX_WIDTH _GL_INTEGER_WIDTH (INTMAX_MIN, INTMAX_MAX) -+# define UINTMAX_WIDTH _GL_INTEGER_WIDTH (0, UINTMAX_MAX) -+# define PTRDIFF_WIDTH _GL_INTEGER_WIDTH (PTRDIFF_MIN, PTRDIFF_MAX) -+# define SIZE_WIDTH _GL_INTEGER_WIDTH (0, SIZE_MAX) -+# define WCHAR_WIDTH _GL_INTEGER_WIDTH (WCHAR_MIN, WCHAR_MAX) -+# ifdef WINT_MAX -+# define WINT_WIDTH _GL_INTEGER_WIDTH (WINT_MIN, WINT_MAX) -+# endif -+# ifdef SIG_ATOMIC_MAX -+# define SIG_ATOMIC_WIDTH _GL_INTEGER_WIDTH (SIG_ATOMIC_MIN, SIG_ATOMIC_MAX) -+# endif -+#endif /* !WINT_WIDTH && (_GNU_SOURCE || __STDC_WANT_IEC_60559_BFP_EXT__) */ - - #endif /* _@GUARD_PREFIX@_STDINT_H */ - #endif /* !(defined __ANDROID__ && ...) */ -diff -durN inetutils-1.9.4.orig/lib/stdio--.h inetutils-1.9.4/lib/stdio--.h ---- inetutils-1.9.4.orig/lib/stdio--.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/stdio--.h 2017-05-15 17:51:33.671875000 +0800 -@@ -1,6 +1,6 @@ - /* Like stdio.h, but redefine some names to avoid glitches. - -- Copyright (C) 2005-2006, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2005-2006, 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/stdio.in.h inetutils-1.9.4/lib/stdio.in.h ---- inetutils-1.9.4.orig/lib/stdio.in.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/stdio.in.h 2017-05-15 17:51:34.203125000 +0800 -@@ -1,6 +1,6 @@ - /* A GNU-like . - -- Copyright (C) 2004, 2007-2015 Free Software Foundation, Inc. -+ Copyright (C) 2004, 2007-2017 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 -@@ -118,6 +118,26 @@ - # include - #endif - -+/* MSVC declares 'perror' in , not in . We must include -+ it before we #define perror rpl_perror. */ -+/* But in any case avoid namespace pollution on glibc systems. */ -+#if (@GNULIB_PERROR@ || defined GNULIB_POSIXCHECK) \ -+ && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \ -+ && ! defined __GLIBC__ -+# include -+#endif -+ -+/* MSVC declares 'remove' in , not in . We must include -+ it before we #define remove rpl_remove. */ -+/* MSVC declares 'rename' in , not in . We must include -+ it before we #define rename rpl_rename. */ -+/* But in any case avoid namespace pollution on glibc systems. */ -+#if (@GNULIB_REMOVE@ || @GNULIB_RENAME@ || defined GNULIB_POSIXCHECK) \ -+ && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \ -+ && ! defined __GLIBC__ -+# include -+#endif -+ - - /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -@@ -723,11 +743,10 @@ - so any use of gets warrants an unconditional warning; besides, C11 - removed it. */ - #undef gets --#if HAVE_RAW_DECL_GETS -+#if HAVE_RAW_DECL_GETS && !defined __cplusplus - _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); - #endif - -- - #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@ - struct obstack; - /* Grow an obstack with formatted output. Return the number of -diff -durN inetutils-1.9.4.orig/lib/stdio-impl.h inetutils-1.9.4/lib/stdio-impl.h ---- inetutils-1.9.4.orig/lib/stdio-impl.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/stdio-impl.h 2017-05-15 17:51:33.843750000 +0800 -@@ -1,5 +1,5 @@ - /* Implementation details of FILE streams. -- Copyright (C) 2007-2008, 2010-2015 Free Software Foundation, Inc. -+ Copyright (C) 2007-2008, 2010-2017 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 -@@ -29,7 +29,7 @@ - #include /* For detecting Plan9. */ - - #if defined __sferror || defined __DragonFly__ || defined __ANDROID__ -- /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */ -+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ - - # if defined __DragonFly__ /* DragonFly */ - /* See . */ -@@ -58,7 +58,7 @@ - # define fp_ fp - # endif - --# if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ || defined __ANDROID__ /* NetBSD >= 1.5ZA, OpenBSD, Android */ -+# if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ || defined __minix || defined __ANDROID__ /* NetBSD >= 1.5ZA, OpenBSD, Minix 3, Android */ - /* See - and */ - struct __sfileext -@@ -110,4 +110,31 @@ - # define _flag __flag - # endif - -+#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* newer Windows with MSVC */ -+ -+/* does not define the innards of FILE any more. */ -+# define WINDOWS_OPAQUE_FILE -+ -+struct _gl_real_FILE -+{ -+ /* Note: Compared to older Windows and to mingw, it has the fields -+ _base and _cnt swapped. */ -+ unsigned char *_ptr; -+ unsigned char *_base; -+ int _cnt; -+ int _flag; -+ int _file; -+ int _charbuf; -+ int _bufsiz; -+}; -+# define fp_ ((struct _gl_real_FILE *) fp) -+ -+/* These values were determined by a program similar to the one at -+ . */ -+# define _IOREAD 0x1 -+# define _IOWRT 0x2 -+# define _IORW 0x4 -+# define _IOEOF 0x8 -+# define _IOERR 0x10 -+ - #endif -diff -durN inetutils-1.9.4.orig/lib/stdio-safer.h inetutils-1.9.4/lib/stdio-safer.h ---- inetutils-1.9.4.orig/lib/stdio-safer.h 2015-03-31 15:08:16.000000000 +0800 -+++ inetutils-1.9.4/lib/stdio-safer.h 2017-05-15 17:51:34.046875000 +0800 -@@ -1,6 +1,6 @@ - /* Invoke stdio functions, but avoid some glitches. - -- Copyright (C) 2001, 2003, 2006, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2001, 2003, 2006, 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/stdlib.in.h inetutils-1.9.4/lib/stdlib.in.h ---- inetutils-1.9.4.orig/lib/stdlib.in.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/stdlib.in.h 2017-05-15 17:51:34.343750000 +0800 -@@ -1,6 +1,6 @@ - /* A GNU-like . - -- Copyright (C) 1995, 2001-2004, 2006-2015 Free Software Foundation, Inc. -+ Copyright (C) 1995, 2001-2004, 2006-2017 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 -@@ -521,6 +521,9 @@ - #endif - - #if @GNULIB_QSORT_R@ -+/* Sort an array of NMEMB elements, starting at address BASE, each element -+ occupying SIZE bytes, in ascending order according to the comparison -+ function COMPARE. */ - # if @REPLACE_QSORT_R@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef qsort_r -@@ -535,12 +538,24 @@ - void *), - void *arg)); - # else -+# if !@HAVE_QSORT_R@ -+_GL_FUNCDECL_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size, -+ int (*compare) (void const *, void const *, -+ void *), -+ void *arg) _GL_ARG_NONNULL ((1, 4))); -+# endif - _GL_CXXALIAS_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size, - int (*compare) (void const *, void const *, - void *), - void *arg)); - # endif - _GL_CXXALIASWARN (qsort_r); -+#elif defined GNULIB_POSIXCHECK -+# undef qsort_r -+# if HAVE_RAW_DECL_QSORT_R -+_GL_WARN_ON_USE (qsort_r, "qsort_r is not portable - " -+ "use gnulib module qsort_r for portability"); -+# endif - #endif - - -diff -durN inetutils-1.9.4.orig/lib/strcasecmp.c inetutils-1.9.4/lib/strcasecmp.c ---- inetutils-1.9.4.orig/lib/strcasecmp.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/strcasecmp.c 2017-05-15 17:51:34.500000000 +0800 -@@ -1,5 +1,5 @@ - /* Case-insensitive string comparison function. -- Copyright (C) 1998-1999, 2005-2007, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 1998-1999, 2005-2007, 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/strchrnul.c inetutils-1.9.4/lib/strchrnul.c ---- inetutils-1.9.4.orig/lib/strchrnul.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/strchrnul.c 2017-05-15 17:51:34.656250000 +0800 -@@ -1,5 +1,5 @@ - /* Searching in a string. -- Copyright (C) 2003, 2007-2015 Free Software Foundation, Inc. -+ Copyright (C) 2003, 2007-2017 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 -diff -durN inetutils-1.9.4.orig/lib/strdup.c inetutils-1.9.4/lib/strdup.c ---- inetutils-1.9.4.orig/lib/strdup.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/strdup.c 2017-05-15 17:51:35.000000000 +0800 -@@ -1,4 +1,4 @@ --/* Copyright (C) 1991, 1996-1998, 2002-2004, 2006-2007, 2009-2015 Free Software -+/* Copyright (C) 1991, 1996-1998, 2002-2004, 2006-2007, 2009-2017 Free Software - Foundation, Inc. - - This file is part of the GNU C Library. -diff -durN inetutils-1.9.4.orig/lib/streq.h inetutils-1.9.4/lib/streq.h ---- inetutils-1.9.4.orig/lib/streq.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/streq.h 2017-05-15 17:51:35.156250000 +0800 -@@ -1,5 +1,5 @@ - /* Optimized string comparison. -- Copyright (C) 2001-2002, 2007, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2001-2002, 2007, 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/strerror.c inetutils-1.9.4/lib/strerror.c ---- inetutils-1.9.4.orig/lib/strerror.c 2015-03-31 15:08:16.000000000 +0800 -+++ inetutils-1.9.4/lib/strerror.c 2017-05-15 17:51:35.687500000 +0800 -@@ -1,6 +1,6 @@ - /* strerror.c --- POSIX compatible system error routine - -- Copyright (C) 2007-2015 Free Software Foundation, Inc. -+ Copyright (C) 2007-2017 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 -@@ -66,5 +66,6 @@ - if (sizeof buf <= len) - abort (); - -- return memcpy (buf, msg, len + 1); -+ memcpy (buf, msg, len + 1); -+ return buf; - } -diff -durN inetutils-1.9.4.orig/lib/strerror-override.c inetutils-1.9.4/lib/strerror-override.c ---- inetutils-1.9.4.orig/lib/strerror-override.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/strerror-override.c 2017-05-15 17:51:35.328125000 +0800 -@@ -1,6 +1,6 @@ - /* strerror-override.c --- POSIX compatible system error routine - -- Copyright (C) 2010-2015 Free Software Foundation, Inc. -+ Copyright (C) 2010-2017 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 -diff -durN inetutils-1.9.4.orig/lib/strerror-override.h inetutils-1.9.4/lib/strerror-override.h ---- inetutils-1.9.4.orig/lib/strerror-override.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/strerror-override.h 2017-05-15 17:51:35.500000000 +0800 -@@ -1,6 +1,6 @@ - /* strerror-override.h --- POSIX compatible system error routine - -- Copyright (C) 2010-2015 Free Software Foundation, Inc. -+ Copyright (C) 2010-2017 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 -diff -durN inetutils-1.9.4.orig/lib/string.in.h inetutils-1.9.4/lib/string.in.h ---- inetutils-1.9.4.orig/lib/string.in.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/string.in.h 2017-05-15 17:51:35.890625000 +0800 -@@ -1,6 +1,6 @@ - /* A GNU-like . - -- Copyright (C) 1995-1996, 2001-2015 Free Software Foundation, Inc. -+ Copyright (C) 1995-1996, 2001-2017 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 -@@ -15,16 +15,32 @@ - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - --#ifndef _@GUARD_PREFIX@_STRING_H -- - #if __GNUC__ >= 3 - @PRAGMA_SYSTEM_HEADER@ - #endif - @PRAGMA_COLUMNS@ - -+#if defined _GL_ALREADY_INCLUDING_STRING_H -+/* Special invocation convention: -+ - On OS X/NetBSD we have a sequence of nested includes -+ -> -> "string.h" -+ In this situation system _chk variants due to -D_FORTIFY_SOURCE -+ might be used after any replacements defined here. */ -+ -+#@INCLUDE_NEXT@ @NEXT_STRING_H@ -+ -+#else -+/* Normal invocation convention. */ -+ -+#ifndef _@GUARD_PREFIX@_STRING_H -+ -+#define _GL_ALREADY_INCLUDING_STRING_H -+ - /* The include_next requires a split double-inclusion guard. */ - #@INCLUDE_NEXT@ @NEXT_STRING_H@ - -+#undef _GL_ALREADY_INCLUDING_STRING_H -+ - #ifndef _@GUARD_PREFIX@_STRING_H - #define _@GUARD_PREFIX@_STRING_H - -@@ -400,15 +416,15 @@ - # undef strndup - # define strndup rpl_strndup - # endif --_GL_FUNCDECL_RPL (strndup, char *, (char const *__string, size_t __n) -+_GL_FUNCDECL_RPL (strndup, char *, (char const *__s, size_t __n) - _GL_ARG_NONNULL ((1))); --_GL_CXXALIAS_RPL (strndup, char *, (char const *__string, size_t __n)); -+_GL_CXXALIAS_RPL (strndup, char *, (char const *__s, size_t __n)); - # else - # if ! @HAVE_DECL_STRNDUP@ --_GL_FUNCDECL_SYS (strndup, char *, (char const *__string, size_t __n) -+_GL_FUNCDECL_SYS (strndup, char *, (char const *__s, size_t __n) - _GL_ARG_NONNULL ((1))); - # endif --_GL_CXXALIAS_SYS (strndup, char *, (char const *__string, size_t __n)); -+_GL_CXXALIAS_SYS (strndup, char *, (char const *__s, size_t __n)); - # endif - _GL_CXXALIASWARN (strndup); - #elif defined GNULIB_POSIXCHECK -@@ -428,17 +444,17 @@ - # undef strnlen - # define strnlen rpl_strnlen - # endif --_GL_FUNCDECL_RPL (strnlen, size_t, (char const *__string, size_t __maxlen) -+_GL_FUNCDECL_RPL (strnlen, size_t, (char const *__s, size_t __maxlen) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); --_GL_CXXALIAS_RPL (strnlen, size_t, (char const *__string, size_t __maxlen)); -+_GL_CXXALIAS_RPL (strnlen, size_t, (char const *__s, size_t __maxlen)); - # else - # if ! @HAVE_DECL_STRNLEN@ --_GL_FUNCDECL_SYS (strnlen, size_t, (char const *__string, size_t __maxlen) -+_GL_FUNCDECL_SYS (strnlen, size_t, (char const *__s, size_t __maxlen) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); - # endif --_GL_CXXALIAS_SYS (strnlen, size_t, (char const *__string, size_t __maxlen)); -+_GL_CXXALIAS_SYS (strnlen, size_t, (char const *__s, size_t __maxlen)); - # endif - _GL_CXXALIASWARN (strnlen); - #elif defined GNULIB_POSIXCHECK -@@ -1027,3 +1043,4 @@ - - #endif /* _@GUARD_PREFIX@_STRING_H */ - #endif /* _@GUARD_PREFIX@_STRING_H */ -+#endif -diff -durN inetutils-1.9.4.orig/lib/strings.in.h inetutils-1.9.4/lib/strings.in.h ---- inetutils-1.9.4.orig/lib/strings.in.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/strings.in.h 2017-05-15 17:51:36.046875000 +0800 -@@ -1,6 +1,6 @@ - /* A substitute . - -- Copyright (C) 2007-2015 Free Software Foundation, Inc. -+ Copyright (C) 2007-2017 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 -diff -durN inetutils-1.9.4.orig/lib/stripslash.c inetutils-1.9.4/lib/stripslash.c ---- inetutils-1.9.4.orig/lib/stripslash.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/stripslash.c 2017-05-15 17:51:36.187500000 +0800 -@@ -1,6 +1,6 @@ - /* stripslash.c -- remove redundant trailing slashes from a file name - -- Copyright (C) 1990, 2001, 2003-2006, 2009-2015 Free Software Foundation, -+ Copyright (C) 1990, 2001, 2003-2006, 2009-2017 Free Software Foundation, - Inc. - - This program is free software: you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/strncasecmp.c inetutils-1.9.4/lib/strncasecmp.c ---- inetutils-1.9.4.orig/lib/strncasecmp.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/strncasecmp.c 2017-05-15 17:51:36.328125000 +0800 -@@ -1,5 +1,5 @@ - /* strncasecmp.c -- case insensitive string comparator -- Copyright (C) 1998-1999, 2005-2007, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 1998-1999, 2005-2007, 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/strndup.c inetutils-1.9.4/lib/strndup.c ---- inetutils-1.9.4.orig/lib/strndup.c 2015-03-31 15:08:16.000000000 +0800 -+++ inetutils-1.9.4/lib/strndup.c 2017-05-15 17:51:36.468750000 +0800 -@@ -1,6 +1,6 @@ - /* A replacement function, for systems that lack strndup. - -- Copyright (C) 1996-1998, 2001-2003, 2005-2007, 2009-2015 Free Software -+ Copyright (C) 1996-1998, 2001-2003, 2005-2007, 2009-2017 Free Software - Foundation, Inc. - - This program is free software; you can redistribute it and/or modify it -diff -durN inetutils-1.9.4.orig/lib/strnlen.c inetutils-1.9.4/lib/strnlen.c ---- inetutils-1.9.4.orig/lib/strnlen.c 2015-03-31 15:08:16.000000000 +0800 -+++ inetutils-1.9.4/lib/strnlen.c 2017-05-15 17:51:36.640625000 +0800 -@@ -1,5 +1,5 @@ - /* Find the length of STRING, but scan at most MAXLEN characters. -- Copyright (C) 2005-2007, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2005-2007, 2009-2017 Free Software Foundation, Inc. - Written by Simon Josefsson. - - This program is free software; you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/strnlen1.c inetutils-1.9.4/lib/strnlen1.c ---- inetutils-1.9.4.orig/lib/strnlen1.c 2015-03-31 15:08:16.000000000 +0800 -+++ inetutils-1.9.4/lib/strnlen1.c 2017-05-15 17:51:36.859375000 +0800 -@@ -1,5 +1,5 @@ - /* Find the length of STRING + 1, but scan at most MAXLEN bytes. -- Copyright (C) 2005-2006, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2005-2006, 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/strnlen1.h inetutils-1.9.4/lib/strnlen1.h ---- inetutils-1.9.4.orig/lib/strnlen1.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/strnlen1.h 2017-05-15 17:51:37.031250000 +0800 -@@ -1,5 +1,5 @@ - /* Find the length of STRING + 1, but scan at most MAXLEN bytes. -- Copyright (C) 2005, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2005, 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/sys_ioctl.in.h inetutils-1.9.4/lib/sys_ioctl.in.h ---- inetutils-1.9.4.orig/lib/sys_ioctl.in.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/sys_ioctl.in.h 2017-05-15 17:51:37.234375000 +0800 -@@ -1,5 +1,5 @@ - /* Substitute for and wrapper around . -- Copyright (C) 2008-2015 Free Software Foundation, Inc. -+ Copyright (C) 2008-2017 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 -diff -durN inetutils-1.9.4.orig/lib/sys_select.in.h inetutils-1.9.4/lib/sys_select.in.h ---- inetutils-1.9.4.orig/lib/sys_select.in.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/sys_select.in.h 2017-05-15 17:51:37.406250000 +0800 -@@ -1,5 +1,5 @@ - /* Substitute for . -- Copyright (C) 2007-2015 Free Software Foundation, Inc. -+ Copyright (C) 2007-2017 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 -@@ -81,8 +81,9 @@ - of 'struct timeval', and no definition of this type. - Also, Mac OS X, AIX, HP-UX, IRIX, Solaris, Interix declare select() - in . -- But avoid namespace pollution on glibc systems. */ --# ifndef __GLIBC__ -+ But avoid namespace pollution on glibc systems and "unknown type -+ name" problems on Cygwin. */ -+# if !(defined __GLIBC__ || defined __CYGWIN__) - # include - # endif - -@@ -100,10 +101,11 @@ - #endif - - /* Get definition of 'sigset_t'. -- But avoid namespace pollution on glibc systems. -+ But avoid namespace pollution on glibc systems and "unknown type -+ name" problems on Cygwin. - Do this after the include_next (for the sake of OpenBSD 5.0) but before - the split double-inclusion guard (for the sake of Solaris). */ --#if !(defined __GLIBC__ && !defined __UCLIBC__) -+#if !((defined __GLIBC__ || defined __CYGWIN__) && !defined __UCLIBC__) - # include - #endif - -@@ -289,12 +291,15 @@ - # define select rpl_select - # endif - _GL_FUNCDECL_RPL (select, int, -- (int, fd_set *, fd_set *, fd_set *, struct timeval *)); -+ (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, -+ struct timeval *restrict)); - _GL_CXXALIAS_RPL (select, int, -- (int, fd_set *, fd_set *, fd_set *, struct timeval *)); -+ (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, -+ struct timeval *restrict)); - # else - _GL_CXXALIAS_SYS (select, int, -- (int, fd_set *, fd_set *, fd_set *, struct timeval *)); -+ (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, -+ struct timeval *restrict)); - # endif - _GL_CXXALIASWARN (select); - #elif @HAVE_WINSOCK2_H@ -diff -durN inetutils-1.9.4.orig/lib/sys_socket.c inetutils-1.9.4/lib/sys_socket.c ---- inetutils-1.9.4.orig/lib/sys_socket.c 2013-12-23 20:13:53.000000000 +0800 -+++ inetutils-1.9.4/lib/sys_socket.c 2017-05-15 17:51:37.546875000 +0800 -@@ -1,3 +1,4 @@ - #include - #define _GL_SYS_SOCKET_INLINE _GL_EXTERN_INLINE - #include "sys/socket.h" -+typedef int dummy; -diff -durN inetutils-1.9.4.orig/lib/sys_socket.in.h inetutils-1.9.4/lib/sys_socket.in.h ---- inetutils-1.9.4.orig/lib/sys_socket.in.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/sys_socket.in.h 2017-05-15 17:51:37.687500000 +0800 -@@ -1,6 +1,6 @@ - /* Provide a sys/socket header file for systems lacking it (read: MinGW) - and for systems where it is incomplete. -- Copyright (C) 2005-2015 Free Software Foundation, Inc. -+ Copyright (C) 2005-2017 Free Software Foundation, Inc. - Written by Simon Josefsson. - - This program is free software; you can redistribute it and/or modify -@@ -79,7 +79,12 @@ - - #if !@HAVE_SA_FAMILY_T@ - # if !GNULIB_defined_sa_family_t -+/* On OS/2 kLIBC, sa_family_t is unsigned char unless TCPV40HDRS is defined. */ -+# if !defined __KLIBC__ || defined TCPV40HDRS - typedef unsigned short sa_family_t; -+# else -+typedef unsigned char sa_family_t; -+# endif - # define GNULIB_defined_sa_family_t 1 - # endif - #endif -diff -durN inetutils-1.9.4.orig/lib/sys_stat.in.h inetutils-1.9.4/lib/sys_stat.in.h ---- inetutils-1.9.4.orig/lib/sys_stat.in.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/sys_stat.in.h 2017-05-15 17:51:37.843750000 +0800 -@@ -1,5 +1,5 @@ --/* Provide a more complete sys/stat header file. -- Copyright (C) 2005-2015 Free Software Foundation, Inc. -+/* Provide a more complete sys/stat.h header file. -+ Copyright (C) 2005-2017 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 -@@ -72,6 +72,75 @@ - # define stat _stati64 - #endif - -+/* Optionally, override 'struct stat' on native Windows. */ -+#if @GNULIB_OVERRIDES_STRUCT_STAT@ -+ -+# undef stat -+# if @GNULIB_STAT@ -+# define stat rpl_stat -+# else -+ /* Provoke a clear link error if stat() is used as a function and -+ module 'stat' is not in use. */ -+# define stat stat_used_without_requesting_gnulib_module_stat -+# endif -+ -+# if !GNULIB_defined_struct_stat -+struct stat -+{ -+ dev_t st_dev; -+ ino_t st_ino; -+ mode_t st_mode; -+ nlink_t st_nlink; -+# if 0 -+ uid_t st_uid; -+# else /* uid_t is not defined by default on native Windows. */ -+ short st_uid; -+# endif -+# if 0 -+ gid_t st_gid; -+# else /* gid_t is not defined by default on native Windows. */ -+ short st_gid; -+# endif -+ dev_t st_rdev; -+ off_t st_size; -+# if 0 -+ blksize_t st_blksize; -+ blkcnt_t st_blocks; -+# endif -+ -+# if @WINDOWS_STAT_TIMESPEC@ -+ struct timespec st_atim; -+ struct timespec st_mtim; -+ struct timespec st_ctim; -+# else -+ time_t st_atime; -+ time_t st_mtime; -+ time_t st_ctime; -+# endif -+}; -+# if @WINDOWS_STAT_TIMESPEC@ -+# define st_atime st_atim.tv_sec -+# define st_mtime st_mtim.tv_sec -+# define st_ctime st_ctim.tv_sec -+ /* Indicator, for gnulib internal purposes. */ -+# define _GL_WINDOWS_STAT_TIMESPEC 1 -+# endif -+# define GNULIB_defined_struct_stat 1 -+# endif -+ -+/* Other possible values of st_mode. */ -+# if 0 -+# define _S_IFBLK 0x6000 -+# endif -+# if 0 -+# define _S_IFLNK 0xA000 -+# endif -+# if 0 -+# define _S_IFSOCK 0xC000 -+# endif -+ -+#endif -+ - #ifndef S_IFIFO - # ifdef _S_IFIFO - # define S_IFIFO _S_IFIFO -@@ -345,6 +414,9 @@ - _GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf)); - # endif - _GL_CXXALIASWARN (fstat); -+#elif @GNULIB_OVERRIDES_STRUCT_STAT@ -+# undef fstat -+# define fstat fstat_used_without_requesting_gnulib_module_fstat - #elif @WINDOWS_64_BIT_ST_SIZE@ - /* Above, we define stat to _stati64. */ - # define fstat _fstati64 -@@ -378,6 +450,9 @@ - (int fd, char const *name, struct stat *st, int flags)); - # endif - _GL_CXXALIASWARN (fstatat); -+#elif @GNULIB_OVERRIDES_STRUCT_STAT@ -+# undef fstatat -+# define fstatat fstatat_used_without_requesting_gnulib_module_fstatat - #elif defined GNULIB_POSIXCHECK - # undef fstatat - # if HAVE_RAW_DECL_FSTATAT -@@ -476,6 +551,9 @@ - # if @HAVE_LSTAT@ - _GL_CXXALIASWARN (lstat); - # endif -+#elif @GNULIB_OVERRIDES_STRUCT_STAT@ -+# undef lstat -+# define lstat lstat_used_without_requesting_gnulib_module_lstat - #elif defined GNULIB_POSIXCHECK - # undef lstat - # if HAVE_RAW_DECL_LSTAT -@@ -625,63 +703,69 @@ - - #if @GNULIB_STAT@ - # if @REPLACE_STAT@ --/* We can't use the object-like #define stat rpl_stat, because of -- struct stat. This means that rpl_stat will not be used if the user -- does (stat)(a,b). Oh well. */ --# if defined _AIX && defined stat && defined _LARGE_FILES -- /* With _LARGE_FILES defined, AIX (only) defines stat to stat64, -- so we have to replace stat64() instead of stat(). */ --# undef stat64 --# define stat64(name, st) rpl_stat (name, st) --# elif @WINDOWS_64_BIT_ST_SIZE@ -- /* Above, we define stat to _stati64. */ --# if defined __MINGW32__ && defined _stati64 --# ifndef _USE_32BIT_TIME_T -- /* The system headers define _stati64 to _stat64. */ --# undef _stat64 --# define _stat64(name, st) rpl_stat (name, st) -+# if !@GNULIB_OVERRIDES_STRUCT_STAT@ -+ /* We can't use the object-like #define stat rpl_stat, because of -+ struct stat. This means that rpl_stat will not be used if the user -+ does (stat)(a,b). Oh well. */ -+# if defined _AIX && defined stat && defined _LARGE_FILES -+ /* With _LARGE_FILES defined, AIX (only) defines stat to stat64, -+ so we have to replace stat64() instead of stat(). */ -+# undef stat64 -+# define stat64(name, st) rpl_stat (name, st) -+# elif @WINDOWS_64_BIT_ST_SIZE@ -+ /* Above, we define stat to _stati64. */ -+# if defined __MINGW32__ && defined _stati64 -+# ifndef _USE_32BIT_TIME_T -+ /* The system headers define _stati64 to _stat64. */ -+# undef _stat64 -+# define _stat64(name, st) rpl_stat (name, st) -+# endif -+# elif defined _MSC_VER && defined _stati64 -+# ifdef _USE_32BIT_TIME_T -+ /* The system headers define _stati64 to _stat32i64. */ -+# undef _stat32i64 -+# define _stat32i64(name, st) rpl_stat (name, st) -+# else -+ /* The system headers define _stati64 to _stat64. */ -+# undef _stat64 -+# define _stat64(name, st) rpl_stat (name, st) -+# endif -+# else -+# undef _stati64 -+# define _stati64(name, st) rpl_stat (name, st) - # endif --# elif defined _MSC_VER && defined _stati64 -+# elif defined __MINGW32__ && defined stat - # ifdef _USE_32BIT_TIME_T -- /* The system headers define _stati64 to _stat32i64. */ -+ /* The system headers define stat to _stat32i64. */ - # undef _stat32i64 - # define _stat32i64(name, st) rpl_stat (name, st) - # else -- /* The system headers define _stati64 to _stat64. */ -+ /* The system headers define stat to _stat64. */ - # undef _stat64 - # define _stat64(name, st) rpl_stat (name, st) - # endif --# else --# undef _stati64 --# define _stati64(name, st) rpl_stat (name, st) --# endif --# elif defined __MINGW32__ && defined stat --# ifdef _USE_32BIT_TIME_T -- /* The system headers define stat to _stat32i64. */ --# undef _stat32i64 --# define _stat32i64(name, st) rpl_stat (name, st) --# else -- /* The system headers define stat to _stat64. */ --# undef _stat64 --# define _stat64(name, st) rpl_stat (name, st) --# endif --# elif defined _MSC_VER && defined stat --# ifdef _USE_32BIT_TIME_T -- /* The system headers define stat to _stat32. */ --# undef _stat32 --# define _stat32(name, st) rpl_stat (name, st) --# else -- /* The system headers define stat to _stat64i32. */ --# undef _stat64i32 --# define _stat64i32(name, st) rpl_stat (name, st) --# endif --# else /* !(_AIX ||__MINGW32__ || _MSC_VER) */ --# undef stat --# define stat(name, st) rpl_stat (name, st) --# endif /* !_LARGE_FILES */ -+# elif defined _MSC_VER && defined stat -+# ifdef _USE_32BIT_TIME_T -+ /* The system headers define stat to _stat32. */ -+# undef _stat32 -+# define _stat32(name, st) rpl_stat (name, st) -+# else -+ /* The system headers define stat to _stat64i32. */ -+# undef _stat64i32 -+# define _stat64i32(name, st) rpl_stat (name, st) -+# endif -+# else /* !(_AIX || __MINGW32__ || _MSC_VER) */ -+# undef stat -+# define stat(name, st) rpl_stat (name, st) -+# endif /* !_LARGE_FILES */ -+# endif /* !@GNULIB_OVERRIDES_STRUCT_STAT@ */ - _GL_EXTERN_C int stat (const char *name, struct stat *buf) - _GL_ARG_NONNULL ((1, 2)); - # endif -+#elif @GNULIB_OVERRIDES_STRUCT_STAT@ -+/* see above: -+ #define stat stat_used_without_requesting_gnulib_module_stat -+ */ - #elif defined GNULIB_POSIXCHECK - # undef stat - # if HAVE_RAW_DECL_STAT -diff -durN inetutils-1.9.4.orig/lib/sys_time.in.h inetutils-1.9.4/lib/sys_time.in.h ---- inetutils-1.9.4.orig/lib/sys_time.in.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/sys_time.in.h 2017-05-15 17:51:37.984375000 +0800 -@@ -1,6 +1,6 @@ - /* Provide a more complete sys/time.h. - -- Copyright (C) 2007-2015 Free Software Foundation, Inc. -+ Copyright (C) 2007-2017 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 -@@ -109,6 +109,13 @@ - (struct timeval *restrict, void *restrict)); - # endif - _GL_CXXALIASWARN (gettimeofday); -+# if defined __cplusplus && defined GNULIB_NAMESPACE -+namespace GNULIB_NAMESPACE { -+ typedef ::timeval -+#undef timeval -+ timeval; -+} -+# endif - #elif defined GNULIB_POSIXCHECK - # undef gettimeofday - # if HAVE_RAW_DECL_GETTIMEOFDAY -diff -durN inetutils-1.9.4.orig/lib/sys_types.in.h inetutils-1.9.4/lib/sys_types.in.h ---- inetutils-1.9.4.orig/lib/sys_types.in.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/sys_types.in.h 2017-05-15 17:51:38.140625000 +0800 -@@ -1,6 +1,6 @@ - /* Provide a more complete sys/types.h. - -- Copyright (C) 2011-2015 Free Software Foundation, Inc. -+ Copyright (C) 2011-2017 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 -@@ -42,6 +42,48 @@ - # define _GL_WINDOWS_64_BIT_OFF_T 1 - #endif - -+/* Override dev_t and ino_t if distinguishable inodes support is requested -+ on native Windows. */ -+#if @WINDOWS_STAT_INODES@ -+ -+# if @WINDOWS_STAT_INODES@ == 2 -+/* Experimental, not useful in Windows 10. */ -+ -+/* Define dev_t to a 64-bit type. */ -+# if !defined GNULIB_defined_dev_t -+typedef unsigned long long int rpl_dev_t; -+# undef dev_t -+# define dev_t rpl_dev_t -+# define GNULIB_defined_dev_t 1 -+# endif -+ -+/* Define ino_t to a 128-bit type. */ -+# if !defined GNULIB_defined_ino_t -+/* MSVC does not have a 128-bit integer type. -+ GCC has a 128-bit integer type __int128, but only on 64-bit targets. */ -+typedef struct { unsigned long long int _gl_ino[2]; } rpl_ino_t; -+# undef ino_t -+# define ino_t rpl_ino_t -+# define GNULIB_defined_ino_t 1 -+# endif -+ -+# else /* @WINDOWS_STAT_INODES@ == 1 */ -+ -+/* Define ino_t to a 64-bit type. */ -+# if !defined GNULIB_defined_ino_t -+typedef unsigned long long int rpl_ino_t; -+# undef ino_t -+# define ino_t rpl_ino_t -+# define GNULIB_defined_ino_t 1 -+# endif -+ -+# endif -+ -+/* Indicator, for gnulib internal purposes. */ -+# define _GL_WINDOWS_STAT_INODES @WINDOWS_STAT_INODES@ -+ -+#endif -+ - /* MSVC 9 defines size_t in , not in . */ - /* But avoid namespace pollution on glibc systems. */ - #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \ -diff -durN inetutils-1.9.4.orig/lib/sys_uio.in.h inetutils-1.9.4/lib/sys_uio.in.h ---- inetutils-1.9.4.orig/lib/sys_uio.in.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/sys_uio.in.h 2017-05-15 17:51:38.312500000 +0800 -@@ -1,5 +1,5 @@ - /* Substitute for . -- Copyright (C) 2011-2015 Free Software Foundation, Inc. -+ Copyright (C) 2011-2017 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 -diff -durN inetutils-1.9.4.orig/lib/sysexits.in.h inetutils-1.9.4/lib/sysexits.in.h ---- inetutils-1.9.4.orig/lib/sysexits.in.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/sysexits.in.h 2017-05-15 17:51:38.484375000 +0800 -@@ -1,5 +1,5 @@ - /* exit() exit codes for some BSD system programs. -- Copyright (C) 2003, 2006-2015 Free Software Foundation, Inc. -+ Copyright (C) 2003, 2006-2017 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 -diff -durN inetutils-1.9.4.orig/lib/tempname.c inetutils-1.9.4/lib/tempname.c ---- inetutils-1.9.4.orig/lib/tempname.c 2015-05-12 20:15:29.000000000 +0800 -+++ inetutils-1.9.4/lib/tempname.c 2017-05-15 17:51:38.671875000 +0800 -@@ -1,6 +1,6 @@ - /* tempname.c - generate the name of a temporary file. - -- Copyright (C) 1991-2003, 2005-2007, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 1991-2003, 2005-2007, 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/tempname.h inetutils-1.9.4/lib/tempname.h ---- inetutils-1.9.4.orig/lib/tempname.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/tempname.h 2017-05-15 17:51:38.859375000 +0800 -@@ -1,6 +1,6 @@ - /* Create a temporary file or directory. - -- Copyright (C) 2006, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2006, 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/termios.in.h inetutils-1.9.4/lib/termios.in.h ---- inetutils-1.9.4.orig/lib/termios.in.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/termios.in.h 2017-05-15 17:51:39.062500000 +0800 -@@ -1,5 +1,5 @@ - /* Substitute for and wrapper around . -- Copyright (C) 2010-2015 Free Software Foundation, Inc. -+ Copyright (C) 2010-2017 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 -diff -durN inetutils-1.9.4.orig/lib/time.in.h inetutils-1.9.4/lib/time.in.h ---- inetutils-1.9.4.orig/lib/time.in.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/time.in.h 2017-05-15 17:51:39.203125000 +0800 -@@ -1,6 +1,6 @@ - /* A more-standard . - -- Copyright (C) 2007-2015 Free Software Foundation, Inc. -+ Copyright (C) 2007-2017 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 -@@ -22,11 +22,13 @@ - - /* Don't get in the way of glibc when it includes time.h merely to - declare a few standard symbols, rather than to declare all the -- symbols. Also, Solaris 8 eventually includes itself -+ symbols. (However, skip this for MinGW as it treats __need_time_t -+ incompatibly.) Also, Solaris 8 eventually includes itself - recursively; if that is happening, just include the system - without adding our own declarations. */ --#if (defined __need_time_t || defined __need_clock_t \ -- || defined __need_timespec \ -+#if (((defined __need_time_t || defined __need_clock_t \ -+ || defined __need_timespec) \ -+ && !defined __MINGW32__) \ - || defined _@GUARD_PREFIX@_TIME_H) - - # @INCLUDE_NEXT@ @NEXT_TIME_H@ -@@ -118,6 +120,24 @@ - _GL_CXXALIASWARN (nanosleep); - # endif - -+/* Initialize time conversion information. */ -+# if @GNULIB_TZSET@ -+# if @REPLACE_TZSET@ -+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -+# undef tzset -+# define tzset rpl_tzset -+# endif -+_GL_FUNCDECL_RPL (tzset, void, (void)); -+_GL_CXXALIAS_RPL (tzset, void, (void)); -+# else -+# if ! @HAVE_TZSET@ -+_GL_FUNCDECL_SYS (tzset, void, (void)); -+# endif -+_GL_CXXALIAS_SYS (tzset, void, (void)); -+# endif -+_GL_CXXALIASWARN (tzset); -+# endif -+ - /* Return the 'time_t' representation of TP and normalize TP. */ - # if @GNULIB_MKTIME@ - # if @REPLACE_MKTIME@ -@@ -185,7 +205,7 @@ - /* Convert TIMER to RESULT, assuming local time and UTC respectively. See - and - . */ --# if @GNULIB_GETTIMEOFDAY@ -+# if @GNULIB_LOCALTIME@ || @REPLACE_LOCALTIME@ - # if @REPLACE_LOCALTIME@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef localtime -@@ -200,7 +220,7 @@ - _GL_CXXALIASWARN (localtime); - # endif - --# if @GNULIB_GETTIMEOFDAY@ -+# if 0 || @REPLACE_GMTIME@ - # if @REPLACE_GMTIME@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef gmtime -@@ -215,7 +235,7 @@ - _GL_CXXALIASWARN (gmtime); - # endif - --/* Parse BUF as a time stamp, assuming FORMAT specifies its layout, and store -+/* Parse BUF as a timestamp, assuming FORMAT specifies its layout, and store - the resulting broken-down time into TM. See - . */ - # if @GNULIB_STRPTIME@ -@@ -231,6 +251,60 @@ - _GL_CXXALIASWARN (strptime); - # endif - -+/* Convert *TP to a date and time string. See -+ . */ -+# if @GNULIB_CTIME@ -+# if @REPLACE_CTIME@ -+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -+# define ctime rpl_ctime -+# endif -+_GL_FUNCDECL_RPL (ctime, char *, (time_t const *__tp) -+ _GL_ARG_NONNULL ((1))); -+_GL_CXXALIAS_RPL (ctime, char *, (time_t const *__tp)); -+# else -+_GL_CXXALIAS_SYS (ctime, char *, (time_t const *__tp)); -+# endif -+_GL_CXXALIASWARN (ctime); -+# endif -+ -+/* Convert *TP to a date and time string. See -+ . */ -+# if @GNULIB_STRFTIME@ -+# if @REPLACE_STRFTIME@ -+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -+# define strftime rpl_strftime -+# endif -+_GL_FUNCDECL_RPL (strftime, size_t, (char *__buf, size_t __bufsize, -+ const char *__fmt, const struct tm *__tp) -+ _GL_ARG_NONNULL ((1, 3, 4))); -+_GL_CXXALIAS_RPL (strftime, size_t, (char *__buf, size_t __bufsize, -+ const char *__fmt, const struct tm *__tp)); -+# else -+_GL_CXXALIAS_SYS (strftime, size_t, (char *__buf, size_t __bufsize, -+ const char *__fmt, const struct tm *__tp)); -+# endif -+_GL_CXXALIASWARN (strftime); -+# endif -+ -+# if defined _GNU_SOURCE && @GNULIB_TIME_RZ@ && ! @HAVE_TIMEZONE_T@ -+typedef struct tm_zone *timezone_t; -+_GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); -+_GL_CXXALIAS_SYS (tzalloc, timezone_t, (char const *__name)); -+_GL_FUNCDECL_SYS (tzfree, void, (timezone_t __tz)); -+_GL_CXXALIAS_SYS (tzfree, void, (timezone_t __tz)); -+_GL_FUNCDECL_SYS (localtime_rz, struct tm *, -+ (timezone_t __tz, time_t const *restrict __timer, -+ struct tm *restrict __result) _GL_ARG_NONNULL ((2, 3))); -+_GL_CXXALIAS_SYS (localtime_rz, struct tm *, -+ (timezone_t __tz, time_t const *restrict __timer, -+ struct tm *restrict __result)); -+_GL_FUNCDECL_SYS (mktime_z, time_t, -+ (timezone_t __tz, struct tm *restrict __result) -+ _GL_ARG_NONNULL ((2))); -+_GL_CXXALIAS_SYS (mktime_z, time_t, -+ (timezone_t __tz, struct tm *restrict __result)); -+# endif -+ - /* Convert TM to a time_t value, assuming UTC. */ - # if @GNULIB_TIMEGM@ - # if @REPLACE_TIMEGM@ -diff -durN inetutils-1.9.4.orig/lib/unistd.c inetutils-1.9.4/lib/unistd.c ---- inetutils-1.9.4.orig/lib/unistd.c 2015-03-31 15:08:16.000000000 +0800 -+++ inetutils-1.9.4/lib/unistd.c 2017-05-15 17:51:40.078125000 +0800 -@@ -1,3 +1,4 @@ - #include - #define _GL_UNISTD_INLINE _GL_EXTERN_INLINE - #include "unistd.h" -+typedef int dummy; -diff -durN inetutils-1.9.4.orig/lib/unistd--.h inetutils-1.9.4/lib/unistd--.h ---- inetutils-1.9.4.orig/lib/unistd--.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/unistd--.h 2017-05-15 17:51:39.718750000 +0800 -@@ -1,6 +1,6 @@ - /* Like unistd.h, but redefine some names to avoid glitches. - -- Copyright (C) 2005, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2005, 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/unistd.in.h inetutils-1.9.4/lib/unistd.in.h ---- inetutils-1.9.4.orig/lib/unistd.in.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/unistd.in.h 2017-05-15 17:51:40.265625000 +0800 -@@ -1,5 +1,5 @@ - /* Substitute for and wrapper around . -- Copyright (C) 2003-2015 Free Software Foundation, Inc. -+ Copyright (C) 2003-2017 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 -@@ -55,9 +55,13 @@ - #include - - /* mingw doesn't define the SEEK_* or *_FILENO macros in . */ -+/* MSVC declares 'unlink' in , not in . We must include -+ it before we #define unlink rpl_unlink. */ - /* Cygwin 1.7.1 declares symlinkat in , not in . */ - /* But avoid namespace pollution on glibc systems. */ - #if (!(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) \ -+ || ((@GNULIB_UNLINK@ || defined GNULIB_POSIXCHECK) \ -+ && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) \ - || ((@GNULIB_SYMLINKAT@ || defined GNULIB_POSIXCHECK) \ - && defined __CYGWIN__)) \ - && ! defined __GLIBC__ -@@ -123,11 +127,18 @@ - # include - #endif - -+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ -+ -+/* The definition of _GL_ARG_NONNULL is copied here. */ -+ -+/* The definition of _GL_WARN_ON_USE is copied here. */ -+ -+ - /* Get getopt(), optarg, optind, opterr, optopt. - But avoid namespace pollution on glibc systems. */ - #if @GNULIB_UNISTD_H_GETOPT@ && !defined __GLIBC__ && !defined _GL_SYSTEM_GETOPT --# define __need_getopt --# include -+# include -+# include - #endif - - #ifndef _GL_INLINE_HEADER_BEGIN -@@ -138,13 +149,6 @@ - # define _GL_UNISTD_INLINE _GL_INLINE - #endif - --/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ -- --/* The definition of _GL_ARG_NONNULL is copied here. */ -- --/* The definition of _GL_WARN_ON_USE is copied here. */ -- -- - /* Hide some function declarations from . */ - - #if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ -@@ -776,7 +780,7 @@ - ${LOGNAME-$USER} on Unix platforms, - $USERNAME on native Windows platforms. - */ --# if !@HAVE_GETLOGIN@ -+# if !@HAVE_DECL_GETLOGIN@ - _GL_FUNCDECL_SYS (getlogin, char *, (void)); - # endif - _GL_CXXALIAS_SYS (getlogin, char *, (void)); -@@ -1452,6 +1456,36 @@ - # endif - #endif - -+ -+#if @GNULIB_TRUNCATE@ -+/* Change the size of the file designated by FILENAME to become equal to LENGTH. -+ Return 0 if successful, otherwise -1 and errno set. -+ See the POSIX:2008 specification -+ . */ -+# if @REPLACE_TRUNCATE@ -+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -+# undef truncate -+# define truncate rpl_truncate -+# endif -+_GL_FUNCDECL_RPL (truncate, int, (const char *filename, off_t length) -+ _GL_ARG_NONNULL ((1))); -+_GL_CXXALIAS_RPL (truncate, int, (const char *filename, off_t length)); -+# else -+# if !@HAVE_TRUNCATE@ -+_GL_FUNCDECL_SYS (truncate, int, (const char *filename, off_t length) -+ _GL_ARG_NONNULL ((1))); -+# endif -+_GL_CXXALIAS_SYS (truncate, int, (const char *filename, off_t length)); -+# endif -+_GL_CXXALIASWARN (truncate); -+#elif defined GNULIB_POSIXCHECK -+# undef truncate -+# if HAVE_RAW_DECL_TRUNCATE -+_GL_WARN_ON_USE (truncate, "truncate is unportable - " -+ "use gnulib module truncate for portability"); -+# endif -+#endif -+ - - #if @GNULIB_TTYNAME_R@ - /* Store at most BUFLEN characters of the pathname of the terminal FD is -diff -durN inetutils-1.9.4.orig/lib/unistd-safer.h inetutils-1.9.4/lib/unistd-safer.h ---- inetutils-1.9.4.orig/lib/unistd-safer.h 2015-03-31 15:08:16.000000000 +0800 -+++ inetutils-1.9.4/lib/unistd-safer.h 2017-05-15 17:51:39.906250000 +0800 -@@ -1,6 +1,6 @@ - /* Invoke unistd-like functions, but avoid some glitches. - -- Copyright (C) 2001, 2003, 2005, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2001, 2003, 2005, 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/unused-parameter.h inetutils-1.9.4/lib/unused-parameter.h ---- inetutils-1.9.4.orig/lib/unused-parameter.h 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/lib/unused-parameter.h 2017-05-15 17:51:40.406250000 +0800 -@@ -0,0 +1,36 @@ -+/* A C macro for declaring that specific function parameters are not used. -+ Copyright (C) 2008-2017 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 the Free Software Foundation; either version 3 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, see . */ -+ -+/* _GL_UNUSED_PARAMETER is a marker that can be appended to function parameter -+ declarations for parameters that are not used. This helps to reduce -+ warnings, such as from GCC -Wunused-parameter. The syntax is as follows: -+ type param _GL_UNUSED_PARAMETER -+ or more generally -+ param_decl _GL_UNUSED_PARAMETER -+ For example: -+ int param _GL_UNUSED_PARAMETER -+ int *(*param)(void) _GL_UNUSED_PARAMETER -+ Other possible, but obscure and discouraged syntaxes: -+ int _GL_UNUSED_PARAMETER *(*param)(void) -+ _GL_UNUSED_PARAMETER int *(*param)(void) -+ */ -+#ifndef _GL_UNUSED_PARAMETER -+# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -+# define _GL_UNUSED_PARAMETER __attribute__ ((__unused__)) -+# else -+# define _GL_UNUSED_PARAMETER -+# endif -+#endif -diff -durN inetutils-1.9.4.orig/lib/vasnprintf.c inetutils-1.9.4/lib/vasnprintf.c ---- inetutils-1.9.4.orig/lib/vasnprintf.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/vasnprintf.c 2017-05-15 17:51:40.609375000 +0800 -@@ -1,5 +1,5 @@ - /* vsprintf with automatic memory allocation. -- Copyright (C) 1999, 2002-2015 Free Software Foundation, Inc. -+ Copyright (C) 1999, 2002-2017 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 -@@ -156,6 +156,7 @@ - # define SNPRINTF snwprintf - # else - # define SNPRINTF _snwprintf -+# define USE_MSVC__SNPRINTF 1 - # endif - # else - /* Unix. */ -@@ -181,7 +182,9 @@ - /* Here we need to call the native snprintf, not rpl_snprintf. */ - # undef snprintf - # else -+ /* MSVC versions < 14 did not have snprintf, only _snprintf. */ - # define SNPRINTF _snprintf -+# define USE_MSVC__SNPRINTF 1 - # endif - # else - /* Unix. */ -@@ -195,7 +198,7 @@ - - /* GCC >= 4.0 with -Wall emits unjustified "... may be used uninitialized" - warnings in this file. Use -Dlint to suppress them. */ --#ifdef lint -+#if defined GCC_LINT || defined lint - # define IF_LINT(Code) Code - #else - # define IF_LINT(Code) /* empty */ -@@ -208,7 +211,7 @@ - #undef remainder - #define remainder rem - --#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99) && !WIDE_CHAR_VERSION -+#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF) && !WIDE_CHAR_VERSION - # if (HAVE_STRNLEN && !defined _AIX) - # define local_strnlen strnlen - # else -@@ -224,7 +227,7 @@ - # endif - #endif - --#if (((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99) && WIDE_CHAR_VERSION) || ((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL)) && !WIDE_CHAR_VERSION && DCHAR_IS_TCHAR)) && HAVE_WCHAR_T -+#if (((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF) && WIDE_CHAR_VERSION) || ((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL)) && !WIDE_CHAR_VERSION && DCHAR_IS_TCHAR)) && HAVE_WCHAR_T - # if HAVE_WCSLEN - # define local_wcslen wcslen - # else -@@ -247,7 +250,7 @@ - # endif - #endif - --#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99) && HAVE_WCHAR_T && WIDE_CHAR_VERSION -+#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF) && HAVE_WCHAR_T && WIDE_CHAR_VERSION - # if HAVE_WCSNLEN - # define local_wcsnlen wcsnlen - # else -@@ -1517,7 +1520,7 @@ - - #endif - --#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 -+#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF - - /* Use a different function name, to make it possible that the 'wchar_t' - parametrization and the 'char' parametrization get compiled in the same -@@ -2392,7 +2395,7 @@ - } - } - #endif --#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL)) && HAVE_WCHAR_T -+#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL)) && HAVE_WCHAR_T - else if (dp->conversion == 's' - # if WIDE_CHAR_VERSION - && a.arg[dp->arg_index].type != TYPE_WIDE_STRING -@@ -4591,10 +4594,10 @@ - #if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION - int has_width; - #endif --#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION -+#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION - size_t width; - #endif --#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || NEED_PRINTF_UNBOUNDED_PRECISION -+#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || NEED_PRINTF_UNBOUNDED_PRECISION - int has_precision; - size_t precision; - #endif -@@ -4623,7 +4626,7 @@ - #if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION - has_width = 0; - #endif --#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION -+#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION - width = 0; - if (dp->width_start != dp->width_end) - { -@@ -4657,7 +4660,7 @@ - } - #endif - --#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || NEED_PRINTF_UNBOUNDED_PRECISION -+#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || NEED_PRINTF_UNBOUNDED_PRECISION - has_precision = 0; - precision = 6; - if (dp->precision_start != dp->precision_end) -@@ -4832,9 +4835,9 @@ - break; - # else - *fbp++ = 'l'; -- /*FALLTHROUGH*/ - # endif - #endif -+ /*FALLTHROUGH*/ - case TYPE_LONGINT: - case TYPE_ULONGINT: - #if HAVE_WINT_T -@@ -5127,7 +5130,7 @@ - /* Look at the snprintf() return value. */ - if (retcount < 0) - { --# if !HAVE_SNPRINTF_RETVAL_C99 -+# if !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF - /* HP-UX 10.20 snprintf() is doubly deficient: - It doesn't understand the '%n' directive, - *and* it returns -1 (rather than the length -diff -durN inetutils-1.9.4.orig/lib/vasnprintf.h inetutils-1.9.4/lib/vasnprintf.h ---- inetutils-1.9.4.orig/lib/vasnprintf.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/vasnprintf.h 2017-05-15 17:51:40.765625000 +0800 -@@ -1,5 +1,5 @@ - /* vsprintf with automatic memory allocation. -- Copyright (C) 2002-2004, 2007-2015 Free Software Foundation, Inc. -+ Copyright (C) 2002-2004, 2007-2017 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 -diff -durN inetutils-1.9.4.orig/lib/vasprintf.c inetutils-1.9.4/lib/vasprintf.c ---- inetutils-1.9.4.orig/lib/vasprintf.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/vasprintf.c 2017-05-15 17:51:40.953125000 +0800 -@@ -1,5 +1,5 @@ - /* Formatted output to strings. -- Copyright (C) 1999, 2002, 2006-2015 Free Software Foundation, Inc. -+ Copyright (C) 1999, 2002, 2006-2017 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 -diff -durN inetutils-1.9.4.orig/lib/verify.h inetutils-1.9.4/lib/verify.h ---- inetutils-1.9.4.orig/lib/verify.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/verify.h 2017-05-15 17:51:41.109375000 +0800 -@@ -1,6 +1,6 @@ - /* Compile-time assert-like macros. - -- Copyright (C) 2005-2006, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 2005-2006, 2009-2017 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 -@@ -248,7 +248,12 @@ - /* Verify requirement R at compile-time, as a declaration without a - trailing ';'. */ - --#define verify(R) _GL_VERIFY (R, "verify (" #R ")") -+#ifdef __GNUC__ -+# define verify(R) _GL_VERIFY (R, "verify (" #R ")") -+#else -+/* PGI barfs if R is long. Play it safe. */ -+# define verify(R) _GL_VERIFY (R, "verify (...)") -+#endif - - #ifndef __has_builtin - # define __has_builtin(x) 0 -@@ -263,7 +268,7 @@ - # define assume(R) ((R) ? (void) 0 : __builtin_unreachable ()) - #elif 1200 <= _MSC_VER - # define assume(R) __assume (R) --#elif (defined lint \ -+#elif ((defined GCC_LINT || defined lint) \ - && (__has_builtin (__builtin_trap) \ - || 3 < __GNUC__ + (3 < __GNUC_MINOR__ + (4 <= __GNUC_PATCHLEVEL__)))) - /* Doing it this way helps various packages when configured with -diff -durN inetutils-1.9.4.orig/lib/version-etc.c inetutils-1.9.4/lib/version-etc.c ---- inetutils-1.9.4.orig/lib/version-etc.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/version-etc.c 2017-05-15 17:51:41.421875000 +0800 -@@ -1,5 +1,5 @@ - /* Print --version and bug-reporting information in a consistent format. -- Copyright (C) 1999-2015 Free Software Foundation, Inc. -+ Copyright (C) 1999-2017 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 -@@ -38,7 +38,7 @@ - # define PACKAGE PACKAGE_TARNAME - #endif - --enum { COPYRIGHT_YEAR = 2015 }; -+enum { COPYRIGHT_YEAR = 2017 }; - - /* The three functions below display the --version information the - standard way. -diff -durN inetutils-1.9.4.orig/lib/version-etc.h inetutils-1.9.4/lib/version-etc.h ---- inetutils-1.9.4.orig/lib/version-etc.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/version-etc.h 2017-05-15 17:51:41.562500000 +0800 -@@ -1,5 +1,5 @@ - /* Print --version and bug-reporting information in a consistent format. -- Copyright (C) 1999, 2003, 2005, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 1999, 2003, 2005, 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/version-etc-fsf.c inetutils-1.9.4/lib/version-etc-fsf.c ---- inetutils-1.9.4.orig/lib/version-etc-fsf.c 2015-03-31 15:08:16.000000000 +0800 -+++ inetutils-1.9.4/lib/version-etc-fsf.c 2017-05-15 17:51:41.234375000 +0800 -@@ -1,5 +1,5 @@ - /* Variable with FSF copyright information, for version-etc. -- Copyright (C) 1999-2006, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 1999-2006, 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/vsnprintf.c inetutils-1.9.4/lib/vsnprintf.c ---- inetutils-1.9.4.orig/lib/vsnprintf.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/vsnprintf.c 2017-05-15 17:51:41.734375000 +0800 -@@ -1,5 +1,5 @@ - /* Formatted output to strings. -- Copyright (C) 2004, 2006-2015 Free Software Foundation, Inc. -+ Copyright (C) 2004, 2006-2017 Free Software Foundation, Inc. - Written by Simon Josefsson and Yoann Vandoorselaere . - - This program is free software; you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/w32sock.h inetutils-1.9.4/lib/w32sock.h ---- inetutils-1.9.4.orig/lib/w32sock.h 2015-03-31 15:08:16.000000000 +0800 -+++ inetutils-1.9.4/lib/w32sock.h 2017-05-15 17:51:41.906250000 +0800 -@@ -1,6 +1,6 @@ - /* w32sock.h --- internal auxiliary functions for Windows socket functions - -- Copyright (C) 2008-2015 Free Software Foundation, Inc. -+ Copyright (C) 2008-2017 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 -@@ -26,7 +26,11 @@ - #include - - /* Get _get_osfhandle(). */ --#include "msvc-nothrow.h" -+#if GNULIB_MSVC_NOTHROW -+# include "msvc-nothrow.h" -+#else -+# include -+#endif - - #define FD_TO_SOCKET(fd) ((SOCKET) _get_osfhandle ((fd))) - #define SOCKET_TO_FD(fh) (_open_osfhandle ((intptr_t) (fh), O_RDWR | O_BINARY)) -diff -durN inetutils-1.9.4.orig/lib/warn-on-use.h inetutils-1.9.4/lib/warn-on-use.h ---- inetutils-1.9.4.orig/lib/warn-on-use.h 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/lib/warn-on-use.h 2017-05-15 17:51:42.125000000 +0800 -@@ -0,0 +1,109 @@ -+/* A C macro for emitting warnings if a function is used. -+ Copyright (C) 2010-2017 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 the Free Software Foundation; either version 3 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, see . */ -+ -+/* _GL_WARN_ON_USE (function, "literal string") issues a declaration -+ for FUNCTION which will then trigger a compiler warning containing -+ the text of "literal string" anywhere that function is called, if -+ supported by the compiler. If the compiler does not support this -+ feature, the macro expands to an unused extern declaration. -+ -+ This macro is useful for marking a function as a potential -+ portability trap, with the intent that "literal string" include -+ instructions on the replacement function that should be used -+ instead. However, one of the reasons that a function is a -+ portability trap is if it has the wrong signature. Declaring -+ FUNCTION with a different signature in C is a compilation error, so -+ this macro must use the same type as any existing declaration so -+ that programs that avoid the problematic FUNCTION do not fail to -+ compile merely because they included a header that poisoned the -+ function. But this implies that _GL_WARN_ON_USE is only safe to -+ use if FUNCTION is known to already have a declaration. Use of -+ this macro implies that there must not be any other macro hiding -+ the declaration of FUNCTION; but undefining FUNCTION first is part -+ of the poisoning process anyway (although for symbols that are -+ provided only via a macro, the result is a compilation error rather -+ than a warning containing "literal string"). Also note that in -+ C++, it is only safe to use if FUNCTION has no overloads. -+ -+ For an example, it is possible to poison 'getline' by: -+ - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], -+ [getline]) in configure.ac, which potentially defines -+ HAVE_RAW_DECL_GETLINE -+ - adding this code to a header that wraps the system : -+ #undef getline -+ #if HAVE_RAW_DECL_GETLINE -+ _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" -+ "not universally present; use the gnulib module getline"); -+ #endif -+ -+ It is not possible to directly poison global variables. But it is -+ possible to write a wrapper accessor function, and poison that -+ (less common usage, like &environ, will cause a compilation error -+ rather than issue the nice warning, but the end result of informing -+ the developer about their portability problem is still achieved): -+ #if HAVE_RAW_DECL_ENVIRON -+ static char ***rpl_environ (void) { return &environ; } -+ _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); -+ # undef environ -+ # define environ (*rpl_environ ()) -+ #endif -+ */ -+#ifndef _GL_WARN_ON_USE -+ -+# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -+/* A compiler attribute is available in gcc versions 4.3.0 and later. */ -+# define _GL_WARN_ON_USE(function, message) \ -+extern __typeof__ (function) function __attribute__ ((__warning__ (message))) -+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -+/* Verify the existence of the function. */ -+# define _GL_WARN_ON_USE(function, message) \ -+extern __typeof__ (function) function -+# else /* Unsupported. */ -+# define _GL_WARN_ON_USE(function, message) \ -+_GL_WARN_EXTERN_C int _gl_warn_on_use -+# endif -+#endif -+ -+/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") -+ is like _GL_WARN_ON_USE (function, "string"), except that the function is -+ declared with the given prototype, consisting of return type, parameters, -+ and attributes. -+ This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does -+ not work in this case. */ -+#ifndef _GL_WARN_ON_USE_CXX -+# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -+# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -+extern rettype function parameters_and_attributes \ -+ __attribute__ ((__warning__ (msg))) -+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -+/* Verify the existence of the function. */ -+# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -+extern rettype function parameters_and_attributes -+# else /* Unsupported. */ -+# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -+_GL_WARN_EXTERN_C int _gl_warn_on_use -+# endif -+#endif -+ -+/* _GL_WARN_EXTERN_C declaration; -+ performs the declaration with C linkage. */ -+#ifndef _GL_WARN_EXTERN_C -+# if defined __cplusplus -+# define _GL_WARN_EXTERN_C extern "C" -+# else -+# define _GL_WARN_EXTERN_C extern -+# endif -+#endif -diff -durN inetutils-1.9.4.orig/lib/wchar.in.h inetutils-1.9.4/lib/wchar.in.h ---- inetutils-1.9.4.orig/lib/wchar.in.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/wchar.in.h 2017-05-15 17:51:42.296875000 +0800 -@@ -1,6 +1,6 @@ - /* A substitute for ISO C99 , for platforms that have issues. - -- Copyright (C) 2007-2015 Free Software Foundation, Inc. -+ Copyright (C) 2007-2017 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 -@@ -30,15 +30,23 @@ - #endif - @PRAGMA_COLUMNS@ - --#if defined __need_mbstate_t || defined __need_wint_t || (defined __hpux && ((defined _INTTYPES_INCLUDED && !defined strtoimax) || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) || defined _GL_ALREADY_INCLUDING_WCHAR_H -+#if (((defined __need_mbstate_t || defined __need_wint_t) \ -+ && !defined __MINGW32__ && !defined __KLIBC__) \ -+ || (defined __hpux \ -+ && ((defined _INTTYPES_INCLUDED && !defined strtoimax) \ -+ || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) \ -+ || (defined __MINGW32__ && defined __STRING_H_SOURCED__) \ -+ || defined _GL_ALREADY_INCLUDING_WCHAR_H) - /* Special invocation convention: -- - Inside glibc and uClibc header files. -+ - Inside glibc and uClibc header files, but not MinGW. - - On HP-UX 11.00 we have a sequence of nested includes - -> -> , and the latter includes , - once indirectly -> -> -> - and once directly. In both situations 'wint_t' is not yet defined, - therefore we cannot provide the function overrides; instead include only - the system's . -+ - With MinGW 3.22, when includes , only some part of -+ is actually processed, and that doesn't include 'mbstate_t'. - - On IRIX 6.5, similarly, we have an include -> , and - the latter includes . But here, we have no way to detect whether - is completely included or is still being included. */ -@@ -105,12 +113,16 @@ - # define WEOF -1 - # endif - #else --/* MSVC defines wint_t as 'unsigned short' in . -- This is too small: ISO C 99 section 7.24.1.(2) says that wint_t must be -- "unchanged by default argument promotions". Override it. */ --# if defined _MSC_VER -+/* mingw and MSVC define wint_t as 'unsigned short' in or -+ . This is too small: ISO C 99 section 7.24.1.(2) says that -+ wint_t must be "unchanged by default argument promotions". Override it. */ -+# if @GNULIB_OVERRIDES_WINT_T@ - # if !GNULIB_defined_wint_t --# include -+# if @HAVE_CRTDEFS_H@ -+# include -+# else -+# include -+# endif - typedef unsigned int rpl_wint_t; - # undef wint_t - # define wint_t rpl_wint_t -@@ -440,6 +452,11 @@ - # if !@HAVE_DECL_WCWIDTH@ - /* wcwidth exists but is not declared. */ - _GL_FUNCDECL_SYS (wcwidth, int, (wchar_t) _GL_ATTRIBUTE_PURE); -+# elif defined __KLIBC__ -+/* On OS/2 kLIBC, wcwidth is a macro that expands to the name of a -+ static inline function. The implementation of wcwidth in wcwidth.c -+ causes a "conflicting types" error. */ -+# undef wcwidth - # endif - _GL_CXXALIAS_SYS (wcwidth, int, (wchar_t)); - # endif -@@ -1022,6 +1039,38 @@ - # endif - #endif - -+ -+/* Convert *TP to a date and time wide string. See -+ . */ -+#if @GNULIB_WCSFTIME@ -+# if @REPLACE_WCSFTIME@ -+# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -+# undef wcsftime -+# define wcsftime rpl_wcsftime -+# endif -+_GL_FUNCDECL_RPL (wcsftime, size_t, (wchar_t *__buf, size_t __bufsize, -+ const wchar_t *__fmt, const struct tm *__tp) -+ _GL_ARG_NONNULL ((1, 3, 4))); -+_GL_CXXALIAS_RPL (wcsftime, size_t, (wchar_t *__buf, size_t __bufsize, -+ const wchar_t *__fmt, const struct tm *__tp)); -+# else -+# if !@HAVE_WCSFTIME@ -+_GL_FUNCDECL_SYS (wcsftime, size_t, (wchar_t *__buf, size_t __bufsize, -+ const wchar_t *__fmt, const struct tm *__tp) -+ _GL_ARG_NONNULL ((1, 3, 4))); -+# endif -+_GL_CXXALIAS_SYS (wcsftime, size_t, (wchar_t *__buf, size_t __bufsize, -+ const wchar_t *__fmt, const struct tm *__tp)); -+# endif -+_GL_CXXALIASWARN (wcsftime); -+#elif defined GNULIB_POSIXCHECK -+# undef wcsftime -+# if HAVE_RAW_DECL_WCSFTIME -+_GL_WARN_ON_USE (wcsftime, "wcsftime is unportable - " -+ "use gnulib module wcsftime for portability"); -+# endif -+#endif -+ - - #endif /* _@GUARD_PREFIX@_WCHAR_H */ - #endif /* _@GUARD_PREFIX@_WCHAR_H */ -diff -durN inetutils-1.9.4.orig/lib/wcrtomb.c inetutils-1.9.4/lib/wcrtomb.c ---- inetutils-1.9.4.orig/lib/wcrtomb.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/wcrtomb.c 2017-05-15 17:51:42.468750000 +0800 -@@ -1,5 +1,5 @@ - /* Convert wide character to multibyte character. -- Copyright (C) 2008-2015 Free Software Foundation, Inc. -+ Copyright (C) 2008-2017 Free Software Foundation, Inc. - Written by Bruno Haible , 2008. - - This program is free software: you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/wctype.in.h inetutils-1.9.4/lib/wctype.in.h ---- inetutils-1.9.4.orig/lib/wctype.in.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/wctype.in.h 2017-05-15 17:51:42.765625000 +0800 -@@ -1,6 +1,6 @@ - /* A substitute for ISO C99 , for platforms that lack it. - -- Copyright (C) 2006-2015 Free Software Foundation, Inc. -+ Copyright (C) 2006-2017 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 -@@ -25,13 +25,25 @@ - * wctrans_t, and wctype_t are not yet implemented. - */ - --#ifndef _@GUARD_PREFIX@_WCTYPE_H -- - #if __GNUC__ >= 3 - @PRAGMA_SYSTEM_HEADER@ - #endif - @PRAGMA_COLUMNS@ - -+#if (defined __MINGW32__ && defined __CTYPE_H_SOURCED__) -+ -+/* Special invocation convention: -+ - With MinGW 3.22, when includes , only some part of -+ is being processed, which doesn't include the idempotency -+ guard. */ -+ -+#@INCLUDE_NEXT@ @NEXT_WCTYPE_H@ -+ -+#else -+/* Normal invocation convention. */ -+ -+#ifndef _@GUARD_PREFIX@_WCTYPE_H -+ - #if @HAVE_WINT_T@ - /* Solaris 2.5 has a bug: must be included before . - Tru64 with Desktop Toolkit C has a bug: must be included before -@@ -44,11 +56,13 @@ - # include - #endif - --/* mingw has declarations of towupper and towlower in as -- well . Include in advance to avoid rpl_ prefix -- being added to the declarations. */ --#ifdef __MINGW32__ -+/* Native Windows (mingw, MSVC) have declarations of towupper, towlower, and -+ isw* functions in , as well as in . Include -+ , in advance to avoid rpl_ prefix being added to the -+ declarations. */ -+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - # include -+# include - #endif - - /* Include the original if it exists. -@@ -93,12 +107,16 @@ - # define WEOF -1 - # endif - #else --/* MSVC defines wint_t as 'unsigned short' in . -- This is too small: ISO C 99 section 7.24.1.(2) says that wint_t must be -- "unchanged by default argument promotions". Override it. */ --# if defined _MSC_VER -+/* mingw and MSVC define wint_t as 'unsigned short' in or -+ . This is too small: ISO C 99 section 7.24.1.(2) says that -+ wint_t must be "unchanged by default argument promotions". Override it. */ -+# if @GNULIB_OVERRIDES_WINT_T@ - # if !GNULIB_defined_wint_t --# include -+# if @HAVE_CRTDEFS_H@ -+# include -+# else -+# include -+# endif - typedef unsigned int rpl_wint_t; - # undef wint_t - # define wint_t rpl_wint_t -@@ -512,3 +530,4 @@ - - #endif /* _@GUARD_PREFIX@_WCTYPE_H */ - #endif /* _@GUARD_PREFIX@_WCTYPE_H */ -+#endif -diff -durN inetutils-1.9.4.orig/lib/xalloc.h inetutils-1.9.4/lib/xalloc.h ---- inetutils-1.9.4.orig/lib/xalloc.h 2015-05-12 20:15:29.000000000 +0800 -+++ inetutils-1.9.4/lib/xalloc.h 2017-05-15 17:51:43.265625000 +0800 -@@ -1,6 +1,6 @@ - /* xalloc.h -- malloc with out-of-memory checking - -- Copyright (C) 1990-2000, 2003-2004, 2006-2015 Free Software Foundation, Inc. -+ Copyright (C) 1990-2000, 2003-2004, 2006-2017 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 -@@ -19,6 +19,7 @@ - #define XALLOC_H_ - - #include -+#include - - #include "xalloc-oversized.h" - -@@ -193,14 +194,17 @@ - n = DEFAULT_MXFAST / s; - n += !n; - } -+ if (xalloc_oversized (n, s)) -+ xalloc_die (); - } - else - { - /* Set N = floor (1.5 * N) + 1 so that progress is made even if N == 0. -- Check for overflow, so that N * S stays in size_t range. -- The check may be slightly conservative, but an exact check isn't -- worth the trouble. */ -- if ((size_t) -1 / 3 * 2 / s <= n) -+ Check for overflow, so that N * S stays in both ptrdiff_t and -+ size_t range. The check may be slightly conservative, but an -+ exact check isn't worth the trouble. */ -+ if ((PTRDIFF_MAX < SIZE_MAX ? PTRDIFF_MAX : SIZE_MAX) / 3 * 2 / s -+ <= n) - xalloc_die (); - n += n / 2 + 1; - } -diff -durN inetutils-1.9.4.orig/lib/xalloc-die.c inetutils-1.9.4/lib/xalloc-die.c ---- inetutils-1.9.4.orig/lib/xalloc-die.c 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/lib/xalloc-die.c 2017-05-15 17:51:42.937500000 +0800 -@@ -1,6 +1,6 @@ - /* Report a memory allocation failure and exit. - -- Copyright (C) 1997-2000, 2002-2004, 2006, 2009-2015 Free Software -+ Copyright (C) 1997-2000, 2002-2004, 2006, 2009-2017 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/xalloc-oversized.h inetutils-1.9.4/lib/xalloc-oversized.h ---- inetutils-1.9.4.orig/lib/xalloc-oversized.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/xalloc-oversized.h 2017-05-15 17:51:43.078125000 +0800 -@@ -1,6 +1,6 @@ - /* xalloc-oversized.h -- memory allocation size checking - -- Copyright (C) 1990-2000, 2003-2004, 2006-2015 Free Software Foundation, Inc. -+ Copyright (C) 1990-2000, 2003-2004, 2006-2017 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,23 +16,45 @@ - along with this program. If not, see . */ - - #ifndef XALLOC_OVERSIZED_H_ --# define XALLOC_OVERSIZED_H_ -- --# include -+#define XALLOC_OVERSIZED_H_ - --/* Return 1 if an array of N objects, each of size S, cannot exist due -- to size arithmetic overflow. S must be positive and N must be -- nonnegative. This is a macro, not a function, so that it -- works correctly even when SIZE_MAX < N. -+#include -+#include - -+/* True if N * S would overflow in a size_t calculation, -+ or would generate a value larger than PTRDIFF_MAX. -+ This expands to a constant expression if N and S are both constants. - By gnulib convention, SIZE_MAX represents overflow in size -- calculations, so the conservative dividend to use here is -- SIZE_MAX - 1, since SIZE_MAX might represent an overflowed value. -- However, malloc (SIZE_MAX) fails on all known hosts where -- sizeof (ptrdiff_t) <= sizeof (size_t), so do not bother to test for -- exactly-SIZE_MAX allocations on such hosts; this avoids a test and -- branch when S is known to be 1. */ -+ calculations, so the conservative size_t-based dividend to use here -+ is SIZE_MAX - 1. */ -+#define __xalloc_oversized(n, s) \ -+ ((size_t) (PTRDIFF_MAX < SIZE_MAX ? PTRDIFF_MAX : SIZE_MAX - 1) / (s) < (n)) -+ -+#if PTRDIFF_MAX < SIZE_MAX -+typedef ptrdiff_t __xalloc_count_type; -+#else -+typedef size_t __xalloc_count_type; -+#endif -+ -+/* Return 1 if an array of N objects, each of size S, cannot exist -+ reliably due to size or ptrdiff_t arithmetic overflow. S must be -+ positive and N must be nonnegative. This is a macro, not a -+ function, so that it works correctly even when SIZE_MAX < N. */ -+ -+#if 7 <= __GNUC__ - # define xalloc_oversized(n, s) \ -- ((size_t) (sizeof (ptrdiff_t) <= sizeof (size_t) ? -1 : -2) / (s) < (n)) -+ __builtin_mul_overflow_p (n, s, (__xalloc_count_type) 1) -+#elif 5 <= __GNUC__ && !__STRICT_ANSI__ -+# define xalloc_oversized(n, s) \ -+ (__builtin_constant_p (n) && __builtin_constant_p (s) \ -+ ? __xalloc_oversized (n, s) \ -+ : ({ __xalloc_count_type __xalloc_count; \ -+ __builtin_mul_overflow (n, s, &__xalloc_count); })) -+ -+/* Other compilers use integer division; this may be slower but is -+ more portable. */ -+#else -+# define xalloc_oversized(n, s) __xalloc_oversized (n, s) -+#endif - - #endif /* !XALLOC_OVERSIZED_H_ */ -diff -durN inetutils-1.9.4.orig/lib/xasprintf.c inetutils-1.9.4/lib/xasprintf.c ---- inetutils-1.9.4.orig/lib/xasprintf.c 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/lib/xasprintf.c 2017-05-15 17:51:43.421875000 +0800 -@@ -1,5 +1,5 @@ - /* vasprintf and asprintf with out-of-memory checking. -- Copyright (C) 1999, 2002-2004, 2006, 2009-2015 Free Software Foundation, -+ Copyright (C) 1999, 2002-2004, 2006, 2009-2017 Free Software Foundation, - Inc. - - This program is free software: you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/xgetcwd.c inetutils-1.9.4/lib/xgetcwd.c ---- inetutils-1.9.4.orig/lib/xgetcwd.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/xgetcwd.c 2017-05-15 17:51:43.625000000 +0800 -@@ -1,6 +1,6 @@ - /* xgetcwd.c -- return current directory with unlimited length - -- Copyright (C) 2001, 2003-2004, 2006-2007, 2009-2015 Free Software -+ Copyright (C) 2001, 2003-2004, 2006-2007, 2009-2017 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/xgetcwd.h inetutils-1.9.4/lib/xgetcwd.h ---- inetutils-1.9.4.orig/lib/xgetcwd.h 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/lib/xgetcwd.h 2017-05-15 17:51:43.828125000 +0800 -@@ -1,5 +1,5 @@ - /* prototype for xgetcwd -- Copyright (C) 1995, 2001, 2003, 2009-2015 Free Software Foundation, Inc. -+ Copyright (C) 1995, 2001, 2003, 2009-2017 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 -diff -durN inetutils-1.9.4.orig/lib/xgetdomainname.c inetutils-1.9.4/lib/xgetdomainname.c ---- inetutils-1.9.4.orig/lib/xgetdomainname.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/xgetdomainname.c 2017-05-15 17:51:43.968750000 +0800 -@@ -1,5 +1,5 @@ - /* xgetdomainname.c -- Return the NIS domain name, without size limitations. -- Copyright (C) 1992, 1996, 2000-2001, 2003-2004, 2006, 2008-2015 Free -+ Copyright (C) 1992, 1996, 2000-2001, 2003-2004, 2006, 2008-2017 Free - Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/xgetdomainname.h inetutils-1.9.4/lib/xgetdomainname.h ---- inetutils-1.9.4.orig/lib/xgetdomainname.h 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/lib/xgetdomainname.h 2017-05-15 17:51:44.156250000 +0800 -@@ -1,5 +1,5 @@ - /* xgetdomainname.h -- Return the NIS domain name, without size limitations. -- Copyright (C) 1992, 1996, 2000-2001, 2003, 2009-2015 Free Software -+ Copyright (C) 1992, 1996, 2000-2001, 2003, 2009-2017 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/xgethostname.c inetutils-1.9.4/lib/xgethostname.c ---- inetutils-1.9.4.orig/lib/xgethostname.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/xgethostname.c 2017-05-15 17:51:44.312500000 +0800 -@@ -1,6 +1,6 @@ - /* xgethostname.c -- return current hostname with unlimited length - -- Copyright (C) 1992, 1996, 2000-2001, 2003-2006, 2009-2015 Free Software -+ Copyright (C) 1992, 1996, 2000-2001, 2003-2006, 2009-2017 Free Software - Foundation, Inc. - - This program is free software: you can redistribute it and/or modify -diff -durN inetutils-1.9.4.orig/lib/xmalloc.c inetutils-1.9.4/lib/xmalloc.c ---- inetutils-1.9.4.orig/lib/xmalloc.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/xmalloc.c 2017-05-15 17:51:44.656250000 +0800 -@@ -1,6 +1,6 @@ - /* xmalloc.c -- malloc with out of memory checking - -- Copyright (C) 1990-2000, 2002-2006, 2008-2015 Free Software Foundation, Inc. -+ Copyright (C) 1990-2000, 2002-2006, 2008-2017 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 -@@ -93,11 +93,11 @@ - xcalloc (size_t n, size_t s) - { - void *p; -- /* Test for overflow, since some calloc implementations don't have -- proper overflow checks. But omit overflow and size-zero tests if -- HAVE_GNU_CALLOC, since GNU calloc catches overflow and never -- returns NULL if successful. */ -- if ((! HAVE_GNU_CALLOC && xalloc_oversized (n, s)) -+ /* Test for overflow, since objects with size greater than -+ PTRDIFF_MAX cause pointer subtraction to go awry. Omit size-zero -+ tests if HAVE_GNU_CALLOC, since GNU calloc never returns NULL if -+ successful. */ -+ if (xalloc_oversized (n, s) - || (! (p = calloc (n, s)) && (HAVE_GNU_CALLOC || n != 0))) - xalloc_die (); - return p; -diff -durN inetutils-1.9.4.orig/lib/xsize.h inetutils-1.9.4/lib/xsize.h ---- inetutils-1.9.4.orig/lib/xsize.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/xsize.h 2017-05-15 17:51:44.984375000 +0800 -@@ -1,6 +1,6 @@ - /* xsize.h -- Checked size_t computations. - -- Copyright (C) 2003, 2008-2015 Free Software Foundation, Inc. -+ Copyright (C) 2003, 2008-2017 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 -diff -durN inetutils-1.9.4.orig/lib/xvasprintf.c inetutils-1.9.4/lib/xvasprintf.c ---- inetutils-1.9.4.orig/lib/xvasprintf.c 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/xvasprintf.c 2017-05-15 17:51:45.140625000 +0800 -@@ -1,5 +1,5 @@ - /* vasprintf and asprintf with out-of-memory checking. -- Copyright (C) 1999, 2002-2004, 2006-2015 Free Software Foundation, Inc. -+ Copyright (C) 1999, 2002-2004, 2006-2017 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 -diff -durN inetutils-1.9.4.orig/lib/xvasprintf.h inetutils-1.9.4/lib/xvasprintf.h ---- inetutils-1.9.4.orig/lib/xvasprintf.h 2015-05-12 20:14:21.000000000 +0800 -+++ inetutils-1.9.4/lib/xvasprintf.h 2017-05-15 17:51:45.296875000 +0800 -@@ -1,5 +1,5 @@ - /* vasprintf and asprintf with out-of-memory checking. -- Copyright (C) 2002-2004, 2006-2015 Free Software Foundation, Inc. -+ Copyright (C) 2002-2004, 2006-2017 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 -diff -durN inetutils-1.9.4.orig/libicmp/Makefile.in inetutils-1.9.4/libicmp/Makefile.in ---- inetutils-1.9.4.orig/libicmp/Makefile.in 2015-06-09 15:48:09.000000000 +0800 -+++ inetutils-1.9.4/libicmp/Makefile.in 2017-05-15 17:58:16.734375000 +0800 -@@ -109,10 +109,18 @@ - host_triplet = @host@ - subdir = libicmp - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 --am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ -+am__aclocal_m4_deps = $(top_srcdir)/am/check_macro.m4 \ -+ $(top_srcdir)/am/check_member.m4 \ -+ $(top_srcdir)/am/check_weak_refs.m4 \ -+ $(top_srcdir)/am/config_paths.m4 $(top_srcdir)/am/enable.m4 \ -+ $(top_srcdir)/am/flushleft.m4 $(top_srcdir)/am/krb5.m4 \ -+ $(top_srcdir)/am/libcurses.m4 $(top_srcdir)/am/libidn.m4 \ -+ $(top_srcdir)/am/readline.m4 $(top_srcdir)/am/result.m4 \ -+ $(top_srcdir)/m4/00gnulib.m4 \ - $(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \ - $(top_srcdir)/m4/argp.m4 $(top_srcdir)/m4/arpa_inet_h.m4 \ - $(top_srcdir)/m4/autobuild.m4 $(top_srcdir)/m4/btowc.m4 \ -+ $(top_srcdir)/m4/builtin-expect.m4 \ - $(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/close.m4 \ - $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/codeset.m4 \ - $(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/d-ino.m4 \ -@@ -127,51 +135,56 @@ - $(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl.m4 \ - $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopendir.m4 \ - $(top_srcdir)/m4/filemode.m4 $(top_srcdir)/m4/filenamecat.m4 \ -- $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fnmatch.m4 \ -- $(top_srcdir)/m4/fopen.m4 $(top_srcdir)/m4/fseek.m4 \ -- $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/fstat.m4 \ -- $(top_srcdir)/m4/fstatat.m4 $(top_srcdir)/m4/ftell.m4 \ -- $(top_srcdir)/m4/ftello.m4 $(top_srcdir)/m4/getaddrinfo.m4 \ -+ $(top_srcdir)/m4/flexmember.m4 $(top_srcdir)/m4/float_h.m4 \ -+ $(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fopen.m4 \ -+ $(top_srcdir)/m4/fseek.m4 $(top_srcdir)/m4/fseeko.m4 \ -+ $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/fstatat.m4 \ -+ $(top_srcdir)/m4/ftell.m4 $(top_srcdir)/m4/ftello.m4 \ -+ $(top_srcdir)/m4/getaddrinfo.m4 \ - $(top_srcdir)/m4/getcwd-abort-bug.m4 \ - $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \ - $(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getdomainname.m4 \ - $(top_srcdir)/m4/getdtablesize.m4 \ - $(top_srcdir)/m4/getgroups.m4 $(top_srcdir)/m4/gethostname.m4 \ -- $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getlogin_r.m4 \ -- $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpass.m4 \ -+ $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getlogin.m4 \ -+ $(top_srcdir)/m4/getlogin_r.m4 $(top_srcdir)/m4/getopt.m4 \ -+ $(top_srcdir)/m4/getpass.m4 $(top_srcdir)/m4/getprogname.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettimeofday.m4 \ - $(top_srcdir)/m4/getugroups.m4 \ - $(top_srcdir)/m4/getusershell.m4 $(top_srcdir)/m4/glibc21.m4 \ - $(top_srcdir)/m4/glob.m4 $(top_srcdir)/m4/gnulib-common.m4 \ -- $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/hostent.m4 \ -+ $(top_srcdir)/m4/gnulib-comp.m4 \ -+ $(top_srcdir)/m4/hard-locale.m4 $(top_srcdir)/m4/hostent.m4 \ - $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inet_ntop.m4 \ - $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttostr.m4 \ - $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/ioctl.m4 \ - $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ -- $(top_srcdir)/m4/lib-prefix.m4 \ -+ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/limits-h.m4 \ - $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \ - $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \ - $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localeconv.m4 \ -- $(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/longlong.m4 \ -- $(top_srcdir)/m4/lseek.m4 $(top_srcdir)/m4/lstat.m4 \ -- $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \ -- $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \ -- $(top_srcdir)/m4/mbsrtowcs.m4 $(top_srcdir)/m4/mbstate_t.m4 \ -- $(top_srcdir)/m4/mbtowc.m4 $(top_srcdir)/m4/memchr.m4 \ -- $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/memrchr.m4 \ -- $(top_srcdir)/m4/mgetgroups.m4 $(top_srcdir)/m4/minmax.m4 \ -- $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mmap-anon.m4 \ -- $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \ -+ $(top_srcdir)/m4/localtime-buffer.m4 $(top_srcdir)/m4/lock.m4 \ -+ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \ -+ $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/malloc.m4 \ -+ $(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/mbrtowc.m4 \ -+ $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbsrtowcs.m4 \ -+ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ -+ $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mempcpy.m4 \ -+ $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/mgetgroups.m4 \ -+ $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkstemp.m4 \ -+ $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/mode_t.m4 \ -+ $(top_srcdir)/m4/msvc-inval.m4 \ - $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \ - $(top_srcdir)/m4/netdb_h.m4 $(top_srcdir)/m4/netinet_in_h.m4 \ - $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nocrash.m4 \ - $(top_srcdir)/m4/obstack.m4 $(top_srcdir)/m4/off_t.m4 \ -- $(top_srcdir)/m4/onceonly.m4 $(top_srcdir)/m4/open.m4 \ -- $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/opendir.m4 \ -- $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \ -- $(top_srcdir)/m4/poll.m4 $(top_srcdir)/m4/poll_h.m4 \ -- $(top_srcdir)/m4/posix_openpt.m4 $(top_srcdir)/m4/printf.m4 \ -+ $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/openat.m4 \ -+ $(top_srcdir)/m4/opendir.m4 $(top_srcdir)/m4/pathmax.m4 \ -+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/poll.m4 \ -+ $(top_srcdir)/m4/poll_h.m4 $(top_srcdir)/m4/posix_openpt.m4 \ -+ $(top_srcdir)/m4/printf.m4 \ -+ $(top_srcdir)/m4/pthread_rwlock_rdlock.m4 \ - $(top_srcdir)/m4/pty.m4 $(top_srcdir)/m4/pty_h.m4 \ - $(top_srcdir)/m4/rawmemchr.m4 $(top_srcdir)/m4/read-file.m4 \ - $(top_srcdir)/m4/readdir.m4 $(top_srcdir)/m4/readutmp.m4 \ -@@ -208,14 +221,7 @@ - $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctype_h.m4 \ - $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \ - $(top_srcdir)/m4/xgetcwd.m4 $(top_srcdir)/m4/xsize.m4 \ -- $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/am/check_macro.m4 \ -- $(top_srcdir)/am/check_member.m4 \ -- $(top_srcdir)/am/check_weak_refs.m4 \ -- $(top_srcdir)/am/config_paths.m4 $(top_srcdir)/am/enable.m4 \ -- $(top_srcdir)/am/flushleft.m4 $(top_srcdir)/am/krb5.m4 \ -- $(top_srcdir)/am/libcurses.m4 $(top_srcdir)/am/libidn.m4 \ -- $(top_srcdir)/am/readline.m4 $(top_srcdir)/am/result.m4 \ -- $(top_srcdir)/configure.ac -+ $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/configure.ac - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) - DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ -@@ -337,6 +343,7 @@ - FTPD_LIBPAM = @FTPD_LIBPAM@ - GETADDRINFO_LIB = @GETADDRINFO_LIB@ - GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ -+GETOPT_CDEFS_H = @GETOPT_CDEFS_H@ - GETOPT_H = @GETOPT_H@ - GLIBC21 = @GLIBC21@ - GLOB_H = @GLOB_H@ -@@ -353,6 +360,7 @@ - GNULIB_CLOSE = @GNULIB_CLOSE@ - GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ - GNULIB_CONNECT = @GNULIB_CONNECT@ -+GNULIB_CTIME = @GNULIB_CTIME@ - GNULIB_DIRFD = @GNULIB_DIRFD@ - GNULIB_DPRINTF = @GNULIB_DPRINTF@ - GNULIB_DUP = @GNULIB_DUP@ -@@ -431,6 +439,7 @@ - GNULIB_LINKAT = @GNULIB_LINKAT@ - GNULIB_LISTEN = @GNULIB_LISTEN@ - GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ -+GNULIB_LOCALTIME = @GNULIB_LOCALTIME@ - GNULIB_LSEEK = @GNULIB_LSEEK@ - GNULIB_LSTAT = @GNULIB_LSTAT@ - GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ -@@ -478,6 +487,8 @@ - GNULIB_OPENAT = @GNULIB_OPENAT@ - GNULIB_OPENDIR = @GNULIB_OPENDIR@ - GNULIB_OPENPTY = @GNULIB_OPENPTY@ -+GNULIB_OVERRIDES_STRUCT_STAT = @GNULIB_OVERRIDES_STRUCT_STAT@ -+GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@ - GNULIB_PCLOSE = @GNULIB_PCLOSE@ - GNULIB_PERROR = @GNULIB_PERROR@ - GNULIB_PIPE = @GNULIB_PIPE@ -@@ -544,6 +555,7 @@ - GNULIB_STRDUP = @GNULIB_STRDUP@ - GNULIB_STRERROR = @GNULIB_STRERROR@ - GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ -+GNULIB_STRFTIME = @GNULIB_STRFTIME@ - GNULIB_STRNCAT = @GNULIB_STRNCAT@ - GNULIB_STRNDUP = @GNULIB_STRNDUP@ - GNULIB_STRNLEN = @GNULIB_STRNLEN@ -@@ -563,9 +575,12 @@ - GNULIB_TCGETSID = @GNULIB_TCGETSID@ - GNULIB_TIMEGM = @GNULIB_TIMEGM@ - GNULIB_TIME_R = @GNULIB_TIME_R@ -+GNULIB_TIME_RZ = @GNULIB_TIME_RZ@ - GNULIB_TMPFILE = @GNULIB_TMPFILE@ - GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ -+GNULIB_TRUNCATE = @GNULIB_TRUNCATE@ - GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -+GNULIB_TZSET = @GNULIB_TZSET@ - GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ - GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ - GNULIB_UNLINK = @GNULIB_UNLINK@ -@@ -595,6 +610,7 @@ - GNULIB_WCSCPY = @GNULIB_WCSCPY@ - GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ - GNULIB_WCSDUP = @GNULIB_WCSDUP@ -+GNULIB_WCSFTIME = @GNULIB_WCSFTIME@ - GNULIB_WCSLEN = @GNULIB_WCSLEN@ - GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ - GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ -@@ -628,9 +644,11 @@ - HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ - HAVE_ATOLL = @HAVE_ATOLL@ - HAVE_BTOWC = @HAVE_BTOWC@ -+HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@ - HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ - HAVE_CHOWN = @HAVE_CHOWN@ - HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ -+HAVE_CRTDEFS_H = @HAVE_CRTDEFS_H@ - HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ - HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ - HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ -@@ -646,6 +664,7 @@ - HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ - HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ - HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ -+HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@ - HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ - HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ - HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ -@@ -764,6 +783,7 @@ - HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ - HAVE_PTY_H = @HAVE_PTY_H@ - HAVE_PWRITE = @HAVE_PWRITE@ -+HAVE_QSORT_R = @HAVE_QSORT_R@ - HAVE_RAISE = @HAVE_RAISE@ - HAVE_RANDOM = @HAVE_RANDOM@ - HAVE_RANDOM_H = @HAVE_RANDOM_H@ -@@ -825,7 +845,10 @@ - HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@ - HAVE_TERMIOS_H = @HAVE_TERMIOS_H@ - HAVE_TIMEGM = @HAVE_TIMEGM@ -+HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@ -+HAVE_TRUNCATE = @HAVE_TRUNCATE@ - HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ -+HAVE_TZSET = @HAVE_TZSET@ - HAVE_UNISTD_H = @HAVE_UNISTD_H@ - HAVE_UNLINKAT = @HAVE_UNLINKAT@ - HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ -@@ -848,6 +871,7 @@ - HAVE_WCSCPY = @HAVE_WCSCPY@ - HAVE_WCSCSPN = @HAVE_WCSCSPN@ - HAVE_WCSDUP = @HAVE_WCSDUP@ -+HAVE_WCSFTIME = @HAVE_WCSFTIME@ - HAVE_WCSLEN = @HAVE_WCSLEN@ - HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ - HAVE_WCSNCAT = @HAVE_WCSNCAT@ -@@ -915,8 +939,10 @@ - LIBTHREAD = @LIBTHREAD@ - LIBUTIL = @LIBUTIL@ - LIBWRAP = @LIBWRAP@ -+LIB_GETLOGIN = @LIB_GETLOGIN@ - LIB_POLL = @LIB_POLL@ - LIB_SELECT = @LIB_SELECT@ -+LIMITS_H = @LIMITS_H@ - LN_S = @LN_S@ - LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ - LOCALE_FR = @LOCALE_FR@ -@@ -943,6 +969,7 @@ - NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ - NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ - NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ -+NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@ - NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ - NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ - NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ -@@ -975,6 +1002,7 @@ - NEXT_FLOAT_H = @NEXT_FLOAT_H@ - NEXT_GETOPT_H = @NEXT_GETOPT_H@ - NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ -+NEXT_LIMITS_H = @NEXT_LIMITS_H@ - NEXT_LOCALE_H = @NEXT_LOCALE_H@ - NEXT_NETDB_H = @NEXT_NETDB_H@ - NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ -@@ -1022,6 +1050,7 @@ - REPLACE_CHOWN = @REPLACE_CHOWN@ - REPLACE_CLOSE = @REPLACE_CLOSE@ - REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ -+REPLACE_CTIME = @REPLACE_CTIME@ - REPLACE_DIRFD = @REPLACE_DIRFD@ - REPLACE_DPRINTF = @REPLACE_DPRINTF@ - REPLACE_DUP = @REPLACE_DUP@ -@@ -1133,6 +1162,7 @@ - REPLACE_STRDUP = @REPLACE_STRDUP@ - REPLACE_STRERROR = @REPLACE_STRERROR@ - REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ -+REPLACE_STRFTIME = @REPLACE_STRFTIME@ - REPLACE_STRNCAT = @REPLACE_STRNCAT@ - REPLACE_STRNDUP = @REPLACE_STRNDUP@ - REPLACE_STRNLEN = @REPLACE_STRNLEN@ -@@ -1147,7 +1177,9 @@ - REPLACE_TIMEGM = @REPLACE_TIMEGM@ - REPLACE_TMPFILE = @REPLACE_TMPFILE@ - REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ -+REPLACE_TRUNCATE = @REPLACE_TRUNCATE@ - REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ -+REPLACE_TZSET = @REPLACE_TZSET@ - REPLACE_UNLINK = @REPLACE_UNLINK@ - REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ - REPLACE_UNSETENV = @REPLACE_UNSETENV@ -@@ -1160,6 +1192,7 @@ - REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ - REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ - REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ -+REPLACE_WCSFTIME = @REPLACE_WCSFTIME@ - REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ - REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ - REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ -@@ -1196,6 +1229,8 @@ - WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ - WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ - WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ -+WINDOWS_STAT_INODES = @WINDOWS_STAT_INODES@ -+WINDOWS_STAT_TIMESPEC = @WINDOWS_STAT_TIMESPEC@ - WINT_T_SUFFIX = @WINT_T_SUFFIX@ - YACC = @YACC@ - YFLAGS = @YFLAGS@ -diff -durN inetutils-1.9.4.orig/libinetutils/Makefile.in inetutils-1.9.4/libinetutils/Makefile.in ---- inetutils-1.9.4.orig/libinetutils/Makefile.in 2015-06-09 15:48:09.000000000 +0800 -+++ inetutils-1.9.4/libinetutils/Makefile.in 2017-05-15 17:58:17.000000000 +0800 -@@ -110,10 +110,18 @@ - host_triplet = @host@ - subdir = libinetutils - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 --am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ -+am__aclocal_m4_deps = $(top_srcdir)/am/check_macro.m4 \ -+ $(top_srcdir)/am/check_member.m4 \ -+ $(top_srcdir)/am/check_weak_refs.m4 \ -+ $(top_srcdir)/am/config_paths.m4 $(top_srcdir)/am/enable.m4 \ -+ $(top_srcdir)/am/flushleft.m4 $(top_srcdir)/am/krb5.m4 \ -+ $(top_srcdir)/am/libcurses.m4 $(top_srcdir)/am/libidn.m4 \ -+ $(top_srcdir)/am/readline.m4 $(top_srcdir)/am/result.m4 \ -+ $(top_srcdir)/m4/00gnulib.m4 \ - $(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \ - $(top_srcdir)/m4/argp.m4 $(top_srcdir)/m4/arpa_inet_h.m4 \ - $(top_srcdir)/m4/autobuild.m4 $(top_srcdir)/m4/btowc.m4 \ -+ $(top_srcdir)/m4/builtin-expect.m4 \ - $(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/close.m4 \ - $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/codeset.m4 \ - $(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/d-ino.m4 \ -@@ -128,51 +136,56 @@ - $(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl.m4 \ - $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopendir.m4 \ - $(top_srcdir)/m4/filemode.m4 $(top_srcdir)/m4/filenamecat.m4 \ -- $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fnmatch.m4 \ -- $(top_srcdir)/m4/fopen.m4 $(top_srcdir)/m4/fseek.m4 \ -- $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/fstat.m4 \ -- $(top_srcdir)/m4/fstatat.m4 $(top_srcdir)/m4/ftell.m4 \ -- $(top_srcdir)/m4/ftello.m4 $(top_srcdir)/m4/getaddrinfo.m4 \ -+ $(top_srcdir)/m4/flexmember.m4 $(top_srcdir)/m4/float_h.m4 \ -+ $(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fopen.m4 \ -+ $(top_srcdir)/m4/fseek.m4 $(top_srcdir)/m4/fseeko.m4 \ -+ $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/fstatat.m4 \ -+ $(top_srcdir)/m4/ftell.m4 $(top_srcdir)/m4/ftello.m4 \ -+ $(top_srcdir)/m4/getaddrinfo.m4 \ - $(top_srcdir)/m4/getcwd-abort-bug.m4 \ - $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \ - $(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getdomainname.m4 \ - $(top_srcdir)/m4/getdtablesize.m4 \ - $(top_srcdir)/m4/getgroups.m4 $(top_srcdir)/m4/gethostname.m4 \ -- $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getlogin_r.m4 \ -- $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpass.m4 \ -+ $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getlogin.m4 \ -+ $(top_srcdir)/m4/getlogin_r.m4 $(top_srcdir)/m4/getopt.m4 \ -+ $(top_srcdir)/m4/getpass.m4 $(top_srcdir)/m4/getprogname.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettimeofday.m4 \ - $(top_srcdir)/m4/getugroups.m4 \ - $(top_srcdir)/m4/getusershell.m4 $(top_srcdir)/m4/glibc21.m4 \ - $(top_srcdir)/m4/glob.m4 $(top_srcdir)/m4/gnulib-common.m4 \ -- $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/hostent.m4 \ -+ $(top_srcdir)/m4/gnulib-comp.m4 \ -+ $(top_srcdir)/m4/hard-locale.m4 $(top_srcdir)/m4/hostent.m4 \ - $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inet_ntop.m4 \ - $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttostr.m4 \ - $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/ioctl.m4 \ - $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ -- $(top_srcdir)/m4/lib-prefix.m4 \ -+ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/limits-h.m4 \ - $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \ - $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \ - $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localeconv.m4 \ -- $(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/longlong.m4 \ -- $(top_srcdir)/m4/lseek.m4 $(top_srcdir)/m4/lstat.m4 \ -- $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \ -- $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \ -- $(top_srcdir)/m4/mbsrtowcs.m4 $(top_srcdir)/m4/mbstate_t.m4 \ -- $(top_srcdir)/m4/mbtowc.m4 $(top_srcdir)/m4/memchr.m4 \ -- $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/memrchr.m4 \ -- $(top_srcdir)/m4/mgetgroups.m4 $(top_srcdir)/m4/minmax.m4 \ -- $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mmap-anon.m4 \ -- $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \ -+ $(top_srcdir)/m4/localtime-buffer.m4 $(top_srcdir)/m4/lock.m4 \ -+ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \ -+ $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/malloc.m4 \ -+ $(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/mbrtowc.m4 \ -+ $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbsrtowcs.m4 \ -+ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ -+ $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mempcpy.m4 \ -+ $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/mgetgroups.m4 \ -+ $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkstemp.m4 \ -+ $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/mode_t.m4 \ -+ $(top_srcdir)/m4/msvc-inval.m4 \ - $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \ - $(top_srcdir)/m4/netdb_h.m4 $(top_srcdir)/m4/netinet_in_h.m4 \ - $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nocrash.m4 \ - $(top_srcdir)/m4/obstack.m4 $(top_srcdir)/m4/off_t.m4 \ -- $(top_srcdir)/m4/onceonly.m4 $(top_srcdir)/m4/open.m4 \ -- $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/opendir.m4 \ -- $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \ -- $(top_srcdir)/m4/poll.m4 $(top_srcdir)/m4/poll_h.m4 \ -- $(top_srcdir)/m4/posix_openpt.m4 $(top_srcdir)/m4/printf.m4 \ -+ $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/openat.m4 \ -+ $(top_srcdir)/m4/opendir.m4 $(top_srcdir)/m4/pathmax.m4 \ -+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/poll.m4 \ -+ $(top_srcdir)/m4/poll_h.m4 $(top_srcdir)/m4/posix_openpt.m4 \ -+ $(top_srcdir)/m4/printf.m4 \ -+ $(top_srcdir)/m4/pthread_rwlock_rdlock.m4 \ - $(top_srcdir)/m4/pty.m4 $(top_srcdir)/m4/pty_h.m4 \ - $(top_srcdir)/m4/rawmemchr.m4 $(top_srcdir)/m4/read-file.m4 \ - $(top_srcdir)/m4/readdir.m4 $(top_srcdir)/m4/readutmp.m4 \ -@@ -209,14 +222,7 @@ - $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctype_h.m4 \ - $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \ - $(top_srcdir)/m4/xgetcwd.m4 $(top_srcdir)/m4/xsize.m4 \ -- $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/am/check_macro.m4 \ -- $(top_srcdir)/am/check_member.m4 \ -- $(top_srcdir)/am/check_weak_refs.m4 \ -- $(top_srcdir)/am/config_paths.m4 $(top_srcdir)/am/enable.m4 \ -- $(top_srcdir)/am/flushleft.m4 $(top_srcdir)/am/krb5.m4 \ -- $(top_srcdir)/am/libcurses.m4 $(top_srcdir)/am/libidn.m4 \ -- $(top_srcdir)/am/readline.m4 $(top_srcdir)/am/result.m4 \ -- $(top_srcdir)/configure.ac -+ $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/configure.ac - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) - DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ -@@ -342,6 +348,7 @@ - FTPD_LIBPAM = @FTPD_LIBPAM@ - GETADDRINFO_LIB = @GETADDRINFO_LIB@ - GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ -+GETOPT_CDEFS_H = @GETOPT_CDEFS_H@ - GETOPT_H = @GETOPT_H@ - GLIBC21 = @GLIBC21@ - GLOB_H = @GLOB_H@ -@@ -358,6 +365,7 @@ - GNULIB_CLOSE = @GNULIB_CLOSE@ - GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ - GNULIB_CONNECT = @GNULIB_CONNECT@ -+GNULIB_CTIME = @GNULIB_CTIME@ - GNULIB_DIRFD = @GNULIB_DIRFD@ - GNULIB_DPRINTF = @GNULIB_DPRINTF@ - GNULIB_DUP = @GNULIB_DUP@ -@@ -436,6 +444,7 @@ - GNULIB_LINKAT = @GNULIB_LINKAT@ - GNULIB_LISTEN = @GNULIB_LISTEN@ - GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ -+GNULIB_LOCALTIME = @GNULIB_LOCALTIME@ - GNULIB_LSEEK = @GNULIB_LSEEK@ - GNULIB_LSTAT = @GNULIB_LSTAT@ - GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ -@@ -483,6 +492,8 @@ - GNULIB_OPENAT = @GNULIB_OPENAT@ - GNULIB_OPENDIR = @GNULIB_OPENDIR@ - GNULIB_OPENPTY = @GNULIB_OPENPTY@ -+GNULIB_OVERRIDES_STRUCT_STAT = @GNULIB_OVERRIDES_STRUCT_STAT@ -+GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@ - GNULIB_PCLOSE = @GNULIB_PCLOSE@ - GNULIB_PERROR = @GNULIB_PERROR@ - GNULIB_PIPE = @GNULIB_PIPE@ -@@ -549,6 +560,7 @@ - GNULIB_STRDUP = @GNULIB_STRDUP@ - GNULIB_STRERROR = @GNULIB_STRERROR@ - GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ -+GNULIB_STRFTIME = @GNULIB_STRFTIME@ - GNULIB_STRNCAT = @GNULIB_STRNCAT@ - GNULIB_STRNDUP = @GNULIB_STRNDUP@ - GNULIB_STRNLEN = @GNULIB_STRNLEN@ -@@ -568,9 +580,12 @@ - GNULIB_TCGETSID = @GNULIB_TCGETSID@ - GNULIB_TIMEGM = @GNULIB_TIMEGM@ - GNULIB_TIME_R = @GNULIB_TIME_R@ -+GNULIB_TIME_RZ = @GNULIB_TIME_RZ@ - GNULIB_TMPFILE = @GNULIB_TMPFILE@ - GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ -+GNULIB_TRUNCATE = @GNULIB_TRUNCATE@ - GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -+GNULIB_TZSET = @GNULIB_TZSET@ - GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ - GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ - GNULIB_UNLINK = @GNULIB_UNLINK@ -@@ -600,6 +615,7 @@ - GNULIB_WCSCPY = @GNULIB_WCSCPY@ - GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ - GNULIB_WCSDUP = @GNULIB_WCSDUP@ -+GNULIB_WCSFTIME = @GNULIB_WCSFTIME@ - GNULIB_WCSLEN = @GNULIB_WCSLEN@ - GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ - GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ -@@ -633,9 +649,11 @@ - HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ - HAVE_ATOLL = @HAVE_ATOLL@ - HAVE_BTOWC = @HAVE_BTOWC@ -+HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@ - HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ - HAVE_CHOWN = @HAVE_CHOWN@ - HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ -+HAVE_CRTDEFS_H = @HAVE_CRTDEFS_H@ - HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ - HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ - HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ -@@ -651,6 +669,7 @@ - HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ - HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ - HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ -+HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@ - HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ - HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ - HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ -@@ -769,6 +788,7 @@ - HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ - HAVE_PTY_H = @HAVE_PTY_H@ - HAVE_PWRITE = @HAVE_PWRITE@ -+HAVE_QSORT_R = @HAVE_QSORT_R@ - HAVE_RAISE = @HAVE_RAISE@ - HAVE_RANDOM = @HAVE_RANDOM@ - HAVE_RANDOM_H = @HAVE_RANDOM_H@ -@@ -830,7 +850,10 @@ - HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@ - HAVE_TERMIOS_H = @HAVE_TERMIOS_H@ - HAVE_TIMEGM = @HAVE_TIMEGM@ -+HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@ -+HAVE_TRUNCATE = @HAVE_TRUNCATE@ - HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ -+HAVE_TZSET = @HAVE_TZSET@ - HAVE_UNISTD_H = @HAVE_UNISTD_H@ - HAVE_UNLINKAT = @HAVE_UNLINKAT@ - HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ -@@ -853,6 +876,7 @@ - HAVE_WCSCPY = @HAVE_WCSCPY@ - HAVE_WCSCSPN = @HAVE_WCSCSPN@ - HAVE_WCSDUP = @HAVE_WCSDUP@ -+HAVE_WCSFTIME = @HAVE_WCSFTIME@ - HAVE_WCSLEN = @HAVE_WCSLEN@ - HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ - HAVE_WCSNCAT = @HAVE_WCSNCAT@ -@@ -920,8 +944,10 @@ - LIBTHREAD = @LIBTHREAD@ - LIBUTIL = @LIBUTIL@ - LIBWRAP = @LIBWRAP@ -+LIB_GETLOGIN = @LIB_GETLOGIN@ - LIB_POLL = @LIB_POLL@ - LIB_SELECT = @LIB_SELECT@ -+LIMITS_H = @LIMITS_H@ - LN_S = @LN_S@ - LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ - LOCALE_FR = @LOCALE_FR@ -@@ -948,6 +974,7 @@ - NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ - NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ - NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ -+NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@ - NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ - NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ - NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ -@@ -980,6 +1007,7 @@ - NEXT_FLOAT_H = @NEXT_FLOAT_H@ - NEXT_GETOPT_H = @NEXT_GETOPT_H@ - NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ -+NEXT_LIMITS_H = @NEXT_LIMITS_H@ - NEXT_LOCALE_H = @NEXT_LOCALE_H@ - NEXT_NETDB_H = @NEXT_NETDB_H@ - NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ -@@ -1027,6 +1055,7 @@ - REPLACE_CHOWN = @REPLACE_CHOWN@ - REPLACE_CLOSE = @REPLACE_CLOSE@ - REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ -+REPLACE_CTIME = @REPLACE_CTIME@ - REPLACE_DIRFD = @REPLACE_DIRFD@ - REPLACE_DPRINTF = @REPLACE_DPRINTF@ - REPLACE_DUP = @REPLACE_DUP@ -@@ -1138,6 +1167,7 @@ - REPLACE_STRDUP = @REPLACE_STRDUP@ - REPLACE_STRERROR = @REPLACE_STRERROR@ - REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ -+REPLACE_STRFTIME = @REPLACE_STRFTIME@ - REPLACE_STRNCAT = @REPLACE_STRNCAT@ - REPLACE_STRNDUP = @REPLACE_STRNDUP@ - REPLACE_STRNLEN = @REPLACE_STRNLEN@ -@@ -1152,7 +1182,9 @@ - REPLACE_TIMEGM = @REPLACE_TIMEGM@ - REPLACE_TMPFILE = @REPLACE_TMPFILE@ - REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ -+REPLACE_TRUNCATE = @REPLACE_TRUNCATE@ - REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ -+REPLACE_TZSET = @REPLACE_TZSET@ - REPLACE_UNLINK = @REPLACE_UNLINK@ - REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ - REPLACE_UNSETENV = @REPLACE_UNSETENV@ -@@ -1165,6 +1197,7 @@ - REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ - REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ - REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ -+REPLACE_WCSFTIME = @REPLACE_WCSFTIME@ - REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ - REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ - REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ -@@ -1201,6 +1234,8 @@ - WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ - WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ - WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ -+WINDOWS_STAT_INODES = @WINDOWS_STAT_INODES@ -+WINDOWS_STAT_TIMESPEC = @WINDOWS_STAT_TIMESPEC@ - WINT_T_SUFFIX = @WINT_T_SUFFIX@ - YACC = @YACC@ - YFLAGS = @YFLAGS@ -diff -durN inetutils-1.9.4.orig/libls/Makefile.in inetutils-1.9.4/libls/Makefile.in ---- inetutils-1.9.4.orig/libls/Makefile.in 2015-06-09 15:48:10.000000000 +0800 -+++ inetutils-1.9.4/libls/Makefile.in 2017-05-15 17:58:17.265625000 +0800 -@@ -109,10 +109,18 @@ - host_triplet = @host@ - subdir = libls - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 --am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ -+am__aclocal_m4_deps = $(top_srcdir)/am/check_macro.m4 \ -+ $(top_srcdir)/am/check_member.m4 \ -+ $(top_srcdir)/am/check_weak_refs.m4 \ -+ $(top_srcdir)/am/config_paths.m4 $(top_srcdir)/am/enable.m4 \ -+ $(top_srcdir)/am/flushleft.m4 $(top_srcdir)/am/krb5.m4 \ -+ $(top_srcdir)/am/libcurses.m4 $(top_srcdir)/am/libidn.m4 \ -+ $(top_srcdir)/am/readline.m4 $(top_srcdir)/am/result.m4 \ -+ $(top_srcdir)/m4/00gnulib.m4 \ - $(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \ - $(top_srcdir)/m4/argp.m4 $(top_srcdir)/m4/arpa_inet_h.m4 \ - $(top_srcdir)/m4/autobuild.m4 $(top_srcdir)/m4/btowc.m4 \ -+ $(top_srcdir)/m4/builtin-expect.m4 \ - $(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/close.m4 \ - $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/codeset.m4 \ - $(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/d-ino.m4 \ -@@ -127,51 +135,56 @@ - $(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl.m4 \ - $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopendir.m4 \ - $(top_srcdir)/m4/filemode.m4 $(top_srcdir)/m4/filenamecat.m4 \ -- $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fnmatch.m4 \ -- $(top_srcdir)/m4/fopen.m4 $(top_srcdir)/m4/fseek.m4 \ -- $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/fstat.m4 \ -- $(top_srcdir)/m4/fstatat.m4 $(top_srcdir)/m4/ftell.m4 \ -- $(top_srcdir)/m4/ftello.m4 $(top_srcdir)/m4/getaddrinfo.m4 \ -+ $(top_srcdir)/m4/flexmember.m4 $(top_srcdir)/m4/float_h.m4 \ -+ $(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fopen.m4 \ -+ $(top_srcdir)/m4/fseek.m4 $(top_srcdir)/m4/fseeko.m4 \ -+ $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/fstatat.m4 \ -+ $(top_srcdir)/m4/ftell.m4 $(top_srcdir)/m4/ftello.m4 \ -+ $(top_srcdir)/m4/getaddrinfo.m4 \ - $(top_srcdir)/m4/getcwd-abort-bug.m4 \ - $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \ - $(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getdomainname.m4 \ - $(top_srcdir)/m4/getdtablesize.m4 \ - $(top_srcdir)/m4/getgroups.m4 $(top_srcdir)/m4/gethostname.m4 \ -- $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getlogin_r.m4 \ -- $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpass.m4 \ -+ $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getlogin.m4 \ -+ $(top_srcdir)/m4/getlogin_r.m4 $(top_srcdir)/m4/getopt.m4 \ -+ $(top_srcdir)/m4/getpass.m4 $(top_srcdir)/m4/getprogname.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettimeofday.m4 \ - $(top_srcdir)/m4/getugroups.m4 \ - $(top_srcdir)/m4/getusershell.m4 $(top_srcdir)/m4/glibc21.m4 \ - $(top_srcdir)/m4/glob.m4 $(top_srcdir)/m4/gnulib-common.m4 \ -- $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/hostent.m4 \ -+ $(top_srcdir)/m4/gnulib-comp.m4 \ -+ $(top_srcdir)/m4/hard-locale.m4 $(top_srcdir)/m4/hostent.m4 \ - $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inet_ntop.m4 \ - $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttostr.m4 \ - $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/ioctl.m4 \ - $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ -- $(top_srcdir)/m4/lib-prefix.m4 \ -+ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/limits-h.m4 \ - $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \ - $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \ - $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localeconv.m4 \ -- $(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/longlong.m4 \ -- $(top_srcdir)/m4/lseek.m4 $(top_srcdir)/m4/lstat.m4 \ -- $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \ -- $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \ -- $(top_srcdir)/m4/mbsrtowcs.m4 $(top_srcdir)/m4/mbstate_t.m4 \ -- $(top_srcdir)/m4/mbtowc.m4 $(top_srcdir)/m4/memchr.m4 \ -- $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/memrchr.m4 \ -- $(top_srcdir)/m4/mgetgroups.m4 $(top_srcdir)/m4/minmax.m4 \ -- $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mmap-anon.m4 \ -- $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \ -+ $(top_srcdir)/m4/localtime-buffer.m4 $(top_srcdir)/m4/lock.m4 \ -+ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \ -+ $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/malloc.m4 \ -+ $(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/mbrtowc.m4 \ -+ $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbsrtowcs.m4 \ -+ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ -+ $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mempcpy.m4 \ -+ $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/mgetgroups.m4 \ -+ $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkstemp.m4 \ -+ $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/mode_t.m4 \ -+ $(top_srcdir)/m4/msvc-inval.m4 \ - $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \ - $(top_srcdir)/m4/netdb_h.m4 $(top_srcdir)/m4/netinet_in_h.m4 \ - $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nocrash.m4 \ - $(top_srcdir)/m4/obstack.m4 $(top_srcdir)/m4/off_t.m4 \ -- $(top_srcdir)/m4/onceonly.m4 $(top_srcdir)/m4/open.m4 \ -- $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/opendir.m4 \ -- $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \ -- $(top_srcdir)/m4/poll.m4 $(top_srcdir)/m4/poll_h.m4 \ -- $(top_srcdir)/m4/posix_openpt.m4 $(top_srcdir)/m4/printf.m4 \ -+ $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/openat.m4 \ -+ $(top_srcdir)/m4/opendir.m4 $(top_srcdir)/m4/pathmax.m4 \ -+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/poll.m4 \ -+ $(top_srcdir)/m4/poll_h.m4 $(top_srcdir)/m4/posix_openpt.m4 \ -+ $(top_srcdir)/m4/printf.m4 \ -+ $(top_srcdir)/m4/pthread_rwlock_rdlock.m4 \ - $(top_srcdir)/m4/pty.m4 $(top_srcdir)/m4/pty_h.m4 \ - $(top_srcdir)/m4/rawmemchr.m4 $(top_srcdir)/m4/read-file.m4 \ - $(top_srcdir)/m4/readdir.m4 $(top_srcdir)/m4/readutmp.m4 \ -@@ -208,14 +221,7 @@ - $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctype_h.m4 \ - $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \ - $(top_srcdir)/m4/xgetcwd.m4 $(top_srcdir)/m4/xsize.m4 \ -- $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/am/check_macro.m4 \ -- $(top_srcdir)/am/check_member.m4 \ -- $(top_srcdir)/am/check_weak_refs.m4 \ -- $(top_srcdir)/am/config_paths.m4 $(top_srcdir)/am/enable.m4 \ -- $(top_srcdir)/am/flushleft.m4 $(top_srcdir)/am/krb5.m4 \ -- $(top_srcdir)/am/libcurses.m4 $(top_srcdir)/am/libidn.m4 \ -- $(top_srcdir)/am/readline.m4 $(top_srcdir)/am/result.m4 \ -- $(top_srcdir)/configure.ac -+ $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/configure.ac - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) - DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ -@@ -337,6 +343,7 @@ - FTPD_LIBPAM = @FTPD_LIBPAM@ - GETADDRINFO_LIB = @GETADDRINFO_LIB@ - GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ -+GETOPT_CDEFS_H = @GETOPT_CDEFS_H@ - GETOPT_H = @GETOPT_H@ - GLIBC21 = @GLIBC21@ - GLOB_H = @GLOB_H@ -@@ -353,6 +360,7 @@ - GNULIB_CLOSE = @GNULIB_CLOSE@ - GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ - GNULIB_CONNECT = @GNULIB_CONNECT@ -+GNULIB_CTIME = @GNULIB_CTIME@ - GNULIB_DIRFD = @GNULIB_DIRFD@ - GNULIB_DPRINTF = @GNULIB_DPRINTF@ - GNULIB_DUP = @GNULIB_DUP@ -@@ -431,6 +439,7 @@ - GNULIB_LINKAT = @GNULIB_LINKAT@ - GNULIB_LISTEN = @GNULIB_LISTEN@ - GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ -+GNULIB_LOCALTIME = @GNULIB_LOCALTIME@ - GNULIB_LSEEK = @GNULIB_LSEEK@ - GNULIB_LSTAT = @GNULIB_LSTAT@ - GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ -@@ -478,6 +487,8 @@ - GNULIB_OPENAT = @GNULIB_OPENAT@ - GNULIB_OPENDIR = @GNULIB_OPENDIR@ - GNULIB_OPENPTY = @GNULIB_OPENPTY@ -+GNULIB_OVERRIDES_STRUCT_STAT = @GNULIB_OVERRIDES_STRUCT_STAT@ -+GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@ - GNULIB_PCLOSE = @GNULIB_PCLOSE@ - GNULIB_PERROR = @GNULIB_PERROR@ - GNULIB_PIPE = @GNULIB_PIPE@ -@@ -544,6 +555,7 @@ - GNULIB_STRDUP = @GNULIB_STRDUP@ - GNULIB_STRERROR = @GNULIB_STRERROR@ - GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ -+GNULIB_STRFTIME = @GNULIB_STRFTIME@ - GNULIB_STRNCAT = @GNULIB_STRNCAT@ - GNULIB_STRNDUP = @GNULIB_STRNDUP@ - GNULIB_STRNLEN = @GNULIB_STRNLEN@ -@@ -563,9 +575,12 @@ - GNULIB_TCGETSID = @GNULIB_TCGETSID@ - GNULIB_TIMEGM = @GNULIB_TIMEGM@ - GNULIB_TIME_R = @GNULIB_TIME_R@ -+GNULIB_TIME_RZ = @GNULIB_TIME_RZ@ - GNULIB_TMPFILE = @GNULIB_TMPFILE@ - GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ -+GNULIB_TRUNCATE = @GNULIB_TRUNCATE@ - GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -+GNULIB_TZSET = @GNULIB_TZSET@ - GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ - GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ - GNULIB_UNLINK = @GNULIB_UNLINK@ -@@ -595,6 +610,7 @@ - GNULIB_WCSCPY = @GNULIB_WCSCPY@ - GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ - GNULIB_WCSDUP = @GNULIB_WCSDUP@ -+GNULIB_WCSFTIME = @GNULIB_WCSFTIME@ - GNULIB_WCSLEN = @GNULIB_WCSLEN@ - GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ - GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ -@@ -628,9 +644,11 @@ - HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ - HAVE_ATOLL = @HAVE_ATOLL@ - HAVE_BTOWC = @HAVE_BTOWC@ -+HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@ - HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ - HAVE_CHOWN = @HAVE_CHOWN@ - HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ -+HAVE_CRTDEFS_H = @HAVE_CRTDEFS_H@ - HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ - HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ - HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ -@@ -646,6 +664,7 @@ - HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ - HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ - HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ -+HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@ - HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ - HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ - HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ -@@ -764,6 +783,7 @@ - HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ - HAVE_PTY_H = @HAVE_PTY_H@ - HAVE_PWRITE = @HAVE_PWRITE@ -+HAVE_QSORT_R = @HAVE_QSORT_R@ - HAVE_RAISE = @HAVE_RAISE@ - HAVE_RANDOM = @HAVE_RANDOM@ - HAVE_RANDOM_H = @HAVE_RANDOM_H@ -@@ -825,7 +845,10 @@ - HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@ - HAVE_TERMIOS_H = @HAVE_TERMIOS_H@ - HAVE_TIMEGM = @HAVE_TIMEGM@ -+HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@ -+HAVE_TRUNCATE = @HAVE_TRUNCATE@ - HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ -+HAVE_TZSET = @HAVE_TZSET@ - HAVE_UNISTD_H = @HAVE_UNISTD_H@ - HAVE_UNLINKAT = @HAVE_UNLINKAT@ - HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ -@@ -848,6 +871,7 @@ - HAVE_WCSCPY = @HAVE_WCSCPY@ - HAVE_WCSCSPN = @HAVE_WCSCSPN@ - HAVE_WCSDUP = @HAVE_WCSDUP@ -+HAVE_WCSFTIME = @HAVE_WCSFTIME@ - HAVE_WCSLEN = @HAVE_WCSLEN@ - HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ - HAVE_WCSNCAT = @HAVE_WCSNCAT@ -@@ -915,8 +939,10 @@ - LIBTHREAD = @LIBTHREAD@ - LIBUTIL = @LIBUTIL@ - LIBWRAP = @LIBWRAP@ -+LIB_GETLOGIN = @LIB_GETLOGIN@ - LIB_POLL = @LIB_POLL@ - LIB_SELECT = @LIB_SELECT@ -+LIMITS_H = @LIMITS_H@ - LN_S = @LN_S@ - LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ - LOCALE_FR = @LOCALE_FR@ -@@ -943,6 +969,7 @@ - NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ - NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ - NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ -+NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@ - NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ - NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ - NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ -@@ -975,6 +1002,7 @@ - NEXT_FLOAT_H = @NEXT_FLOAT_H@ - NEXT_GETOPT_H = @NEXT_GETOPT_H@ - NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ -+NEXT_LIMITS_H = @NEXT_LIMITS_H@ - NEXT_LOCALE_H = @NEXT_LOCALE_H@ - NEXT_NETDB_H = @NEXT_NETDB_H@ - NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ -@@ -1022,6 +1050,7 @@ - REPLACE_CHOWN = @REPLACE_CHOWN@ - REPLACE_CLOSE = @REPLACE_CLOSE@ - REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ -+REPLACE_CTIME = @REPLACE_CTIME@ - REPLACE_DIRFD = @REPLACE_DIRFD@ - REPLACE_DPRINTF = @REPLACE_DPRINTF@ - REPLACE_DUP = @REPLACE_DUP@ -@@ -1133,6 +1162,7 @@ - REPLACE_STRDUP = @REPLACE_STRDUP@ - REPLACE_STRERROR = @REPLACE_STRERROR@ - REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ -+REPLACE_STRFTIME = @REPLACE_STRFTIME@ - REPLACE_STRNCAT = @REPLACE_STRNCAT@ - REPLACE_STRNDUP = @REPLACE_STRNDUP@ - REPLACE_STRNLEN = @REPLACE_STRNLEN@ -@@ -1147,7 +1177,9 @@ - REPLACE_TIMEGM = @REPLACE_TIMEGM@ - REPLACE_TMPFILE = @REPLACE_TMPFILE@ - REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ -+REPLACE_TRUNCATE = @REPLACE_TRUNCATE@ - REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ -+REPLACE_TZSET = @REPLACE_TZSET@ - REPLACE_UNLINK = @REPLACE_UNLINK@ - REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ - REPLACE_UNSETENV = @REPLACE_UNSETENV@ -@@ -1160,6 +1192,7 @@ - REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ - REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ - REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ -+REPLACE_WCSFTIME = @REPLACE_WCSFTIME@ - REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ - REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ - REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ -@@ -1196,6 +1229,8 @@ - WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ - WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ - WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ -+WINDOWS_STAT_INODES = @WINDOWS_STAT_INODES@ -+WINDOWS_STAT_TIMESPEC = @WINDOWS_STAT_TIMESPEC@ - WINT_T_SUFFIX = @WINT_T_SUFFIX@ - YACC = @YACC@ - YFLAGS = @YFLAGS@ -diff -durN inetutils-1.9.4.orig/libtelnet/Makefile.in inetutils-1.9.4/libtelnet/Makefile.in ---- inetutils-1.9.4.orig/libtelnet/Makefile.in 2015-06-09 15:48:10.000000000 +0800 -+++ inetutils-1.9.4/libtelnet/Makefile.in 2017-05-15 17:58:17.531250000 +0800 -@@ -110,10 +110,18 @@ - host_triplet = @host@ - subdir = libtelnet - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 --am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ -+am__aclocal_m4_deps = $(top_srcdir)/am/check_macro.m4 \ -+ $(top_srcdir)/am/check_member.m4 \ -+ $(top_srcdir)/am/check_weak_refs.m4 \ -+ $(top_srcdir)/am/config_paths.m4 $(top_srcdir)/am/enable.m4 \ -+ $(top_srcdir)/am/flushleft.m4 $(top_srcdir)/am/krb5.m4 \ -+ $(top_srcdir)/am/libcurses.m4 $(top_srcdir)/am/libidn.m4 \ -+ $(top_srcdir)/am/readline.m4 $(top_srcdir)/am/result.m4 \ -+ $(top_srcdir)/m4/00gnulib.m4 \ - $(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \ - $(top_srcdir)/m4/argp.m4 $(top_srcdir)/m4/arpa_inet_h.m4 \ - $(top_srcdir)/m4/autobuild.m4 $(top_srcdir)/m4/btowc.m4 \ -+ $(top_srcdir)/m4/builtin-expect.m4 \ - $(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/close.m4 \ - $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/codeset.m4 \ - $(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/d-ino.m4 \ -@@ -128,51 +136,56 @@ - $(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl.m4 \ - $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopendir.m4 \ - $(top_srcdir)/m4/filemode.m4 $(top_srcdir)/m4/filenamecat.m4 \ -- $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fnmatch.m4 \ -- $(top_srcdir)/m4/fopen.m4 $(top_srcdir)/m4/fseek.m4 \ -- $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/fstat.m4 \ -- $(top_srcdir)/m4/fstatat.m4 $(top_srcdir)/m4/ftell.m4 \ -- $(top_srcdir)/m4/ftello.m4 $(top_srcdir)/m4/getaddrinfo.m4 \ -+ $(top_srcdir)/m4/flexmember.m4 $(top_srcdir)/m4/float_h.m4 \ -+ $(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fopen.m4 \ -+ $(top_srcdir)/m4/fseek.m4 $(top_srcdir)/m4/fseeko.m4 \ -+ $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/fstatat.m4 \ -+ $(top_srcdir)/m4/ftell.m4 $(top_srcdir)/m4/ftello.m4 \ -+ $(top_srcdir)/m4/getaddrinfo.m4 \ - $(top_srcdir)/m4/getcwd-abort-bug.m4 \ - $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \ - $(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getdomainname.m4 \ - $(top_srcdir)/m4/getdtablesize.m4 \ - $(top_srcdir)/m4/getgroups.m4 $(top_srcdir)/m4/gethostname.m4 \ -- $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getlogin_r.m4 \ -- $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpass.m4 \ -+ $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getlogin.m4 \ -+ $(top_srcdir)/m4/getlogin_r.m4 $(top_srcdir)/m4/getopt.m4 \ -+ $(top_srcdir)/m4/getpass.m4 $(top_srcdir)/m4/getprogname.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettimeofday.m4 \ - $(top_srcdir)/m4/getugroups.m4 \ - $(top_srcdir)/m4/getusershell.m4 $(top_srcdir)/m4/glibc21.m4 \ - $(top_srcdir)/m4/glob.m4 $(top_srcdir)/m4/gnulib-common.m4 \ -- $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/hostent.m4 \ -+ $(top_srcdir)/m4/gnulib-comp.m4 \ -+ $(top_srcdir)/m4/hard-locale.m4 $(top_srcdir)/m4/hostent.m4 \ - $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inet_ntop.m4 \ - $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttostr.m4 \ - $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/ioctl.m4 \ - $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ -- $(top_srcdir)/m4/lib-prefix.m4 \ -+ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/limits-h.m4 \ - $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \ - $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \ - $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localeconv.m4 \ -- $(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/longlong.m4 \ -- $(top_srcdir)/m4/lseek.m4 $(top_srcdir)/m4/lstat.m4 \ -- $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \ -- $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \ -- $(top_srcdir)/m4/mbsrtowcs.m4 $(top_srcdir)/m4/mbstate_t.m4 \ -- $(top_srcdir)/m4/mbtowc.m4 $(top_srcdir)/m4/memchr.m4 \ -- $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/memrchr.m4 \ -- $(top_srcdir)/m4/mgetgroups.m4 $(top_srcdir)/m4/minmax.m4 \ -- $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mmap-anon.m4 \ -- $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \ -+ $(top_srcdir)/m4/localtime-buffer.m4 $(top_srcdir)/m4/lock.m4 \ -+ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \ -+ $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/malloc.m4 \ -+ $(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/mbrtowc.m4 \ -+ $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbsrtowcs.m4 \ -+ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ -+ $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mempcpy.m4 \ -+ $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/mgetgroups.m4 \ -+ $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkstemp.m4 \ -+ $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/mode_t.m4 \ -+ $(top_srcdir)/m4/msvc-inval.m4 \ - $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \ - $(top_srcdir)/m4/netdb_h.m4 $(top_srcdir)/m4/netinet_in_h.m4 \ - $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nocrash.m4 \ - $(top_srcdir)/m4/obstack.m4 $(top_srcdir)/m4/off_t.m4 \ -- $(top_srcdir)/m4/onceonly.m4 $(top_srcdir)/m4/open.m4 \ -- $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/opendir.m4 \ -- $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \ -- $(top_srcdir)/m4/poll.m4 $(top_srcdir)/m4/poll_h.m4 \ -- $(top_srcdir)/m4/posix_openpt.m4 $(top_srcdir)/m4/printf.m4 \ -+ $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/openat.m4 \ -+ $(top_srcdir)/m4/opendir.m4 $(top_srcdir)/m4/pathmax.m4 \ -+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/poll.m4 \ -+ $(top_srcdir)/m4/poll_h.m4 $(top_srcdir)/m4/posix_openpt.m4 \ -+ $(top_srcdir)/m4/printf.m4 \ -+ $(top_srcdir)/m4/pthread_rwlock_rdlock.m4 \ - $(top_srcdir)/m4/pty.m4 $(top_srcdir)/m4/pty_h.m4 \ - $(top_srcdir)/m4/rawmemchr.m4 $(top_srcdir)/m4/read-file.m4 \ - $(top_srcdir)/m4/readdir.m4 $(top_srcdir)/m4/readutmp.m4 \ -@@ -209,14 +222,7 @@ - $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctype_h.m4 \ - $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \ - $(top_srcdir)/m4/xgetcwd.m4 $(top_srcdir)/m4/xsize.m4 \ -- $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/am/check_macro.m4 \ -- $(top_srcdir)/am/check_member.m4 \ -- $(top_srcdir)/am/check_weak_refs.m4 \ -- $(top_srcdir)/am/config_paths.m4 $(top_srcdir)/am/enable.m4 \ -- $(top_srcdir)/am/flushleft.m4 $(top_srcdir)/am/krb5.m4 \ -- $(top_srcdir)/am/libcurses.m4 $(top_srcdir)/am/libidn.m4 \ -- $(top_srcdir)/am/readline.m4 $(top_srcdir)/am/result.m4 \ -- $(top_srcdir)/configure.ac -+ $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/configure.ac - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) - DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ -@@ -340,6 +346,7 @@ - FTPD_LIBPAM = @FTPD_LIBPAM@ - GETADDRINFO_LIB = @GETADDRINFO_LIB@ - GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ -+GETOPT_CDEFS_H = @GETOPT_CDEFS_H@ - GETOPT_H = @GETOPT_H@ - GLIBC21 = @GLIBC21@ - GLOB_H = @GLOB_H@ -@@ -356,6 +363,7 @@ - GNULIB_CLOSE = @GNULIB_CLOSE@ - GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ - GNULIB_CONNECT = @GNULIB_CONNECT@ -+GNULIB_CTIME = @GNULIB_CTIME@ - GNULIB_DIRFD = @GNULIB_DIRFD@ - GNULIB_DPRINTF = @GNULIB_DPRINTF@ - GNULIB_DUP = @GNULIB_DUP@ -@@ -434,6 +442,7 @@ - GNULIB_LINKAT = @GNULIB_LINKAT@ - GNULIB_LISTEN = @GNULIB_LISTEN@ - GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ -+GNULIB_LOCALTIME = @GNULIB_LOCALTIME@ - GNULIB_LSEEK = @GNULIB_LSEEK@ - GNULIB_LSTAT = @GNULIB_LSTAT@ - GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ -@@ -481,6 +490,8 @@ - GNULIB_OPENAT = @GNULIB_OPENAT@ - GNULIB_OPENDIR = @GNULIB_OPENDIR@ - GNULIB_OPENPTY = @GNULIB_OPENPTY@ -+GNULIB_OVERRIDES_STRUCT_STAT = @GNULIB_OVERRIDES_STRUCT_STAT@ -+GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@ - GNULIB_PCLOSE = @GNULIB_PCLOSE@ - GNULIB_PERROR = @GNULIB_PERROR@ - GNULIB_PIPE = @GNULIB_PIPE@ -@@ -547,6 +558,7 @@ - GNULIB_STRDUP = @GNULIB_STRDUP@ - GNULIB_STRERROR = @GNULIB_STRERROR@ - GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ -+GNULIB_STRFTIME = @GNULIB_STRFTIME@ - GNULIB_STRNCAT = @GNULIB_STRNCAT@ - GNULIB_STRNDUP = @GNULIB_STRNDUP@ - GNULIB_STRNLEN = @GNULIB_STRNLEN@ -@@ -566,9 +578,12 @@ - GNULIB_TCGETSID = @GNULIB_TCGETSID@ - GNULIB_TIMEGM = @GNULIB_TIMEGM@ - GNULIB_TIME_R = @GNULIB_TIME_R@ -+GNULIB_TIME_RZ = @GNULIB_TIME_RZ@ - GNULIB_TMPFILE = @GNULIB_TMPFILE@ - GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ -+GNULIB_TRUNCATE = @GNULIB_TRUNCATE@ - GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -+GNULIB_TZSET = @GNULIB_TZSET@ - GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ - GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ - GNULIB_UNLINK = @GNULIB_UNLINK@ -@@ -598,6 +613,7 @@ - GNULIB_WCSCPY = @GNULIB_WCSCPY@ - GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ - GNULIB_WCSDUP = @GNULIB_WCSDUP@ -+GNULIB_WCSFTIME = @GNULIB_WCSFTIME@ - GNULIB_WCSLEN = @GNULIB_WCSLEN@ - GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ - GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ -@@ -631,9 +647,11 @@ - HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ - HAVE_ATOLL = @HAVE_ATOLL@ - HAVE_BTOWC = @HAVE_BTOWC@ -+HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@ - HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ - HAVE_CHOWN = @HAVE_CHOWN@ - HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ -+HAVE_CRTDEFS_H = @HAVE_CRTDEFS_H@ - HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ - HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ - HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ -@@ -649,6 +667,7 @@ - HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ - HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ - HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ -+HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@ - HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ - HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ - HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ -@@ -767,6 +786,7 @@ - HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ - HAVE_PTY_H = @HAVE_PTY_H@ - HAVE_PWRITE = @HAVE_PWRITE@ -+HAVE_QSORT_R = @HAVE_QSORT_R@ - HAVE_RAISE = @HAVE_RAISE@ - HAVE_RANDOM = @HAVE_RANDOM@ - HAVE_RANDOM_H = @HAVE_RANDOM_H@ -@@ -828,7 +848,10 @@ - HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@ - HAVE_TERMIOS_H = @HAVE_TERMIOS_H@ - HAVE_TIMEGM = @HAVE_TIMEGM@ -+HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@ -+HAVE_TRUNCATE = @HAVE_TRUNCATE@ - HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ -+HAVE_TZSET = @HAVE_TZSET@ - HAVE_UNISTD_H = @HAVE_UNISTD_H@ - HAVE_UNLINKAT = @HAVE_UNLINKAT@ - HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ -@@ -851,6 +874,7 @@ - HAVE_WCSCPY = @HAVE_WCSCPY@ - HAVE_WCSCSPN = @HAVE_WCSCSPN@ - HAVE_WCSDUP = @HAVE_WCSDUP@ -+HAVE_WCSFTIME = @HAVE_WCSFTIME@ - HAVE_WCSLEN = @HAVE_WCSLEN@ - HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ - HAVE_WCSNCAT = @HAVE_WCSNCAT@ -@@ -918,8 +942,10 @@ - LIBTHREAD = @LIBTHREAD@ - LIBUTIL = @LIBUTIL@ - LIBWRAP = @LIBWRAP@ -+LIB_GETLOGIN = @LIB_GETLOGIN@ - LIB_POLL = @LIB_POLL@ - LIB_SELECT = @LIB_SELECT@ -+LIMITS_H = @LIMITS_H@ - LN_S = @LN_S@ - LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ - LOCALE_FR = @LOCALE_FR@ -@@ -946,6 +972,7 @@ - NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ - NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ - NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ -+NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@ - NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ - NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ - NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ -@@ -978,6 +1005,7 @@ - NEXT_FLOAT_H = @NEXT_FLOAT_H@ - NEXT_GETOPT_H = @NEXT_GETOPT_H@ - NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ -+NEXT_LIMITS_H = @NEXT_LIMITS_H@ - NEXT_LOCALE_H = @NEXT_LOCALE_H@ - NEXT_NETDB_H = @NEXT_NETDB_H@ - NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ -@@ -1025,6 +1053,7 @@ - REPLACE_CHOWN = @REPLACE_CHOWN@ - REPLACE_CLOSE = @REPLACE_CLOSE@ - REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ -+REPLACE_CTIME = @REPLACE_CTIME@ - REPLACE_DIRFD = @REPLACE_DIRFD@ - REPLACE_DPRINTF = @REPLACE_DPRINTF@ - REPLACE_DUP = @REPLACE_DUP@ -@@ -1136,6 +1165,7 @@ - REPLACE_STRDUP = @REPLACE_STRDUP@ - REPLACE_STRERROR = @REPLACE_STRERROR@ - REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ -+REPLACE_STRFTIME = @REPLACE_STRFTIME@ - REPLACE_STRNCAT = @REPLACE_STRNCAT@ - REPLACE_STRNDUP = @REPLACE_STRNDUP@ - REPLACE_STRNLEN = @REPLACE_STRNLEN@ -@@ -1150,7 +1180,9 @@ - REPLACE_TIMEGM = @REPLACE_TIMEGM@ - REPLACE_TMPFILE = @REPLACE_TMPFILE@ - REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ -+REPLACE_TRUNCATE = @REPLACE_TRUNCATE@ - REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ -+REPLACE_TZSET = @REPLACE_TZSET@ - REPLACE_UNLINK = @REPLACE_UNLINK@ - REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ - REPLACE_UNSETENV = @REPLACE_UNSETENV@ -@@ -1163,6 +1195,7 @@ - REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ - REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ - REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ -+REPLACE_WCSFTIME = @REPLACE_WCSFTIME@ - REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ - REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ - REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ -@@ -1199,6 +1232,8 @@ - WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ - WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ - WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ -+WINDOWS_STAT_INODES = @WINDOWS_STAT_INODES@ -+WINDOWS_STAT_TIMESPEC = @WINDOWS_STAT_TIMESPEC@ - WINT_T_SUFFIX = @WINT_T_SUFFIX@ - YACC = @YACC@ - YFLAGS = @YFLAGS@ -diff -durN inetutils-1.9.4.orig/m4/00gnulib.m4 inetutils-1.9.4/m4/00gnulib.m4 ---- inetutils-1.9.4.orig/m4/00gnulib.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/00gnulib.m4 2017-05-15 17:51:45.453125000 +0800 -@@ -1,5 +1,5 @@ - # 00gnulib.m4 serial 3 --dnl Copyright (C) 2009-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/absolute-header.m4 inetutils-1.9.4/m4/absolute-header.m4 ---- inetutils-1.9.4.orig/m4/absolute-header.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/absolute-header.m4 2017-05-15 17:51:45.609375000 +0800 -@@ -1,5 +1,5 @@ - # absolute-header.m4 serial 16 --dnl Copyright (C) 2006-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2006-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/alloca.m4 inetutils-1.9.4/m4/alloca.m4 ---- inetutils-1.9.4.orig/m4/alloca.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/alloca.m4 2017-05-15 17:51:45.765625000 +0800 -@@ -1,5 +1,5 @@ - # alloca.m4 serial 14 --dnl Copyright (C) 2002-2004, 2006-2007, 2009-2015 Free Software Foundation, -+dnl Copyright (C) 2002-2004, 2006-2007, 2009-2017 Free Software Foundation, - dnl Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, -diff -durN inetutils-1.9.4.orig/m4/argp.m4 inetutils-1.9.4/m4/argp.m4 ---- inetutils-1.9.4.orig/m4/argp.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/argp.m4 2017-05-15 17:51:45.968750000 +0800 -@@ -1,5 +1,5 @@ --# argp.m4 serial 14 --dnl Copyright (C) 2003-2015 Free Software Foundation, Inc. -+# argp.m4 serial 15 -+dnl Copyright (C) 2003-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -@@ -54,6 +54,7 @@ - AC_CHECK_DECLS_ONCE([putchar_unlocked]) - AC_CHECK_FUNCS_ONCE([flockfile funlockfile]) - AC_CHECK_HEADERS_ONCE([features.h linewrap.h]) -+ AC_REQUIRE([AC_FUNC_STRERROR_R]) - ]) - - dnl argp-parse.c depends on GNU getopt internals, therefore use GNU getopt -diff -durN inetutils-1.9.4.orig/m4/arpa_inet_h.m4 inetutils-1.9.4/m4/arpa_inet_h.m4 ---- inetutils-1.9.4.orig/m4/arpa_inet_h.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/arpa_inet_h.m4 2017-05-15 17:51:46.109375000 +0800 -@@ -1,5 +1,5 @@ - # arpa_inet_h.m4 serial 13 --dnl Copyright (C) 2006, 2008-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2006, 2008-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/autobuild.m4 inetutils-1.9.4/m4/autobuild.m4 ---- inetutils-1.9.4.orig/m4/autobuild.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/autobuild.m4 2017-05-15 17:51:46.250000000 +0800 -@@ -1,5 +1,5 @@ - # autobuild.m4 serial 7 --dnl Copyright (C) 2004, 2006-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2004, 2006-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/btowc.m4 inetutils-1.9.4/m4/btowc.m4 ---- inetutils-1.9.4.orig/m4/btowc.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/btowc.m4 2017-05-15 17:51:46.421875000 +0800 -@@ -1,5 +1,5 @@ - # btowc.m4 serial 10 --dnl Copyright (C) 2008-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2008-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/builtin-expect.m4 inetutils-1.9.4/m4/builtin-expect.m4 ---- inetutils-1.9.4.orig/m4/builtin-expect.m4 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/m4/builtin-expect.m4 2017-05-15 17:51:46.546875000 +0800 -@@ -0,0 +1,49 @@ -+dnl Check for __builtin_expect. -+ -+dnl Copyright 2016-2017 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+dnl Written by Paul Eggert. -+ -+AC_DEFUN([gl___BUILTIN_EXPECT], -+[ -+ AC_CACHE_CHECK([for __builtin_expect], -+ [gl_cv___builtin_expect], -+ [AC_LINK_IFELSE( -+ [AC_LANG_SOURCE([[ -+ int -+ main (int argc, char **argv) -+ { -+ argc = __builtin_expect (argc, 100); -+ return argv[argc != 100][0]; -+ }]])], -+ [gl_cv___builtin_expect=yes], -+ [AC_LINK_IFELSE( -+ [AC_LANG_SOURCE([[ -+ #include -+ int -+ main (int argc, char **argv) -+ { -+ argc = __builtin_expect (argc, 100); -+ return argv[argc != 100][0]; -+ }]])], -+ [gl_cv___builtin_expect="in "], -+ [gl_cv___builtin_expect=no])])]) -+ if test "$gl_cv___builtin_expect" = yes; then -+ AC_DEFINE([HAVE___BUILTIN_EXPECT], [1]) -+ elif test "$gl_cv___builtin_expect" = "in "; then -+ AC_DEFINE([HAVE___BUILTIN_EXPECT], [2]) -+ fi -+ AH_VERBATIM([HAVE___BUILTIN_EXPECT], -+ [/* Define to 1 if the compiler supports __builtin_expect, -+ and to 2 if does. */ -+#undef HAVE___BUILTIN_EXPECT -+#ifndef HAVE___BUILTIN_EXPECT -+# define __builtin_expect(e, c) (e) -+#elif HAVE___BUILTIN_EXPECT == 2 -+# include -+#endif -+ ]) -+]) -diff -durN inetutils-1.9.4.orig/m4/chdir-long.m4 inetutils-1.9.4/m4/chdir-long.m4 ---- inetutils-1.9.4.orig/m4/chdir-long.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/chdir-long.m4 2017-05-15 17:51:46.703125000 +0800 -@@ -6,7 +6,7 @@ - # never fails with ENAMETOOLONG. - # Arrange to compile chdir-long.c only on systems that define PATH_MAX. - --dnl Copyright (C) 2004-2007, 2009-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2004-2007, 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/close.m4 inetutils-1.9.4/m4/close.m4 ---- inetutils-1.9.4.orig/m4/close.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/close.m4 2017-05-15 17:51:46.843750000 +0800 -@@ -1,5 +1,5 @@ --# close.m4 serial 8 --dnl Copyright (C) 2008-2015 Free Software Foundation, Inc. -+# close.m4 serial 9 -+dnl Copyright (C) 2008-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -@@ -7,10 +7,12 @@ - AC_DEFUN([gl_FUNC_CLOSE], - [ - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) -- AC_REQUIRE([gl_MSVC_INVAL]) -- if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then -- REPLACE_CLOSE=1 -- fi -+ m4_ifdef([gl_MSVC_INVAL], [ -+ AC_REQUIRE([gl_MSVC_INVAL]) -+ if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then -+ REPLACE_CLOSE=1 -+ fi -+ ]) - m4_ifdef([gl_PREREQ_SYS_H_WINSOCK2], [ - gl_PREREQ_SYS_H_WINSOCK2 - if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then -diff -durN inetutils-1.9.4.orig/m4/closedir.m4 inetutils-1.9.4/m4/closedir.m4 ---- inetutils-1.9.4.orig/m4/closedir.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/closedir.m4 2017-05-15 17:51:46.984375000 +0800 -@@ -1,5 +1,5 @@ --# closedir.m4 serial 2 --dnl Copyright (C) 2011-2015 Free Software Foundation, Inc. -+# closedir.m4 serial 5 -+dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -@@ -22,4 +22,9 @@ - fi - fi - ]) -+ dnl Replace closedir() for supporting the gnulib-defined dirfd() function. -+ case $host_os,$HAVE_CLOSEDIR in -+ os2*,1) -+ REPLACE_CLOSEDIR=1;; -+ esac - ]) -diff -durN inetutils-1.9.4.orig/m4/codeset.m4 inetutils-1.9.4/m4/codeset.m4 ---- inetutils-1.9.4.orig/m4/codeset.m4 2015-05-12 20:15:29.000000000 +0800 -+++ inetutils-1.9.4/m4/codeset.m4 2017-05-15 17:51:47.140625000 +0800 -@@ -1,5 +1,6 @@ - # codeset.m4 serial 5 (gettext-0.18.2) --dnl Copyright (C) 2000-2002, 2006, 2008-2014 Free Software Foundation, Inc. -+dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016 Free Software Foundation, -+dnl Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/configmake.m4 inetutils-1.9.4/m4/configmake.m4 ---- inetutils-1.9.4.orig/m4/configmake.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/configmake.m4 2017-05-15 17:51:47.296875000 +0800 -@@ -1,5 +1,5 @@ - # configmake.m4 serial 2 --dnl Copyright (C) 2010-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2010-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/d-ino.m4 inetutils-1.9.4/m4/d-ino.m4 ---- inetutils-1.9.4.orig/m4/d-ino.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/d-ino.m4 2017-05-15 17:51:47.437500000 +0800 -@@ -1,11 +1,11 @@ --# serial 14 -+# serial 15 - - dnl From Jim Meyering. - dnl - dnl Check whether struct dirent has a member named d_ino. - dnl - --# Copyright (C) 1997, 1999-2001, 2003-2004, 2006-2007, 2009-2015 Free Software -+# Copyright (C) 1997, 1999-2001, 2003-2004, 2006-2007, 2009-2017 Free Software - # Foundation, Inc. - - # This file is free software; the Free Software Foundation -@@ -34,6 +34,7 @@ - return 3; - if (e->d_ino != st.st_ino) - return 4; -+ closedir (dp); - return 0; - ]])], - [gl_cv_struct_dirent_d_ino=yes], -diff -durN inetutils-1.9.4.orig/m4/dirent_h.m4 inetutils-1.9.4/m4/dirent_h.m4 ---- inetutils-1.9.4.orig/m4/dirent_h.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/dirent_h.m4 2017-05-15 17:51:47.734375000 +0800 -@@ -1,5 +1,5 @@ - # dirent_h.m4 serial 16 --dnl Copyright (C) 2008-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2008-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/dirfd.m4 inetutils-1.9.4/m4/dirfd.m4 ---- inetutils-1.9.4.orig/m4/dirfd.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/dirfd.m4 2017-05-15 17:51:47.843750000 +0800 -@@ -1,8 +1,8 @@ --# serial 22 -*- Autoconf -*- -+# serial 24 -*- Autoconf -*- - - dnl Find out how to get the file descriptor associated with an open DIR*. - --# Copyright (C) 2001-2006, 2008-2015 Free Software Foundation, Inc. -+# Copyright (C) 2001-2006, 2008-2017 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. -@@ -35,13 +35,15 @@ - gl_cv_func_dirfd_macro=yes, - gl_cv_func_dirfd_macro=no)]) - -- # Use the replacement only if we have no function or macro with that name. -- if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then -- if test $ac_cv_have_decl_dirfd = yes; then -- # If the system declares dirfd already, let's declare rpl_dirfd instead. -+ # Use the replacement if we have no function or macro with that name, -+ # or if OS/2 kLIBC whose dirfd() does not work. -+ # Replace only if the system declares dirfd already. -+ case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in -+ no,no,*,yes | *,*,os2*,yes) - REPLACE_DIRFD=1 -- fi -- fi -+ AC_DEFINE([REPLACE_DIRFD], [1], -+ [Define to 1 if gnulib's dirfd() replacement is used.]);; -+ esac - ]) - - dnl Prerequisites of lib/dirfd.c. -diff -durN inetutils-1.9.4.orig/m4/dirname.m4 inetutils-1.9.4/m4/dirname.m4 ---- inetutils-1.9.4.orig/m4/dirname.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/dirname.m4 2017-05-15 17:51:47.968750000 +0800 -@@ -1,5 +1,5 @@ - #serial 10 -*- autoconf -*- --dnl Copyright (C) 2002-2006, 2009-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2002-2006, 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/double-slash-root.m4 inetutils-1.9.4/m4/double-slash-root.m4 ---- inetutils-1.9.4.orig/m4/double-slash-root.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/double-slash-root.m4 2017-05-15 17:51:48.093750000 +0800 -@@ -1,5 +1,5 @@ - # double-slash-root.m4 serial 4 -*- Autoconf -*- --dnl Copyright (C) 2006, 2008-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2006, 2008-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/d-type.m4 inetutils-1.9.4/m4/d-type.m4 ---- inetutils-1.9.4.orig/m4/d-type.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/d-type.m4 2017-05-15 17:51:47.562500000 +0800 -@@ -5,7 +5,7 @@ - dnl Check whether struct dirent has a member named d_type. - dnl - --# Copyright (C) 1997, 1999-2004, 2006, 2009-2015 Free Software Foundation, Inc. -+# Copyright (C) 1997, 1999-2004, 2006, 2009-2017 Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -diff -durN inetutils-1.9.4.orig/m4/dup.m4 inetutils-1.9.4/m4/dup.m4 ---- inetutils-1.9.4.orig/m4/dup.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/dup.m4 2017-05-15 17:51:48.281250000 +0800 -@@ -1,5 +1,5 @@ --# dup.m4 serial 3 --dnl Copyright (C) 2011-2015 Free Software Foundation, Inc. -+# dup.m4 serial 5 -+dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -@@ -7,10 +7,12 @@ - AC_DEFUN([gl_FUNC_DUP], - [ - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) -- AC_REQUIRE([gl_MSVC_INVAL]) -- if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then -- REPLACE_DUP=1 -- fi -+ m4_ifdef([gl_MSVC_INVAL], [ -+ AC_REQUIRE([gl_MSVC_INVAL]) -+ if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then -+ REPLACE_DUP=1 -+ fi -+ ]) - dnl Replace dup() for supporting the gnulib-defined fchdir() function, - dnl to keep fchdir's bookkeeping up-to-date. - m4_ifdef([gl_FUNC_FCHDIR], [ -@@ -19,6 +21,26 @@ - REPLACE_DUP=1 - fi - ]) -+ AC_CACHE_CHECK([whether dup works], [gl_cv_func_dup_works], -+ [AC_RUN_IFELSE( -+ [AC_LANG_PROGRAM([[#include -+ #include -+ #include ]], -+ [[/* On OS/2 kLIBC, dup does not work on a directory fd. */ -+ int fd = open (".", O_RDONLY); -+ return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0; -+ ]]) -+ ], -+ [gl_cv_func_dup_works=yes], -+ [gl_cv_func_dup_works=no], -+ [gl_cv_func_dup_works='guessing yes']) -+ ]) -+ case "$gl_cv_func_dup_works" in -+ *yes) ;; -+ *) -+ REPLACE_DUP=1 -+ ;; -+ esac - ]) - - # Prerequisites of lib/dup.c. -diff -durN inetutils-1.9.4.orig/m4/dup2.m4 inetutils-1.9.4/m4/dup2.m4 ---- inetutils-1.9.4.orig/m4/dup2.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/dup2.m4 2017-05-15 17:51:48.453125000 +0800 -@@ -1,5 +1,5 @@ --#serial 24 --dnl Copyright (C) 2002, 2005, 2007, 2009-2015 Free Software Foundation, Inc. -+#serial 25 -+dnl Copyright (C) 2002, 2005, 2007, 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -@@ -62,6 +62,16 @@ - result |= 32; - dup2 (2, 255); - dup2 (2, 256); -+ /* On OS/2 kLIBC, dup2() does not work on a directory fd. */ -+ { -+ int fd = open (".", O_RDONLY); -+ if (fd == -1) -+ result |= 64; -+ else if (dup2 (fd, fd + 1) == -1) -+ result |= 128; -+ -+ close (fd); -+ } - return result;]]) - ], - [gl_cv_func_dup2_works=yes], [gl_cv_func_dup2_works=no], -@@ -78,6 +88,8 @@ - gl_cv_func_dup2_works="guessing no" ;; - *-android*) # implemented using dup3(), which fails if oldfd == newfd - gl_cv_func_dup2_works="guessing no" ;; -+ os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd. -+ gl_cv_func_dup2_works="guessing no" ;; - *) gl_cv_func_dup2_works="guessing yes" ;; - esac]) - ]) -diff -durN inetutils-1.9.4.orig/m4/eealloc.m4 inetutils-1.9.4/m4/eealloc.m4 ---- inetutils-1.9.4.orig/m4/eealloc.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/eealloc.m4 2017-05-15 17:51:48.609375000 +0800 -@@ -1,5 +1,5 @@ - # eealloc.m4 serial 3 --dnl Copyright (C) 2003, 2009-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2003, 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/environ.m4 inetutils-1.9.4/m4/environ.m4 ---- inetutils-1.9.4.orig/m4/environ.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/environ.m4 2017-05-15 17:51:48.765625000 +0800 -@@ -1,5 +1,5 @@ - # environ.m4 serial 6 --dnl Copyright (C) 2001-2004, 2006-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2001-2004, 2006-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/errno_h.m4 inetutils-1.9.4/m4/errno_h.m4 ---- inetutils-1.9.4.orig/m4/errno_h.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/errno_h.m4 2017-05-15 17:51:48.921875000 +0800 -@@ -1,5 +1,5 @@ - # errno_h.m4 serial 12 --dnl Copyright (C) 2004, 2006, 2008-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2004, 2006, 2008-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/error.m4 inetutils-1.9.4/m4/error.m4 ---- inetutils-1.9.4.orig/m4/error.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/error.m4 2017-05-15 17:51:49.031250000 +0800 -@@ -1,6 +1,6 @@ - #serial 14 - --# Copyright (C) 1996-1998, 2001-2004, 2009-2015 Free Software Foundation, Inc. -+# Copyright (C) 1996-1998, 2001-2004, 2009-2017 Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -diff -durN inetutils-1.9.4.orig/m4/exponentd.m4 inetutils-1.9.4/m4/exponentd.m4 ---- inetutils-1.9.4.orig/m4/exponentd.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/exponentd.m4 2017-05-15 17:51:49.187500000 +0800 -@@ -1,5 +1,5 @@ - # exponentd.m4 serial 3 --dnl Copyright (C) 2007-2008, 2010-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2007-2008, 2010-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/extensions.m4 inetutils-1.9.4/m4/extensions.m4 ---- inetutils-1.9.4.orig/m4/extensions.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/extensions.m4 2017-05-15 17:51:49.312500000 +0800 -@@ -1,7 +1,7 @@ --# serial 13 -*- Autoconf -*- -+# serial 15 -*- Autoconf -*- - # Enable extensions on systems that normally disable them. - --# Copyright (C) 2003, 2006-2015 Free Software Foundation, Inc. -+# Copyright (C) 2003, 2006-2017 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. -@@ -60,7 +60,7 @@ - #ifndef _ALL_SOURCE - # undef _ALL_SOURCE - #endif --/* Enable general extensions on OS X. */ -+/* Enable general extensions on macOS. */ - #ifndef _DARWIN_C_SOURCE - # undef _DARWIN_C_SOURCE - #endif -@@ -68,14 +68,38 @@ - #ifndef _GNU_SOURCE - # undef _GNU_SOURCE - #endif --/* Use GNU style printf and scanf. */ --#ifndef __USE_MINGW_ANSI_STDIO --# undef __USE_MINGW_ANSI_STDIO --#endif - /* Enable threading extensions on Solaris. */ - #ifndef _POSIX_PTHREAD_SEMANTICS - # undef _POSIX_PTHREAD_SEMANTICS - #endif -+/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ -+#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ -+# undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ -+#endif -+/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ -+#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ -+# undef __STDC_WANT_IEC_60559_BFP_EXT__ -+#endif -+/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ -+#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ -+# undef __STDC_WANT_IEC_60559_DFP_EXT__ -+#endif -+/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ -+#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ -+# undef __STDC_WANT_IEC_60559_FUNCS_EXT__ -+#endif -+/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ -+#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ -+# undef __STDC_WANT_IEC_60559_TYPES_EXT__ -+#endif -+/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ -+#ifndef __STDC_WANT_LIB_EXT2__ -+# undef __STDC_WANT_LIB_EXT2__ -+#endif -+/* Enable extensions specified by ISO/IEC 24747:2009. */ -+#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ -+# undef __STDC_WANT_MATH_SPEC_FUNCS__ -+#endif - /* Enable extensions on HP NonStop. */ - #ifndef _TANDEM_SOURCE - # undef _TANDEM_SOURCE -@@ -104,8 +128,14 @@ - AC_DEFINE([_ALL_SOURCE]) - AC_DEFINE([_DARWIN_C_SOURCE]) - AC_DEFINE([_GNU_SOURCE]) -- AC_DEFINE([__USE_MINGW_ANSI_STDIO]) - AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) -+ AC_DEFINE([__STDC_WANT_IEC_60559_ATTRIBS_EXT__]) -+ AC_DEFINE([__STDC_WANT_IEC_60559_BFP_EXT__]) -+ AC_DEFINE([__STDC_WANT_IEC_60559_DFP_EXT__]) -+ AC_DEFINE([__STDC_WANT_IEC_60559_FUNCS_EXT__]) -+ AC_DEFINE([__STDC_WANT_IEC_60559_TYPES_EXT__]) -+ AC_DEFINE([__STDC_WANT_LIB_EXT2__]) -+ AC_DEFINE([__STDC_WANT_MATH_SPEC_FUNCS__]) - AC_DEFINE([_TANDEM_SOURCE]) - AC_CACHE_CHECK([whether _XOPEN_SOURCE should be defined], - [ac_cv_should_define__xopen_source], -diff -durN inetutils-1.9.4.orig/m4/extern-inline.m4 inetutils-1.9.4/m4/extern-inline.m4 ---- inetutils-1.9.4.orig/m4/extern-inline.m4 2015-05-12 20:15:29.000000000 +0800 -+++ inetutils-1.9.4/m4/extern-inline.m4 2017-05-15 17:51:49.437500000 +0800 -@@ -1,6 +1,6 @@ - dnl 'extern inline' a la ISO C99. - --dnl Copyright 2012-2015 Free Software Foundation, Inc. -+dnl Copyright 2012-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -@@ -54,6 +54,7 @@ - ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ - : (199901L <= __STDC_VERSION__ \ - && !defined __HP_cc \ -+ && !defined __PGI \ - && !(defined __SUNPRO_C && __STDC__))) \ - && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) - # define _GL_INLINE inline -diff -durN inetutils-1.9.4.orig/m4/fchdir.m4 inetutils-1.9.4/m4/fchdir.m4 ---- inetutils-1.9.4.orig/m4/fchdir.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/fchdir.m4 2017-05-15 17:51:49.578125000 +0800 -@@ -1,5 +1,5 @@ - # fchdir.m4 serial 21 --dnl Copyright (C) 2006-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2006-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/fcntl.m4 inetutils-1.9.4/m4/fcntl.m4 ---- inetutils-1.9.4.orig/m4/fcntl.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/fcntl.m4 2017-05-15 17:51:49.875000000 +0800 -@@ -1,5 +1,5 @@ --# fcntl.m4 serial 8 --dnl Copyright (C) 2009-2015 Free Software Foundation, Inc. -+# fcntl.m4 serial 9 -+dnl Copyright (C) 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -@@ -54,6 +54,17 @@ - if (errno != EINVAL) result |= 2; - if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4; - if (errno != EINVAL) result |= 8; -+ /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */ -+ { -+ int fd; -+ fd = open (".", O_RDONLY); -+ if (fd == -1) -+ result |= 16; -+ else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1) -+ result |= 32; -+ -+ close (fd); -+ } - return result;]])], - [gl_cv_func_fcntl_f_dupfd_works=yes], - [gl_cv_func_fcntl_f_dupfd_works=no], -diff -durN inetutils-1.9.4.orig/m4/fcntl_h.m4 inetutils-1.9.4/m4/fcntl_h.m4 ---- inetutils-1.9.4.orig/m4/fcntl_h.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/fcntl_h.m4 2017-05-15 17:51:50.046875000 +0800 -@@ -1,6 +1,6 @@ - # serial 15 - # Configure fcntl.h. --dnl Copyright (C) 2006-2007, 2009-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2006-2007, 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/fcntl-o.m4 inetutils-1.9.4/m4/fcntl-o.m4 ---- inetutils-1.9.4.orig/m4/fcntl-o.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/fcntl-o.m4 2017-05-15 17:51:49.703125000 +0800 -@@ -1,5 +1,5 @@ - # fcntl-o.m4 serial 4 --dnl Copyright (C) 2006, 2009-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/fdopendir.m4 inetutils-1.9.4/m4/fdopendir.m4 ---- inetutils-1.9.4.orig/m4/fdopendir.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/fdopendir.m4 2017-05-15 17:51:50.187500000 +0800 -@@ -1,7 +1,7 @@ - # serial 10 - # See if we need to provide fdopendir. - --dnl Copyright (C) 2009-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/filemode.m4 inetutils-1.9.4/m4/filemode.m4 ---- inetutils-1.9.4.orig/m4/filemode.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/filemode.m4 2017-05-15 17:51:50.390625000 +0800 -@@ -1,5 +1,5 @@ - # filemode.m4 serial 8 --dnl Copyright (C) 2002, 2005-2006, 2009-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2002, 2005-2006, 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/filenamecat.m4 inetutils-1.9.4/m4/filenamecat.m4 ---- inetutils-1.9.4.orig/m4/filenamecat.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/filenamecat.m4 2017-05-15 17:51:50.515625000 +0800 -@@ -1,5 +1,5 @@ - # filenamecat.m4 serial 11 --dnl Copyright (C) 2002-2006, 2009-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2002-2006, 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/flexmember.m4 inetutils-1.9.4/m4/flexmember.m4 ---- inetutils-1.9.4.orig/m4/flexmember.m4 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/m4/flexmember.m4 2017-05-15 17:51:50.656250000 +0800 -@@ -0,0 +1,46 @@ -+# serial 5 -+# Check for flexible array member support. -+ -+# Copyright (C) 2006, 2009-2017 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. -+ -+# Written by Paul Eggert. -+ -+AC_DEFUN([AC_C_FLEXIBLE_ARRAY_MEMBER], -+[ -+ AC_CACHE_CHECK([for flexible array member], -+ ac_cv_c_flexmember, -+ [AC_COMPILE_IFELSE( -+ [AC_LANG_PROGRAM( -+ [[#include -+ #include -+ #include -+ struct m { struct m *next, **list; char name[]; }; -+ struct s { struct s *p; struct m *m; int n; double d[]; };]], -+ [[int m = getchar (); -+ size_t nbytes = offsetof (struct s, d) + m * sizeof (double); -+ nbytes += sizeof (struct s) - 1; -+ nbytes -= nbytes % sizeof (struct s); -+ struct s *p = malloc (nbytes); -+ p->p = p; -+ p->m = NULL; -+ p->d[0] = 0.0; -+ return p->d != (double *) NULL;]])], -+ [ac_cv_c_flexmember=yes], -+ [ac_cv_c_flexmember=no])]) -+ if test $ac_cv_c_flexmember = yes; then -+ AC_DEFINE([FLEXIBLE_ARRAY_MEMBER], [], -+ [Define to nothing if C supports flexible array members, and to -+ 1 if it does not. That way, with a declaration like 'struct s -+ { int n; double d@<:@FLEXIBLE_ARRAY_MEMBER@:>@; };', the struct hack -+ can be used with pre-C99 compilers. -+ When computing the size of such an object, don't use 'sizeof (struct s)' -+ as it overestimates the size. Use 'offsetof (struct s, d)' instead. -+ Don't use 'offsetof (struct s, d@<:@0@:>@)', as this doesn't work with -+ MSVC and with C++ compilers.]) -+ else -+ AC_DEFINE([FLEXIBLE_ARRAY_MEMBER], [1]) -+ fi -+]) -diff -durN inetutils-1.9.4.orig/m4/float_h.m4 inetutils-1.9.4/m4/float_h.m4 ---- inetutils-1.9.4.orig/m4/float_h.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/float_h.m4 2017-05-15 17:51:50.812500000 +0800 -@@ -1,5 +1,5 @@ - # float_h.m4 serial 9 --dnl Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/fnmatch.m4 inetutils-1.9.4/m4/fnmatch.m4 ---- inetutils-1.9.4.orig/m4/fnmatch.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/fnmatch.m4 2017-05-15 17:51:50.968750000 +0800 -@@ -1,6 +1,6 @@ --# Check for fnmatch - serial 9. -+# Check for fnmatch - serial 9. -*- coding: utf-8 -*- - --# Copyright (C) 2000-2007, 2009-2015 Free Software Foundation, Inc. -+# Copyright (C) 2000-2007, 2009-2017 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. -diff -durN inetutils-1.9.4.orig/m4/fopen.m4 inetutils-1.9.4/m4/fopen.m4 ---- inetutils-1.9.4.orig/m4/fopen.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/fopen.m4 2017-05-15 17:51:51.125000000 +0800 -@@ -1,5 +1,5 @@ - # fopen.m4 serial 9 --dnl Copyright (C) 2007-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/fseek.m4 inetutils-1.9.4/m4/fseek.m4 ---- inetutils-1.9.4.orig/m4/fseek.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/fseek.m4 2017-05-15 17:51:51.265625000 +0800 -@@ -1,5 +1,5 @@ - # fseek.m4 serial 4 --dnl Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/fseeko.m4 inetutils-1.9.4/m4/fseeko.m4 ---- inetutils-1.9.4.orig/m4/fseeko.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/fseeko.m4 2017-05-15 17:51:51.390625000 +0800 -@@ -1,5 +1,5 @@ - # fseeko.m4 serial 17 --dnl Copyright (C) 2007-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/fstat.m4 inetutils-1.9.4/m4/fstat.m4 ---- inetutils-1.9.4.orig/m4/fstat.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/fstat.m4 2017-05-15 17:51:51.515625000 +0800 -@@ -1,22 +1,21 @@ --# fstat.m4 serial 4 --dnl Copyright (C) 2011-2015 Free Software Foundation, Inc. -+# fstat.m4 serial 5 -+dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. - - AC_DEFUN([gl_FUNC_FSTAT], - [ -+ AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) - -- AC_REQUIRE([gl_MSVC_INVAL]) -- if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then -- REPLACE_FSTAT=1 -- fi -- -- AC_REQUIRE([gl_HEADER_SYS_STAT_H]) -- if test $WINDOWS_64_BIT_ST_SIZE = 1; then -- REPLACE_FSTAT=1 -- fi -+ case "$host_os" in -+ mingw*) -+ dnl On this platform, the original stat() returns st_atime, st_mtime, -+ dnl st_ctime values that are affected by the time zone. -+ REPLACE_FSTAT=1 -+ ;; -+ esac - - dnl Replace fstat() for supporting the gnulib-defined open() on directories. - m4_ifdef([gl_FUNC_FCHDIR], [ -@@ -32,5 +31,8 @@ - ]) - ]) - --# Prerequisites of lib/fstat.c. --AC_DEFUN([gl_PREREQ_FSTAT], [:]) -+# Prerequisites of lib/fstat.c and lib/stat-w32.c. -+AC_DEFUN([gl_PREREQ_FSTAT], [ -+ AC_REQUIRE([gl_HEADER_SYS_STAT_H]) -+ : -+]) -diff -durN inetutils-1.9.4.orig/m4/fstatat.m4 inetutils-1.9.4/m4/fstatat.m4 ---- inetutils-1.9.4.orig/m4/fstatat.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/fstatat.m4 2017-05-15 17:51:51.625000000 +0800 -@@ -1,5 +1,5 @@ - # fstatat.m4 serial 3 --dnl Copyright (C) 2004-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2004-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/ftell.m4 inetutils-1.9.4/m4/ftell.m4 ---- inetutils-1.9.4.orig/m4/ftell.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/ftell.m4 2017-05-15 17:51:51.781250000 +0800 -@@ -1,5 +1,5 @@ - # ftell.m4 serial 3 --dnl Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/ftello.m4 inetutils-1.9.4/m4/ftello.m4 ---- inetutils-1.9.4.orig/m4/ftello.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/ftello.m4 2017-05-15 17:51:51.906250000 +0800 -@@ -1,5 +1,5 @@ - # ftello.m4 serial 11 --dnl Copyright (C) 2007-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/getaddrinfo.m4 inetutils-1.9.4/m4/getaddrinfo.m4 ---- inetutils-1.9.4.orig/m4/getaddrinfo.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/getaddrinfo.m4 2017-05-15 17:51:52.031250000 +0800 -@@ -1,5 +1,5 @@ --# getaddrinfo.m4 serial 30 --dnl Copyright (C) 2004-2015 Free Software Foundation, Inc. -+# getaddrinfo.m4 serial 31 -+dnl Copyright (C) 2004-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -@@ -8,7 +8,7 @@ - [ - AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl for HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H - AC_REQUIRE([gl_HEADER_NETDB])dnl for HAVE_NETDB_H -- AC_MSG_NOTICE([checking how to do getaddrinfo, freeaddrinfo and getnameinfo]) -+ AC_MSG_CHECKING([how to do getaddrinfo, freeaddrinfo and getnameinfo]) - GETADDRINFO_LIB= - gai_saved_LIBS="$LIBS" - -diff -durN inetutils-1.9.4.orig/m4/getcwd.m4 inetutils-1.9.4/m4/getcwd.m4 ---- inetutils-1.9.4.orig/m4/getcwd.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/getcwd.m4 2017-05-15 17:51:52.546875000 +0800 -@@ -1,12 +1,12 @@ - # getcwd.m4 - check for working getcwd that is compatible with glibc - --# Copyright (C) 2001, 2003-2007, 2009-2015 Free Software Foundation, Inc. -+# Copyright (C) 2001, 2003-2007, 2009-2017 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. - - # Written by Paul Eggert. --# serial 12 -+# serial 13 - - AC_DEFUN([gl_FUNC_GETCWD_NULL], - [ -@@ -15,6 +15,7 @@ - AC_CACHE_CHECK([whether getcwd (NULL, 0) allocates memory for result], - [gl_cv_func_getcwd_null], - [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -+# include - # if HAVE_UNISTD_H - # include - # else /* on Windows with MSVC */ -@@ -39,6 +40,7 @@ - return 3; - if (f[1] != '\0') - return 4; -+ free (f); - return 0; - } - #endif -diff -durN inetutils-1.9.4.orig/m4/getcwd-abort-bug.m4 inetutils-1.9.4/m4/getcwd-abort-bug.m4 ---- inetutils-1.9.4.orig/m4/getcwd-abort-bug.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/getcwd-abort-bug.m4 2017-05-15 17:51:52.171875000 +0800 -@@ -3,7 +3,7 @@ - # name is unusually large. Any length between 4k and 16k trigger the bug - # when using glibc-2.4.90-9 or older. - --# Copyright (C) 2006, 2009-2015 Free Software Foundation, Inc. -+# Copyright (C) 2006, 2009-2017 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. -diff -durN inetutils-1.9.4.orig/m4/getcwd-path-max.m4 inetutils-1.9.4/m4/getcwd-path-max.m4 ---- inetutils-1.9.4.orig/m4/getcwd-path-max.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/getcwd-path-max.m4 2017-05-15 17:51:52.328125000 +0800 -@@ -6,7 +6,7 @@ - # I've heard that this is due to a Linux kernel bug, and that it has - # been fixed between 2.4.21-pre3 and 2.4.21-pre4. - --# Copyright (C) 2003-2007, 2009-2015 Free Software Foundation, Inc. -+# Copyright (C) 2003-2007, 2009-2017 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. -diff -durN inetutils-1.9.4.orig/m4/getdelim.m4 inetutils-1.9.4/m4/getdelim.m4 ---- inetutils-1.9.4.orig/m4/getdelim.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/getdelim.m4 2017-05-15 17:51:52.671875000 +0800 -@@ -1,6 +1,6 @@ --# getdelim.m4 serial 10 -+# getdelim.m4 serial 11 - --dnl Copyright (C) 2005-2007, 2009-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2005-2007, 2009-2017 Free Software Foundation, Inc. - dnl - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, -@@ -48,7 +48,9 @@ - size_t siz = (size_t)(~0) / 4; - if (getdelim (&line, &siz, '\n', in) == -1) - return 3; -+ free (line); - } -+ fclose (in); - return 0; - } - ]])], [gl_cv_func_working_getdelim=yes] dnl The library version works. -diff -durN inetutils-1.9.4.orig/m4/getdomainname.m4 inetutils-1.9.4/m4/getdomainname.m4 ---- inetutils-1.9.4.orig/m4/getdomainname.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/getdomainname.m4 2017-05-15 17:51:52.796875000 +0800 -@@ -1,5 +1,5 @@ - # getdomainname.m4 serial 10 --dnl Copyright (C) 2002-2003, 2008-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2002-2003, 2008-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/getdtablesize.m4 inetutils-1.9.4/m4/getdtablesize.m4 ---- inetutils-1.9.4.orig/m4/getdtablesize.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/getdtablesize.m4 2017-05-15 17:51:52.906250000 +0800 -@@ -1,5 +1,5 @@ - # getdtablesize.m4 serial 6 --dnl Copyright (C) 2008-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2008-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/getgroups.m4 inetutils-1.9.4/m4/getgroups.m4 ---- inetutils-1.9.4.orig/m4/getgroups.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/getgroups.m4 2017-05-15 17:51:53.031250000 +0800 -@@ -1,9 +1,9 @@ --# serial 18 -+# serial 19 - - dnl From Jim Meyering. - dnl A wrapper around AC_FUNC_GETGROUPS. - --# Copyright (C) 1996-1997, 1999-2004, 2008-2015 Free Software Foundation, Inc. -+# Copyright (C) 1996-1997, 1999-2004, 2008-2017 Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -87,7 +87,9 @@ - [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], - [[int size = getgroups (0, 0); - gid_t *list = malloc (size * sizeof *list); -- return getgroups (-1, list) != -1;]])], -+ int result = getgroups (-1, list) != -1; -+ free (list); -+ return result;]])], - [gl_cv_func_getgroups_works=yes], - [gl_cv_func_getgroups_works=no], - [case "$host_os" in -diff -durN inetutils-1.9.4.orig/m4/gethostname.m4 inetutils-1.9.4/m4/gethostname.m4 ---- inetutils-1.9.4.orig/m4/gethostname.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/gethostname.m4 2017-05-15 17:51:53.140625000 +0800 -@@ -1,5 +1,5 @@ - # gethostname.m4 serial 13 --dnl Copyright (C) 2002, 2008-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2002, 2008-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/getline.m4 inetutils-1.9.4/m4/getline.m4 ---- inetutils-1.9.4.orig/m4/getline.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/getline.m4 2017-05-15 17:51:53.265625000 +0800 -@@ -1,6 +1,6 @@ --# getline.m4 serial 26 -+# getline.m4 serial 27 - --dnl Copyright (C) 1998-2003, 2005-2007, 2009-2015 Free Software Foundation, -+dnl Copyright (C) 1998-2003, 2005-2007, 2009-2017 Free Software Foundation, - dnl Inc. - dnl - dnl This file is free software; the Free Software Foundation -@@ -47,6 +47,7 @@ - int len = getline (&line, &siz, in); - if (!(len == 4 && line && strcmp (line, "foo\n") == 0)) - return 2; -+ free (line); - } - { - /* Test result for a NULL buffer and a non-zero size. -@@ -55,7 +56,9 @@ - size_t siz = (size_t)(~0) / 4; - if (getline (&line, &siz, in) == -1) - return 3; -+ free (line); - } -+ fclose (in); - return 0; - } - ]])], [am_cv_func_working_getline=yes] dnl The library version works. -diff -durN inetutils-1.9.4.orig/m4/getlogin.m4 inetutils-1.9.4/m4/getlogin.m4 ---- inetutils-1.9.4.orig/m4/getlogin.m4 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/m4/getlogin.m4 2017-05-15 17:51:53.406250000 +0800 -@@ -0,0 +1,32 @@ -+# getlogin.m4 serial 5 -+dnl Copyright (C) 2010-2017 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+AC_DEFUN([gl_FUNC_GETLOGIN], -+[ -+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) -+ AC_CHECK_DECLS_ONCE([getlogin]) -+ if test $ac_cv_have_decl_getlogin = no; then -+ HAVE_DECL_GETLOGIN=0 -+ fi -+ AC_CHECK_FUNCS_ONCE([getlogin]) -+ if test $ac_cv_func_getlogin = no; then -+ HAVE_GETLOGIN=0 -+ fi -+]) -+ -+dnl Determines the library needed by the implementation of the -+dnl getlogin and getlogin_r functions. -+AC_DEFUN([gl_LIB_GETLOGIN], -+[ -+ AC_REQUIRE([AC_CANONICAL_HOST]) -+ case $host_os in -+ mingw*) -+ LIB_GETLOGIN='-ladvapi32' ;; -+ *) -+ LIB_GETLOGIN= ;; -+ esac -+ AC_SUBST([LIB_GETLOGIN]) -+]) -diff -durN inetutils-1.9.4.orig/m4/getlogin_r.m4 inetutils-1.9.4/m4/getlogin_r.m4 ---- inetutils-1.9.4.orig/m4/getlogin_r.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/getlogin_r.m4 2017-05-15 17:51:53.546875000 +0800 -@@ -1,6 +1,6 @@ --#serial 11 -+#serial 12 - --# Copyright (C) 2005-2007, 2009-2015 Free Software Foundation, Inc. -+# Copyright (C) 2005-2007, 2009-2017 Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -30,8 +30,8 @@ - HAVE_GETLOGIN_R=0 - else - HAVE_GETLOGIN_R=1 -- dnl On OSF/1 5.1, getlogin_r returns a truncated result if the buffer is -- dnl not large enough. -+ dnl On Mac OS X 10.12 and OSF/1 5.1, getlogin_r returns a truncated result -+ dnl if the buffer is not large enough. - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_CACHE_CHECK([whether getlogin_r works with small buffers], - [gl_cv_func_getlogin_r_works], -@@ -39,15 +39,16 @@ - dnl Initial guess, used when cross-compiling. - changequote(,)dnl - case "$host_os" in -- # Guess no on OSF/1. -- osf*) gl_cv_func_getlogin_r_works="guessing no" ;; -- # Guess yes otherwise. -- *) gl_cv_func_getlogin_r_works="guessing yes" ;; -+ # Guess no on Mac OS X, OSF/1. -+ darwin* | osf*) gl_cv_func_getlogin_r_works="guessing no" ;; -+ # Guess yes otherwise. -+ *) gl_cv_func_getlogin_r_works="guessing yes" ;; - esac - changequote([,])dnl - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ - #include -+#include - #include - #if !HAVE_DECL_GETLOGIN_R - extern -@@ -63,16 +64,19 @@ - char buf[100]; - - if (getlogin_r (buf, 0) == 0) -- result |= 16; -+ result |= 1; - if (getlogin_r (buf, 1) == 0) -- result |= 17; -+ result |= 2; -+ if (getlogin_r (buf, 100) == 0) -+ { -+ size_t n = strlen (buf); -+ if (getlogin_r (buf, n) == 0) -+ result |= 4; -+ } - return result; - }]])], - [gl_cv_func_getlogin_r_works=yes], -- [case $? in -- 16 | 17) gl_cv_func_getlogin_r_works=no ;; -- esac -- ], -+ [gl_cv_func_getlogin_r_works=no], - [:]) - ]) - case "$gl_cv_func_getlogin_r_works" in -diff -durN inetutils-1.9.4.orig/m4/getopt.m4 inetutils-1.9.4/m4/getopt.m4 ---- inetutils-1.9.4.orig/m4/getopt.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/getopt.m4 2017-05-15 17:51:53.671875000 +0800 -@@ -1,5 +1,5 @@ --# getopt.m4 serial 44 --dnl Copyright (C) 2002-2006, 2008-2015 Free Software Foundation, Inc. -+# getopt.m4 serial 46 -+dnl Copyright (C) 2002-2006, 2008-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -@@ -32,9 +32,16 @@ - # getopt_long_only. - AC_DEFUN([gl_FUNC_GETOPT_GNU], - [ -+ dnl Set the variable gl_getopt_required, so that all invocations of -+ dnl gl_GETOPT_CHECK_HEADERS in the scope of the current configure file -+ dnl will check for getopt with GNU extensions. -+ dnl This means that if one gnulib-tool invocation requests getopt-posix -+ dnl and another gnulib-tool invocation requests getopt-gnu, it is as if -+ dnl both had requested getopt-gnu. - m4_divert_text([INIT_PREPARE], [gl_getopt_required=GNU]) - -- AC_REQUIRE([gl_FUNC_GETOPT_POSIX]) -+ dnl No need to invoke gl_FUNC_GETOPT_POSIX here; this is automatically -+ dnl done through the module dependency getopt-gnu -> getopt-posix. - ]) - - # Determine whether to replace the entire getopt facility. -@@ -354,15 +361,19 @@ - - AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER], - [ -- GETOPT_H=getopt.h -+ AC_CHECK_HEADERS_ONCE([sys/cdefs.h]) -+ if test $ac_cv_header_sys_cdefs_h = yes; then -+ HAVE_SYS_CDEFS_H=1 -+ else -+ HAVE_SYS_CDEFS_H=0 -+ fi -+ AC_SUBST([HAVE_SYS_CDEFS_H]) -+ - AC_DEFINE([__GETOPT_PREFIX], [[rpl_]], - [Define to rpl_ if the getopt replacement functions and variables - should be used.]) -+ GETOPT_H=getopt.h -+ GETOPT_CDEFS_H=getopt-cdefs.h - AC_SUBST([GETOPT_H]) --]) -- --# Prerequisites of lib/getopt*. --AC_DEFUN([gl_PREREQ_GETOPT], --[ -- AC_CHECK_DECLS_ONCE([getenv]) -+ AC_SUBST([GETOPT_CDEFS_H]) - ]) -diff -durN inetutils-1.9.4.orig/m4/getpass.m4 inetutils-1.9.4/m4/getpass.m4 ---- inetutils-1.9.4.orig/m4/getpass.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/getpass.m4 2017-05-15 17:51:53.812500000 +0800 -@@ -1,5 +1,5 @@ - # getpass.m4 serial 14 --dnl Copyright (C) 2002-2003, 2005-2006, 2009-2015 Free Software Foundation, -+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2017 Free Software Foundation, - dnl Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, -diff -durN inetutils-1.9.4.orig/m4/getprogname.m4 inetutils-1.9.4/m4/getprogname.m4 ---- inetutils-1.9.4.orig/m4/getprogname.m4 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/m4/getprogname.m4 2017-05-15 17:51:53.953125000 +0800 -@@ -0,0 +1,43 @@ -+# getprogname.m4 - check for getprogname or replacements for it -+ -+# Copyright (C) 2016-2017 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. -+ -+# serial 4 -+ -+AC_DEFUN([gl_FUNC_GETPROGNAME], -+[ -+ AC_CHECK_FUNCS_ONCE([getprogname getexecname]) -+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) -+ ac_found=0 -+ AC_CHECK_DECLS([program_invocation_name], [ac_found=1], [], -+ [#include ]) -+ AC_CHECK_DECLS([program_invocation_short_name], [ac_found=1], [], -+ [#include ]) -+ AC_CHECK_DECLS([__argv], [ac_found=1], [], [#include ]) -+ -+ # Incur the cost of this test only if none of the above worked. -+ if test $ac_found = 0; then -+ # On OpenBSD 5.1, using the global __progname variable appears to be -+ # the only way to implement getprogname. -+ AC_CACHE_CHECK([whether __progname is defined in default libraries], -+ [gl_cv_var___progname], -+ [ -+ gl_cv_var___progname= -+ AC_LINK_IFELSE( -+ [AC_LANG_PROGRAM( -+ [[extern char *__progname;]], -+ [[return *__progname;]] -+ )], -+ [gl_cv_var___progname=yes] -+ ) -+ ] -+ ) -+ if test "$gl_cv_var___progname" = yes; then -+ AC_DEFINE([HAVE_VAR___PROGNAME], 1, -+ [Define if you have a global __progname variable]) -+ fi -+ fi -+]) -diff -durN inetutils-1.9.4.orig/m4/gettext.m4 inetutils-1.9.4/m4/gettext.m4 ---- inetutils-1.9.4.orig/m4/gettext.m4 2015-05-12 20:15:30.000000000 +0800 -+++ inetutils-1.9.4/m4/gettext.m4 2017-05-15 17:51:54.078125000 +0800 -@@ -1,16 +1,16 @@ --# gettext.m4 serial 66 (gettext-0.18.2) --dnl Copyright (C) 1995-2014 Free Software Foundation, Inc. -+# gettext.m4 serial 68 (gettext-0.19.8) -+dnl Copyright (C) 1995-2014, 2016 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. - dnl --dnl This file can can be used in projects which are not available under -+dnl This file can be used in projects which are not available under - dnl the GNU General Public License or the GNU Library General Public - dnl License but which still want to provide support for the GNU gettext - dnl functionality. - dnl Please note that the actual code of the GNU gettext library is covered - dnl by the GNU Library General Public License, and the rest of the GNU --dnl gettext package package is covered by the GNU General Public License. -+dnl gettext package is covered by the GNU General Public License. - dnl They are *not* in the public domain. - - dnl Authors: -@@ -161,13 +161,18 @@ - [AC_LANG_PROGRAM( - [[ - #include --$gt_revision_test_code -+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION - extern int _nl_msg_cat_cntr; - extern int *_nl_domain_bindings; -+#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings) -+#else -+#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 -+#endif -+$gt_revision_test_code - ]], - [[ - bindtextdomain ("", ""); --return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings -+return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION - ]])], - [eval "$gt_func_gnugettext_libc=yes"], - [eval "$gt_func_gnugettext_libc=no"])]) -@@ -193,17 +198,22 @@ - [AC_LANG_PROGRAM( - [[ - #include --$gt_revision_test_code -+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION - extern int _nl_msg_cat_cntr; - extern - #ifdef __cplusplus - "C" - #endif - const char *_nl_expand_alias (const char *); -+#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) -+#else -+#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 -+#endif -+$gt_revision_test_code - ]], - [[ - bindtextdomain ("", ""); --return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") -+return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION - ]])], - [eval "$gt_func_gnugettext_libintl=yes"], - [eval "$gt_func_gnugettext_libintl=no"]) -@@ -214,17 +224,22 @@ - [AC_LANG_PROGRAM( - [[ - #include --$gt_revision_test_code -+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION - extern int _nl_msg_cat_cntr; - extern - #ifdef __cplusplus - "C" - #endif - const char *_nl_expand_alias (const char *); -+#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) -+#else -+#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 -+#endif -+$gt_revision_test_code - ]], - [[ - bindtextdomain ("", ""); --return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") -+return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION - ]])], - [LIBINTL="$LIBINTL $LIBICONV" - LTLIBINTL="$LTLIBINTL $LTLIBICONV" -@@ -399,3 +414,7 @@ - - dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) - AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) -+ -+ -+dnl Usage: AM_GNU_GETTEXT_REQUIRE_VERSION([gettext-version]) -+AC_DEFUN([AM_GNU_GETTEXT_REQUIRE_VERSION], []) -diff -durN inetutils-1.9.4.orig/m4/gettimeofday.m4 inetutils-1.9.4/m4/gettimeofday.m4 ---- inetutils-1.9.4.orig/m4/gettimeofday.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/gettimeofday.m4 2017-05-15 17:51:54.296875000 +0800 -@@ -1,6 +1,6 @@ --# serial 21 -+# serial 23 - --# Copyright (C) 2001-2003, 2005, 2007, 2009-2015 Free Software Foundation, Inc. -+# Copyright (C) 2001-2003, 2005, 2007, 2009-2017 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. -@@ -9,9 +9,10 @@ - - AC_DEFUN([gl_FUNC_GETTIMEOFDAY], - [ -+ AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS]) - AC_REQUIRE([AC_C_RESTRICT]) -+ AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([gl_HEADER_SYS_TIME_H]) -- AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS]) - AC_CHECK_FUNCS_ONCE([gettimeofday]) - - gl_gettimeofday_timezone=void -@@ -54,19 +55,11 @@ - if test $REPLACE_STRUCT_TIMEVAL = 1; then - REPLACE_GETTIMEOFDAY=1 - fi -- m4_ifdef([gl_FUNC_TZSET_CLOBBER], [ -- gl_FUNC_TZSET_CLOBBER -- case "$gl_cv_func_tzset_clobber" in -- *yes) -- REPLACE_GETTIMEOFDAY=1 -- gl_GETTIMEOFDAY_REPLACE_LOCALTIME -- AC_DEFINE([tzset], [rpl_tzset], -- [Define to rpl_tzset if the wrapper function should be used.]) -- AC_DEFINE([TZSET_CLOBBERS_LOCALTIME], [1], -- [Define if tzset clobbers localtime's static buffer.]) -- ;; -- esac -- ]) -+ dnl On mingw, the original gettimeofday has only a precision of 15.6 -+ dnl milliseconds. So override it. -+ case "$host_os" in -+ mingw*) REPLACE_GETTIMEOFDAY=1 ;; -+ esac - fi - AC_DEFINE_UNQUOTED([GETTIMEOFDAY_TIMEZONE], [$gl_gettimeofday_timezone], - [Define this to 'void' or 'struct timezone' to match the system's -@@ -85,6 +78,7 @@ - [ - AC_REQUIRE([gl_HEADER_SYS_TIME_H]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles -+ AC_REQUIRE([gl_LOCALTIME_BUFFER_DEFAULTS]) - - AC_CACHE_CHECK([whether gettimeofday clobbers localtime buffer], - [gl_cv_func_gettimeofday_clobber], -@@ -119,20 +113,12 @@ - case "$gl_cv_func_gettimeofday_clobber" in - *yes) - REPLACE_GETTIMEOFDAY=1 -- gl_GETTIMEOFDAY_REPLACE_LOCALTIME - AC_DEFINE([GETTIMEOFDAY_CLOBBERS_LOCALTIME], [1], - [Define if gettimeofday clobbers the localtime buffer.]) -+ gl_LOCALTIME_BUFFER_NEEDED - ;; - esac - ]) - --AC_DEFUN([gl_GETTIMEOFDAY_REPLACE_LOCALTIME], [ -- REPLACE_GMTIME=1 -- REPLACE_LOCALTIME=1 --]) -- - # Prerequisites of lib/gettimeofday.c. --AC_DEFUN([gl_PREREQ_GETTIMEOFDAY], [ -- AC_CHECK_HEADERS([sys/timeb.h]) -- AC_CHECK_FUNCS([_ftime]) --]) -+AC_DEFUN([gl_PREREQ_GETTIMEOFDAY], [:]) -diff -durN inetutils-1.9.4.orig/m4/getugroups.m4 inetutils-1.9.4/m4/getugroups.m4 ---- inetutils-1.9.4.orig/m4/getugroups.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/getugroups.m4 2017-05-15 17:51:54.453125000 +0800 -@@ -1,5 +1,5 @@ - # getugroups.m4 serial 9 --dnl Copyright (C) 2002-2003, 2005-2006, 2009-2015 Free Software Foundation, -+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2017 Free Software Foundation, - dnl Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, -diff -durN inetutils-1.9.4.orig/m4/getusershell.m4 inetutils-1.9.4/m4/getusershell.m4 ---- inetutils-1.9.4.orig/m4/getusershell.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/getusershell.m4 2017-05-15 17:51:54.609375000 +0800 -@@ -1,5 +1,5 @@ - # getusershell.m4 serial 7 --dnl Copyright (C) 2002-2003, 2006, 2008-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2002-2003, 2006, 2008-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/glibc2.m4 inetutils-1.9.4/m4/glibc2.m4 ---- inetutils-1.9.4.orig/m4/glibc2.m4 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/m4/glibc2.m4 2017-05-15 17:51:54.765625000 +0800 -@@ -0,0 +1,31 @@ -+# glibc2.m4 serial 3 -+dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2017 Free Software Foundation, -+dnl Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+# Test for the GNU C Library, version 2.0 or newer. -+# From Bruno Haible. -+ -+AC_DEFUN([gt_GLIBC2], -+ [ -+ AC_CACHE_CHECK([whether we are using the GNU C Library 2 or newer], -+ [ac_cv_gnu_library_2], -+ [AC_EGREP_CPP([Lucky GNU user], -+ [ -+#include -+#ifdef __GNU_LIBRARY__ -+ #if (__GLIBC__ >= 2) && !defined __UCLIBC__ -+ Lucky GNU user -+ #endif -+#endif -+ ], -+ [ac_cv_gnu_library_2=yes], -+ [ac_cv_gnu_library_2=no]) -+ ] -+ ) -+ AC_SUBST([GLIBC2]) -+ GLIBC2="$ac_cv_gnu_library_2" -+ ] -+) -diff -durN inetutils-1.9.4.orig/m4/glibc21.m4 inetutils-1.9.4/m4/glibc21.m4 ---- inetutils-1.9.4.orig/m4/glibc21.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/glibc21.m4 2017-05-15 17:51:54.921875000 +0800 -@@ -1,5 +1,5 @@ - # glibc21.m4 serial 5 --dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2015 Free Software Foundation, -+dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2017 Free Software Foundation, - dnl Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, -diff -durN inetutils-1.9.4.orig/m4/glob.m4 inetutils-1.9.4/m4/glob.m4 ---- inetutils-1.9.4.orig/m4/glob.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/glob.m4 2017-05-15 17:51:55.062500000 +0800 -@@ -1,5 +1,5 @@ - # glob.m4 serial 14 --dnl Copyright (C) 2005-2007, 2009-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2005-2007, 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/gnulib-cache.m4 inetutils-1.9.4/m4/gnulib-cache.m4 ---- inetutils-1.9.4.orig/m4/gnulib-cache.m4 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/m4/gnulib-cache.m4 2017-05-15 17:54:34.859375000 +0800 -@@ -0,0 +1,112 @@ -+# Copyright (C) 2002-2017 Free Software Foundation, Inc. -+# -+# 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 -+# the Free Software Foundation; either version 3 of the License, or -+# (at your option) any later version. -+# -+# This file 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 file. If not, see . -+# -+# As a special exception to the GNU General Public License, -+# this file may be distributed as part of a program that -+# contains a configuration script generated by Autoconf, under -+# the same distribution terms as the rest of that program. -+# -+# Generated by gnulib-tool. -+# -+# This file represents the specification of how gnulib-tool is used. -+# It acts as a cache: It is written and read by gnulib-tool. -+# In projects that use version control, this file is meant to be put under -+# version control, like the configure.ac and various Makefile.am files. -+ -+ -+# Specification in the form of a command-line invocation: -+# gnulib-tool --import --local-dir=gl --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --no-conditional-dependencies --no-libtool --macro-prefix=gl alloca alloca-opt argp argp-version-etc autobuild dirfd dirname-lgpl error exitfail extensions fdl-1.3 filemode forkpty gendocs getaddrinfo getcwd getline getopt-gnu getpass gettext gettext-h getusershell git-version-gen glob gnupload inttostr ioctl maintainer-makefile malloc-gnu mempcpy mgetgroups minmax mkstemp obstack poll progname read-file readutmp realloc-gnu regex setenv sethostname signal size_max snippet/unused-parameter snprintf stdbool stdint strchrnul strerror strndup strnlen sysexits termios unistd-safer update-copyright vasnprintf version-etc-fsf vsnprintf xalloc xalloc-die xgetcwd xgetdomainname xgethostname xsize xvasprintf -+ -+# Specification in the form of a few gnulib-tool.m4 macro invocations: -+gl_LOCAL_DIR([gl]) -+gl_MODULES([ -+ alloca -+ alloca-opt -+ argp -+ argp-version-etc -+ autobuild -+ dirfd -+ dirname-lgpl -+ error -+ exitfail -+ extensions -+ fdl-1.3 -+ filemode -+ forkpty -+ gendocs -+ getaddrinfo -+ getcwd -+ getline -+ getopt-gnu -+ getpass -+ gettext -+ gettext-h -+ getusershell -+ git-version-gen -+ glob -+ gnupload -+ inttostr -+ ioctl -+ maintainer-makefile -+ malloc-gnu -+ mempcpy -+ mgetgroups -+ minmax -+ mkstemp -+ obstack -+ poll -+ progname -+ read-file -+ readutmp -+ realloc-gnu -+ regex -+ setenv -+ sethostname -+ signal -+ size_max -+ snippet/unused-parameter -+ snprintf -+ stdbool -+ stdint -+ strchrnul -+ strerror -+ strndup -+ strnlen -+ sysexits -+ termios -+ unistd-safer -+ update-copyright -+ vasnprintf -+ version-etc-fsf -+ vsnprintf -+ xalloc -+ xalloc-die -+ xgetcwd -+ xgetdomainname -+ xgethostname -+ xsize -+ xvasprintf -+]) -+gl_AVOID([]) -+gl_SOURCE_BASE([lib]) -+gl_M4_BASE([m4]) -+gl_PO_BASE([]) -+gl_DOC_BASE([doc]) -+gl_TESTS_BASE([tests]) -+gl_LIB([libgnu]) -+gl_MAKEFILE_NAME([]) -+gl_MACRO_PREFIX([gl]) -+gl_PO_DOMAIN([]) -+gl_WITNESS_C_MACRO([]) -diff -durN inetutils-1.9.4.orig/m4/gnulib-common.m4 inetutils-1.9.4/m4/gnulib-common.m4 ---- inetutils-1.9.4.orig/m4/gnulib-common.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/gnulib-common.m4 2017-05-15 17:51:55.187500000 +0800 -@@ -1,5 +1,5 @@ --# gnulib-common.m4 serial 36 --dnl Copyright (C) 2007-2015 Free Software Foundation, Inc. -+# gnulib-common.m4 serial 38 -+dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -@@ -253,9 +253,11 @@ - [ - dnl Minix 3 comes with two toolchains: The Amsterdam Compiler Kit compiler - dnl as "cc", and GCC as "gcc". They have different object file formats and -- dnl library formats. In particular, the GNU binutils programs ar, ranlib -+ dnl library formats. In particular, the GNU binutils programs ar and ranlib - dnl produce libraries that work only with gcc, not with cc. - AC_REQUIRE([AC_PROG_CC]) -+ dnl The '][' hides this use from 'aclocal'. -+ AC_BEFORE([$0], [A][M_PROG_AR]) - AC_CACHE_CHECK([for Minix Amsterdam compiler], [gl_cv_c_amsterdam_compiler], - [ - AC_EGREP_CPP([Amsterdam], -@@ -267,25 +269,39 @@ - [gl_cv_c_amsterdam_compiler=yes], - [gl_cv_c_amsterdam_compiler=no]) - ]) -- if test -z "$AR"; then -- if test $gl_cv_c_amsterdam_compiler = yes; then -+ -+ dnl Don't compete with AM_PROG_AR's decision about AR/ARFLAGS if we are not -+ dnl building with __ACK__. -+ if test $gl_cv_c_amsterdam_compiler = yes; then -+ if test -z "$AR"; then - AR='cc -c.a' -- if test -z "$ARFLAGS"; then -- ARFLAGS='-o' -- fi -- else -- dnl Use the Automake-documented default values for AR and ARFLAGS, -- dnl but prefer ${host}-ar over ar (useful for cross-compiling). -- AC_CHECK_TOOL([AR], [ar], [ar]) -- if test -z "$ARFLAGS"; then -- ARFLAGS='cru' -- fi - fi -- else - if test -z "$ARFLAGS"; then -- ARFLAGS='cru' -+ ARFLAGS='-o' - fi -+ else -+ dnl AM_PROG_AR was added in automake v1.11.2. AM_PROG_AR does not AC_SUBST -+ dnl ARFLAGS variable (it is filed into Makefile.in directly by automake -+ dnl script on-demand, if not specified by ./configure of course). -+ dnl Don't AC_REQUIRE the AM_PROG_AR otherwise the code for __ACK__ above -+ dnl will be ignored. Also, pay attention to call AM_PROG_AR in else block -+ dnl because AM_PROG_AR is written so it could re-set AR variable even for -+ dnl __ACK__. It may seem like its easier to avoid calling the macro here, -+ dnl but we need to AC_SUBST both AR/ARFLAGS (thus those must have some good -+ dnl default value and automake should usually know them). -+ dnl -+ dnl The '][' hides this use from 'aclocal'. -+ m4_ifdef([A][M_PROG_AR], [A][M_PROG_AR], [:]) - fi -+ -+ dnl In case the code above has not helped with setting AR/ARFLAGS, use -+ dnl Automake-documented default values for AR and ARFLAGS, but prefer -+ dnl ${host}-ar over ar (useful for cross-compiling). -+ AC_CHECK_TOOL([AR], [ar], [ar]) -+ if test -z "$ARFLAGS"; then -+ ARFLAGS='cr' -+ fi -+ - AC_SUBST([AR]) - AC_SUBST([ARFLAGS]) - if test -z "$RANLIB"; then -@@ -443,7 +459,9 @@ - else - ac_cv_path_SED=$SED - fi -+ ]) - SED="$ac_cv_path_SED" - AC_SUBST([SED])dnl - rm -f conftest.sed --])])]) -+]) -+]) -diff -durN inetutils-1.9.4.orig/m4/gnulib-comp.m4 inetutils-1.9.4/m4/gnulib-comp.m4 ---- inetutils-1.9.4.orig/m4/gnulib-comp.m4 2015-05-12 20:39:27.000000000 +0800 -+++ inetutils-1.9.4/m4/gnulib-comp.m4 2017-05-15 17:55:27.328125000 +0800 -@@ -1,5 +1,5 @@ - # DO NOT EDIT! GENERATED AUTOMATICALLY! --# Copyright (C) 2002-2015 Free Software Foundation, Inc. -+# Copyright (C) 2002-2017 Free Software Foundation, Inc. - # - # 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 -@@ -37,13 +37,16 @@ - m4_pattern_allow([^gl_ES$])dnl a valid locale name - m4_pattern_allow([^gl_LIBOBJS$])dnl a variable - m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable -+ -+ # Pre-early section. -+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - AC_REQUIRE([gl_PROG_AR_RANLIB]) -+ - AC_REQUIRE([AM_PROG_CC_C_O]) - # Code from module absolute-header: - # Code from module alignof: - # Code from module alloca: - # Code from module alloca-opt: -- # Code from module announce-gen: - # Code from module argp: - # Code from module argp-version-etc: - # Code from module arpa_inet: -@@ -52,6 +55,7 @@ - # Code from module autobuild: - AB_INIT - # Code from module btowc: -+ # Code from module builtin-expect: - # Code from module chdir: - # Code from module chdir-long: - # Code from module cloexec: -@@ -72,7 +76,6 @@ - # Code from module error: - # Code from module exitfail: - # Code from module extensions: -- AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - # Code from module extern-inline: - # Code from module fchdir: - # Code from module fcntl: -@@ -83,6 +86,7 @@ - # Code from module filemode: - # Code from module filename: - # Code from module filenamecat-lgpl: -+ # Code from module flexmember: - # Code from module float: - # Code from module fnmatch: - # Code from module fopen: -@@ -110,6 +114,7 @@ - # Code from module getopt-gnu: - # Code from module getopt-posix: - # Code from module getpass: -+ # Code from module getprogname: - # Code from module gettext: - # Code from module gettext-h: - # Code from module gettimeofday: -@@ -119,6 +124,7 @@ - # Code from module glob: - # Code from module gnumakefile: - # Code from module gnupload: -+ # Code from module hard-locale: - # Code from module havelib: - # Code from module hostent: - # Code from module include_next: -@@ -129,9 +135,11 @@ - # Code from module langinfo: - # Code from module largefile: - AC_REQUIRE([AC_SYS_LARGEFILE]) -+ # Code from module limits-h: - # Code from module localcharset: - # Code from module locale: - # Code from module localeconv: -+ # Code from module localtime-buffer: - # Code from module lock: - # Code from module login_tty: - # Code from module lseek: -@@ -289,6 +297,7 @@ - gl_PREREQ_BTOWC - fi - gl_WCHAR_MODULE_INDICATOR([btowc]) -+ gl___BUILTIN_EXPECT - gl_UNISTD_MODULE_INDICATOR([chdir]) - gl_FUNC_CHDIR_LONG - if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then -@@ -311,7 +320,8 @@ - gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE - gl_DIRENT_H - gl_FUNC_DIRFD -- if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then -+ if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \ -+ || test $REPLACE_DIRFD = 1; then - AC_LIBOBJ([dirfd]) - gl_PREREQ_DIRFD - fi -@@ -358,6 +368,7 @@ - gl_MODULE_INDICATOR([fdopendir]) - gl_FILEMODE - gl_FILE_NAME_CONCAT_LGPL -+ AC_C_FLEXIBLE_ARRAY_MEMBER - gl_FLOAT_H - if test $REPLACE_FLOAT_LDBL = 1; then - AC_LIBOBJ([float]) -@@ -396,6 +407,7 @@ - gl_FUNC_FSTAT - if test $REPLACE_FSTAT = 1; then - AC_LIBOBJ([fstat]) -+ AC_LIBOBJ([stat-w32]) - gl_PREREQ_FSTAT - fi - gl_SYS_STAT_MODULE_INDICATOR([fstat]) -@@ -476,21 +488,15 @@ - gl_PREREQ_GETLOGIN_R - fi - gl_UNISTD_MODULE_INDICATOR([getlogin_r]) -+ AC_REQUIRE([gl_LIB_GETLOGIN]) - gl_FUNC_GETOPT_GNU -- if test $REPLACE_GETOPT = 1; then -- AC_LIBOBJ([getopt]) -- AC_LIBOBJ([getopt1]) -- gl_PREREQ_GETOPT -- dnl Arrange for unistd.h to include getopt.h. -- GNULIB_GL_UNISTD_H_GETOPT=1 -- fi -- AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT]) -- gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu]) -+ dnl Because of the way gl_FUNC_GETOPT_GNU is implemented (the gl_getopt_required -+ dnl mechanism), there is no need to do any AC_LIBOBJ or AC_SUBST here; they are -+ dnl done in the getopt-posix module. - gl_FUNC_GETOPT_POSIX - if test $REPLACE_GETOPT = 1; then - AC_LIBOBJ([getopt]) - AC_LIBOBJ([getopt1]) -- gl_PREREQ_GETOPT - dnl Arrange for unistd.h to include getopt.h. - GNULIB_GL_UNISTD_H_GETOPT=1 - fi -@@ -500,6 +506,7 @@ - AC_LIBOBJ([getpass]) - gl_PREREQ_GETPASS - fi -+ gl_FUNC_GETPROGNAME - dnl you must add AM_GNU_GETTEXT([external]) or similar to configure.ac. - AM_GNU_GETTEXT_VERSION([0.18.1]) - AC_SUBST([LIBINTL]) -@@ -531,6 +538,7 @@ - m4_defn([m4_PACKAGE_VERSION])), [1], [], - [AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [], - [GNUmakefile=$GNUmakefile])]) -+ gl_HARD_LOCALE - gl_HOSTENT - gl_FUNC_INET_NTOP - if test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1; then -@@ -546,6 +554,7 @@ - gl_SYS_IOCTL_MODULE_INDICATOR([ioctl]) - gl_LANGINFO_H - AC_REQUIRE([gl_LARGEFILE]) -+ gl_LIMITS_H - gl_LOCALCHARSET - LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\"" - AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT]) -@@ -556,6 +565,8 @@ - gl_PREREQ_LOCALECONV - fi - gl_LOCALE_MODULE_INDICATOR([localeconv]) -+ AC_REQUIRE([gl_LOCALTIME_BUFFER_DEFAULTS]) -+ AC_LIBOBJ([localtime-buffer]) - gl_LOCK - gl_MODULE_INDICATOR([lock]) - gl_FUNC_LOGIN_TTY -@@ -639,14 +650,15 @@ - gl_PREREQ_MKSTEMP - fi - gl_STDLIB_MODULE_INDICATOR([mkstemp]) -- gl_MSVC_INVAL -+ AC_REQUIRE([gl_MSVC_INVAL]) - if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then - AC_LIBOBJ([msvc-inval]) - fi -- gl_MSVC_NOTHROW -+ AC_REQUIRE([gl_MSVC_NOTHROW]) - if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then - AC_LIBOBJ([msvc-nothrow]) - fi -+ gl_MODULE_INDICATOR([msvc-nothrow]) - gl_MULTIARCH - gl_HEADER_NETDB - gl_HEADER_NETINET_IN -@@ -773,6 +785,7 @@ - gl_FUNC_STAT - if test $REPLACE_STAT = 1; then - AC_LIBOBJ([stat]) -+ AC_LIBOBJ([stat-w32]) - gl_PREREQ_STAT - fi - gl_SYS_STAT_MODULE_INDICATOR([stat]) -@@ -1013,26 +1026,22 @@ - # This macro records the list of files which have been installed by - # gnulib-tool and may be removed by future gnulib-tool invocations. - AC_DEFUN([gl_FILE_LIST], [ -- build-aux/announce-gen - build-aux/config.rpath - build-aux/gendocs.sh - build-aux/git-version-gen - build-aux/gnupload -- build-aux/snippet/_Noreturn.h -- build-aux/snippet/arg-nonnull.h -- build-aux/snippet/c++defs.h -- build-aux/snippet/unused-parameter.h -- build-aux/snippet/warn-on-use.h - build-aux/update-copyright - build-aux/useless-if-before-free - build-aux/vc-list-files - doc/fdl-1.3.texi - doc/gendocs_template - doc/gendocs_template_min -+ lib/_Noreturn.h - lib/alignof.h - lib/alloca.c - lib/alloca.in.h - lib/anytostr.c -+ lib/arg-nonnull.h - lib/argp-ba.c - lib/argp-eexst.c - lib/argp-fmtstream.c -@@ -1055,6 +1064,7 @@ - lib/at-func.c - lib/basename-lgpl.c - lib/btowc.c -+ lib/c++defs.h - lib/chdir-long.c - lib/chdir-long.h - lib/cloexec.c -@@ -1088,6 +1098,7 @@ - lib/filename.h - lib/filenamecat-lgpl.c - lib/filenamecat.h -+ lib/flexmember.h - lib/float+.h - lib/float.c - lib/float.in.h -@@ -1114,12 +1125,19 @@ - lib/gethostname.c - lib/getline.c - lib/getlogin_r.c -+ lib/getopt-cdefs.in.h -+ lib/getopt-core.h -+ lib/getopt-ext.h -+ lib/getopt-pfx-core.h -+ lib/getopt-pfx-ext.h - lib/getopt.c - lib/getopt.in.h - lib/getopt1.c - lib/getopt_int.h - lib/getpass.c - lib/getpass.h -+ lib/getprogname.c -+ lib/getprogname.h - lib/gettext.h - lib/gettimeofday.c - lib/getugroups.c -@@ -1131,6 +1149,8 @@ - lib/glthread/lock.c - lib/glthread/lock.h - lib/glthread/threadlib.c -+ lib/hard-locale.c -+ lib/hard-locale.h - lib/imaxtostr.c - lib/inet_ntop.c - lib/intprops.h -@@ -1139,10 +1159,13 @@ - lib/ioctl.c - lib/itold.c - lib/langinfo.in.h -+ lib/limits.in.h - lib/localcharset.c - lib/localcharset.h - lib/locale.in.h - lib/localeconv.c -+ lib/localtime-buffer.c -+ lib/localtime-buffer.h - lib/login_tty.c - lib/lseek.c - lib/lstat.c -@@ -1224,6 +1247,8 @@ - lib/snprintf.c - lib/sockets.c - lib/sockets.h -+ lib/stat-w32.c -+ lib/stat-w32.h - lib/stat.c - lib/stdalign.in.h - lib/stdarg.in.h -@@ -1270,6 +1295,7 @@ - lib/unistd-safer.h - lib/unistd.c - lib/unistd.in.h -+ lib/unused-parameter.h - lib/vasnprintf.c - lib/vasnprintf.h - lib/vasprintf.c -@@ -1279,6 +1305,7 @@ - lib/version-etc.h - lib/vsnprintf.c - lib/w32sock.h -+ lib/warn-on-use.h - lib/wchar.in.h - lib/wcrtomb.c - lib/wctype-h.c -@@ -1305,6 +1332,7 @@ - m4/arpa_inet_h.m4 - m4/autobuild.m4 - m4/btowc.m4 -+ m4/builtin-expect.m4 - m4/chdir-long.m4 - m4/close.m4 - m4/closedir.m4 -@@ -1332,6 +1360,7 @@ - m4/fdopendir.m4 - m4/filemode.m4 - m4/filenamecat.m4 -+ m4/flexmember.m4 - m4/float_h.m4 - m4/fnmatch.m4 - m4/fopen.m4 -@@ -1351,9 +1380,11 @@ - m4/getgroups.m4 - m4/gethostname.m4 - m4/getline.m4 -+ m4/getlogin.m4 - m4/getlogin_r.m4 - m4/getopt.m4 - m4/getpass.m4 -+ m4/getprogname.m4 - m4/gettext.m4 - m4/gettimeofday.m4 - m4/getugroups.m4 -@@ -1362,6 +1393,7 @@ - m4/glibc21.m4 - m4/glob.m4 - m4/gnulib-common.m4 -+ m4/hard-locale.m4 - m4/hostent.m4 - m4/iconv.m4 - m4/include_next.m4 -@@ -1382,12 +1414,14 @@ - m4/lib-ld.m4 - m4/lib-link.m4 - m4/lib-prefix.m4 -+ m4/limits-h.m4 - m4/localcharset.m4 - m4/locale-fr.m4 - m4/locale-ja.m4 - m4/locale-zh.m4 - m4/locale_h.m4 - m4/localeconv.m4 -+ m4/localtime-buffer.m4 - m4/lock.m4 - m4/longlong.m4 - m4/lseek.m4 -@@ -1418,7 +1452,6 @@ - m4/nocrash.m4 - m4/obstack.m4 - m4/off_t.m4 -- m4/onceonly.m4 - m4/open.m4 - m4/openat.m4 - m4/opendir.m4 -@@ -1430,6 +1463,7 @@ - m4/printf-posix.m4 - m4/printf.m4 - m4/progtest.m4 -+ m4/pthread_rwlock_rdlock.m4 - m4/pty.m4 - m4/pty_h.m4 - m4/rawmemchr.m4 -diff -durN inetutils-1.9.4.orig/m4/gnulib-tool.m4 inetutils-1.9.4/m4/gnulib-tool.m4 ---- inetutils-1.9.4.orig/m4/gnulib-tool.m4 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/m4/gnulib-tool.m4 2017-05-15 17:51:55.312500000 +0800 -@@ -0,0 +1,57 @@ -+# gnulib-tool.m4 serial 2 -+dnl Copyright (C) 2004-2005, 2009-2017 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+dnl The following macros need not be invoked explicitly. -+dnl Invoking them does nothing except to declare default arguments -+dnl for "gnulib-tool --import". -+ -+dnl Usage: gl_LOCAL_DIR([DIR]) -+AC_DEFUN([gl_LOCAL_DIR], []) -+ -+dnl Usage: gl_MODULES([module1 module2 ...]) -+AC_DEFUN([gl_MODULES], []) -+ -+dnl Usage: gl_AVOID([module1 module2 ...]) -+AC_DEFUN([gl_AVOID], []) -+ -+dnl Usage: gl_SOURCE_BASE([DIR]) -+AC_DEFUN([gl_SOURCE_BASE], []) -+ -+dnl Usage: gl_M4_BASE([DIR]) -+AC_DEFUN([gl_M4_BASE], []) -+ -+dnl Usage: gl_PO_BASE([DIR]) -+AC_DEFUN([gl_PO_BASE], []) -+ -+dnl Usage: gl_DOC_BASE([DIR]) -+AC_DEFUN([gl_DOC_BASE], []) -+ -+dnl Usage: gl_TESTS_BASE([DIR]) -+AC_DEFUN([gl_TESTS_BASE], []) -+ -+dnl Usage: gl_WITH_TESTS -+AC_DEFUN([gl_WITH_TESTS], []) -+ -+dnl Usage: gl_LIB([LIBNAME]) -+AC_DEFUN([gl_LIB], []) -+ -+dnl Usage: gl_LGPL or gl_LGPL([VERSION]) -+AC_DEFUN([gl_LGPL], []) -+ -+dnl Usage: gl_MAKEFILE_NAME([FILENAME]) -+AC_DEFUN([gl_MAKEFILE_NAME], []) -+ -+dnl Usage: gl_LIBTOOL -+AC_DEFUN([gl_LIBTOOL], []) -+ -+dnl Usage: gl_MACRO_PREFIX([PREFIX]) -+AC_DEFUN([gl_MACRO_PREFIX], []) -+ -+dnl Usage: gl_PO_DOMAIN([DOMAIN]) -+AC_DEFUN([gl_PO_DOMAIN], []) -+ -+dnl Usage: gl_VC_FILES([BOOLEAN]) -+AC_DEFUN([gl_VC_FILES], []) -diff -durN inetutils-1.9.4.orig/m4/hard-locale.m4 inetutils-1.9.4/m4/hard-locale.m4 ---- inetutils-1.9.4.orig/m4/hard-locale.m4 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/m4/hard-locale.m4 2017-05-15 17:51:55.468750000 +0800 -@@ -0,0 +1,11 @@ -+# hard-locale.m4 serial 8 -+dnl Copyright (C) 2002-2006, 2009-2017 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+dnl No prerequisites of lib/hard-locale.c. -+AC_DEFUN([gl_HARD_LOCALE], -+[ -+ : -+]) -diff -durN inetutils-1.9.4.orig/m4/hostent.m4 inetutils-1.9.4/m4/hostent.m4 ---- inetutils-1.9.4.orig/m4/hostent.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/hostent.m4 2017-05-15 17:51:55.593750000 +0800 -@@ -1,5 +1,5 @@ - # hostent.m4 serial 2 --dnl Copyright (C) 2008, 2010-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2008, 2010-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/iconv.m4 inetutils-1.9.4/m4/iconv.m4 ---- inetutils-1.9.4.orig/m4/iconv.m4 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/m4/iconv.m4 2017-05-15 17:51:55.718750000 +0800 -@@ -0,0 +1,275 @@ -+# iconv.m4 serial 20 -+dnl Copyright (C) 2000-2002, 2007-2014, 2016 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+dnl From Bruno Haible. -+ -+AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], -+[ -+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. -+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) -+ AC_REQUIRE([AC_LIB_RPATH]) -+ -+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV -+ dnl accordingly. -+ AC_LIB_LINKFLAGS_BODY([iconv]) -+]) -+ -+AC_DEFUN([AM_ICONV_LINK], -+[ -+ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and -+ dnl those with the standalone portable GNU libiconv installed). -+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles -+ -+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV -+ dnl accordingly. -+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) -+ -+ dnl Add $INCICONV to CPPFLAGS before performing the following checks, -+ dnl because if the user has installed libiconv and not disabled its use -+ dnl via --without-libiconv-prefix, he wants to use it. The first -+ dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed. -+ am_save_CPPFLAGS="$CPPFLAGS" -+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) -+ -+ AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [ -+ am_cv_func_iconv="no, consider installing GNU libiconv" -+ am_cv_lib_iconv=no -+ AC_LINK_IFELSE( -+ [AC_LANG_PROGRAM( -+ [[ -+#include -+#include -+ ]], -+ [[iconv_t cd = iconv_open("",""); -+ iconv(cd,NULL,NULL,NULL,NULL); -+ iconv_close(cd);]])], -+ [am_cv_func_iconv=yes]) -+ if test "$am_cv_func_iconv" != yes; then -+ am_save_LIBS="$LIBS" -+ LIBS="$LIBS $LIBICONV" -+ AC_LINK_IFELSE( -+ [AC_LANG_PROGRAM( -+ [[ -+#include -+#include -+ ]], -+ [[iconv_t cd = iconv_open("",""); -+ iconv(cd,NULL,NULL,NULL,NULL); -+ iconv_close(cd);]])], -+ [am_cv_lib_iconv=yes] -+ [am_cv_func_iconv=yes]) -+ LIBS="$am_save_LIBS" -+ fi -+ ]) -+ if test "$am_cv_func_iconv" = yes; then -+ AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ -+ dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11, -+ dnl Solaris 10. -+ am_save_LIBS="$LIBS" -+ if test $am_cv_lib_iconv = yes; then -+ LIBS="$LIBS $LIBICONV" -+ fi -+ am_cv_func_iconv_works=no -+ for ac_iconv_const in '' 'const'; do -+ AC_RUN_IFELSE( -+ [AC_LANG_PROGRAM( -+ [[ -+#include -+#include -+ -+#ifndef ICONV_CONST -+# define ICONV_CONST $ac_iconv_const -+#endif -+ ]], -+ [[int result = 0; -+ /* Test against AIX 5.1 bug: Failures are not distinguishable from successful -+ returns. */ -+ { -+ iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); -+ if (cd_utf8_to_88591 != (iconv_t)(-1)) -+ { -+ static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ -+ char buf[10]; -+ ICONV_CONST char *inptr = input; -+ size_t inbytesleft = strlen (input); -+ char *outptr = buf; -+ size_t outbytesleft = sizeof (buf); -+ size_t res = iconv (cd_utf8_to_88591, -+ &inptr, &inbytesleft, -+ &outptr, &outbytesleft); -+ if (res == 0) -+ result |= 1; -+ iconv_close (cd_utf8_to_88591); -+ } -+ } -+ /* Test against Solaris 10 bug: Failures are not distinguishable from -+ successful returns. */ -+ { -+ iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); -+ if (cd_ascii_to_88591 != (iconv_t)(-1)) -+ { -+ static ICONV_CONST char input[] = "\263"; -+ char buf[10]; -+ ICONV_CONST char *inptr = input; -+ size_t inbytesleft = strlen (input); -+ char *outptr = buf; -+ size_t outbytesleft = sizeof (buf); -+ size_t res = iconv (cd_ascii_to_88591, -+ &inptr, &inbytesleft, -+ &outptr, &outbytesleft); -+ if (res == 0) -+ result |= 2; -+ iconv_close (cd_ascii_to_88591); -+ } -+ } -+ /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ -+ { -+ iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); -+ if (cd_88591_to_utf8 != (iconv_t)(-1)) -+ { -+ static ICONV_CONST char input[] = "\304"; -+ static char buf[2] = { (char)0xDE, (char)0xAD }; -+ ICONV_CONST char *inptr = input; -+ size_t inbytesleft = 1; -+ char *outptr = buf; -+ size_t outbytesleft = 1; -+ size_t res = iconv (cd_88591_to_utf8, -+ &inptr, &inbytesleft, -+ &outptr, &outbytesleft); -+ if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) -+ result |= 4; -+ iconv_close (cd_88591_to_utf8); -+ } -+ } -+#if 0 /* This bug could be worked around by the caller. */ -+ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ -+ { -+ iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); -+ if (cd_88591_to_utf8 != (iconv_t)(-1)) -+ { -+ static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; -+ char buf[50]; -+ ICONV_CONST char *inptr = input; -+ size_t inbytesleft = strlen (input); -+ char *outptr = buf; -+ size_t outbytesleft = sizeof (buf); -+ size_t res = iconv (cd_88591_to_utf8, -+ &inptr, &inbytesleft, -+ &outptr, &outbytesleft); -+ if ((int)res > 0) -+ result |= 8; -+ iconv_close (cd_88591_to_utf8); -+ } -+ } -+#endif -+ /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is -+ provided. */ -+ if (/* Try standardized names. */ -+ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) -+ /* Try IRIX, OSF/1 names. */ -+ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) -+ /* Try AIX names. */ -+ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) -+ /* Try HP-UX names. */ -+ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) -+ result |= 16; -+ return result; -+]])], -+ [am_cv_func_iconv_works=yes], , -+ [case "$host_os" in -+ aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; -+ *) am_cv_func_iconv_works="guessing yes" ;; -+ esac]) -+ test "$am_cv_func_iconv_works" = no || break -+ done -+ LIBS="$am_save_LIBS" -+ ]) -+ case "$am_cv_func_iconv_works" in -+ *no) am_func_iconv=no am_cv_lib_iconv=no ;; -+ *) am_func_iconv=yes ;; -+ esac -+ else -+ am_func_iconv=no am_cv_lib_iconv=no -+ fi -+ if test "$am_func_iconv" = yes; then -+ AC_DEFINE([HAVE_ICONV], [1], -+ [Define if you have the iconv() function and it works.]) -+ fi -+ if test "$am_cv_lib_iconv" = yes; then -+ AC_MSG_CHECKING([how to link with libiconv]) -+ AC_MSG_RESULT([$LIBICONV]) -+ else -+ dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV -+ dnl either. -+ CPPFLAGS="$am_save_CPPFLAGS" -+ LIBICONV= -+ LTLIBICONV= -+ fi -+ AC_SUBST([LIBICONV]) -+ AC_SUBST([LTLIBICONV]) -+]) -+ -+dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to -+dnl avoid warnings like -+dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". -+dnl This is tricky because of the way 'aclocal' is implemented: -+dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN. -+dnl Otherwise aclocal's initial scan pass would miss the macro definition. -+dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions. -+dnl Otherwise aclocal would emit many "Use of uninitialized value $1" -+dnl warnings. -+m4_define([gl_iconv_AC_DEFUN], -+ m4_version_prereq([2.64], -+ [[AC_DEFUN_ONCE( -+ [$1], [$2])]], -+ [m4_ifdef([gl_00GNULIB], -+ [[AC_DEFUN_ONCE( -+ [$1], [$2])]], -+ [[AC_DEFUN( -+ [$1], [$2])]])])) -+gl_iconv_AC_DEFUN([AM_ICONV], -+[ -+ AM_ICONV_LINK -+ if test "$am_cv_func_iconv" = yes; then -+ AC_MSG_CHECKING([for iconv declaration]) -+ AC_CACHE_VAL([am_cv_proto_iconv], [ -+ AC_COMPILE_IFELSE( -+ [AC_LANG_PROGRAM( -+ [[ -+#include -+#include -+extern -+#ifdef __cplusplus -+"C" -+#endif -+#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) -+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); -+#else -+size_t iconv(); -+#endif -+ ]], -+ [[]])], -+ [am_cv_proto_iconv_arg1=""], -+ [am_cv_proto_iconv_arg1="const"]) -+ am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) -+ am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` -+ AC_MSG_RESULT([ -+ $am_cv_proto_iconv]) -+ else -+ dnl When compiling GNU libiconv on a system that does not have iconv yet, -+ dnl pick the POSIX compliant declaration without 'const'. -+ am_cv_proto_iconv_arg1="" -+ fi -+ AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], -+ [Define as const if the declaration of iconv() needs const.]) -+ dnl Also substitute ICONV_CONST in the gnulib generated . -+ m4_ifdef([gl_ICONV_H_DEFAULTS], -+ [AC_REQUIRE([gl_ICONV_H_DEFAULTS]) -+ if test -n "$am_cv_proto_iconv_arg1"; then -+ ICONV_CONST="const" -+ fi -+ ]) -+]) -diff -durN inetutils-1.9.4.orig/m4/include_next.m4 inetutils-1.9.4/m4/include_next.m4 ---- inetutils-1.9.4.orig/m4/include_next.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/include_next.m4 2017-05-15 17:51:55.859375000 +0800 -@@ -1,12 +1,13 @@ --# include_next.m4 serial 23 --dnl Copyright (C) 2006-2015 Free Software Foundation, Inc. -+# include_next.m4 serial 24 -+dnl Copyright (C) 2006-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. - - dnl From Paul Eggert and Derek Price. - --dnl Sets INCLUDE_NEXT and PRAGMA_SYSTEM_HEADER. -+dnl Sets INCLUDE_NEXT, INCLUDE_NEXT_AS_FIRST_DIRECTIVE, PRAGMA_SYSTEM_HEADER, -+dnl and PRAGMA_COLUMNS. - dnl - dnl INCLUDE_NEXT expands to 'include_next' if the compiler supports it, or to - dnl 'include' otherwise. -diff -durN inetutils-1.9.4.orig/m4/inet_ntop.m4 inetutils-1.9.4/m4/inet_ntop.m4 ---- inetutils-1.9.4.orig/m4/inet_ntop.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/inet_ntop.m4 2017-05-15 17:51:55.968750000 +0800 -@@ -1,5 +1,5 @@ - # inet_ntop.m4 serial 19 --dnl Copyright (C) 2005-2006, 2008-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2005-2006, 2008-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/intdiv0.m4 inetutils-1.9.4/m4/intdiv0.m4 ---- inetutils-1.9.4.orig/m4/intdiv0.m4 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/m4/intdiv0.m4 2017-05-15 17:51:56.203125000 +0800 -@@ -0,0 +1,87 @@ -+# intdiv0.m4 serial 6 (gettext-0.18.2) -+dnl Copyright (C) 2002, 2007-2008, 2010-2017 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+dnl From Bruno Haible. -+ -+AC_DEFUN([gt_INTDIV0], -+[ -+ AC_REQUIRE([AC_PROG_CC])dnl -+ AC_REQUIRE([AC_CANONICAL_HOST])dnl -+ -+ AC_CACHE_CHECK([whether integer division by zero raises SIGFPE], -+ gt_cv_int_divbyzero_sigfpe, -+ [ -+ gt_cv_int_divbyzero_sigfpe= -+changequote(,)dnl -+ case "$host_os" in -+ macos* | darwin[6-9]* | darwin[1-9][0-9]*) -+ # On Mac OS X 10.2 or newer, just assume the same as when cross- -+ # compiling. If we were to perform the real test, 1 Crash Report -+ # dialog window would pop up. -+ case "$host_cpu" in -+ i[34567]86 | x86_64) -+ gt_cv_int_divbyzero_sigfpe="guessing yes" ;; -+ esac -+ ;; -+ esac -+changequote([,])dnl -+ if test -z "$gt_cv_int_divbyzero_sigfpe"; then -+ AC_RUN_IFELSE( -+ [AC_LANG_SOURCE([[ -+#include -+#include -+ -+static void -+sigfpe_handler (int sig) -+{ -+ /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ -+ _exit (sig != SIGFPE); -+} -+ -+int x = 1; -+int y = 0; -+int z; -+int nan; -+ -+int main () -+{ -+ signal (SIGFPE, sigfpe_handler); -+/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */ -+#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP) -+ signal (SIGTRAP, sigfpe_handler); -+#endif -+/* Linux/SPARC yields signal SIGILL. */ -+#if defined (__sparc__) && defined (__linux__) -+ signal (SIGILL, sigfpe_handler); -+#endif -+ -+ z = x / y; -+ nan = y / y; -+ exit (2); -+} -+]])], -+ [gt_cv_int_divbyzero_sigfpe=yes], -+ [gt_cv_int_divbyzero_sigfpe=no], -+ [ -+ # Guess based on the CPU. -+changequote(,)dnl -+ case "$host_cpu" in -+ alpha* | i[34567]86 | x86_64 | m68k | s390*) -+ gt_cv_int_divbyzero_sigfpe="guessing yes";; -+ *) -+ gt_cv_int_divbyzero_sigfpe="guessing no";; -+ esac -+changequote([,])dnl -+ ]) -+ fi -+ ]) -+ case "$gt_cv_int_divbyzero_sigfpe" in -+ *yes) value=1;; -+ *) value=0;; -+ esac -+ AC_DEFINE_UNQUOTED([INTDIV0_RAISES_SIGFPE], [$value], -+ [Define if integer division by zero raises signal SIGFPE.]) -+]) -diff -durN inetutils-1.9.4.orig/m4/intl.m4 inetutils-1.9.4/m4/intl.m4 ---- inetutils-1.9.4.orig/m4/intl.m4 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/m4/intl.m4 2017-05-15 17:51:56.343750000 +0800 -@@ -0,0 +1,304 @@ -+# intl.m4 serial 29 (gettext-0.19) -+dnl Copyright (C) 1995-2014, 2016 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+dnl -+dnl This file can be used in projects which are not available under -+dnl the GNU General Public License or the GNU Library General Public -+dnl License but which still want to provide support for the GNU gettext -+dnl functionality. -+dnl Please note that the actual code of the GNU gettext library is covered -+dnl by the GNU Library General Public License, and the rest of the GNU -+dnl gettext package is covered by the GNU General Public License. -+dnl They are *not* in the public domain. -+ -+dnl Authors: -+dnl Ulrich Drepper , 1995-2000. -+dnl Bruno Haible , 2000-2009. -+ -+AC_PREREQ([2.60]) -+ -+dnl Checks for all prerequisites of the intl subdirectory, -+dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, -+dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL. -+AC_DEFUN([AM_INTL_SUBDIR], -+[ -+ AC_REQUIRE([AC_PROG_INSTALL])dnl -+ AC_REQUIRE([AC_PROG_MKDIR_P])dnl -+ AC_REQUIRE([AC_PROG_CC])dnl -+ AC_REQUIRE([AC_CANONICAL_HOST])dnl -+ AC_REQUIRE([gt_GLIBC2])dnl -+ AC_REQUIRE([AC_PROG_RANLIB])dnl -+ AC_REQUIRE([gl_VISIBILITY])dnl -+ AC_REQUIRE([gt_INTL_SUBDIR_CORE])dnl -+ AC_REQUIRE([AC_TYPE_LONG_LONG_INT])dnl -+ AC_REQUIRE([gt_TYPE_WCHAR_T])dnl -+ AC_REQUIRE([gt_TYPE_WINT_T])dnl -+ AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) -+ AC_REQUIRE([gt_TYPE_INTMAX_T]) -+ AC_REQUIRE([gt_PRINTF_POSIX]) -+ AC_REQUIRE([gl_GLIBC21])dnl -+ AC_REQUIRE([gl_XSIZE])dnl -+ AC_REQUIRE([gl_FCNTL_O_FLAGS])dnl -+ AC_REQUIRE([gt_INTL_MACOSX])dnl -+ AC_REQUIRE([gl_EXTERN_INLINE])dnl -+ AC_REQUIRE([gt_GL_ATTRIBUTE])dnl -+ -+ dnl Support for automake's --enable-silent-rules. -+ case "$enable_silent_rules" in -+ yes) INTL_DEFAULT_VERBOSITY=0;; -+ no) INTL_DEFAULT_VERBOSITY=1;; -+ *) INTL_DEFAULT_VERBOSITY=1;; -+ esac -+ AC_SUBST([INTL_DEFAULT_VERBOSITY]) -+ -+ AC_CHECK_TYPE([ptrdiff_t], , -+ [AC_DEFINE([ptrdiff_t], [long], -+ [Define as the type of the result of subtracting two pointers, if the system doesn't define it.]) -+ ]) -+ AC_CHECK_HEADERS([features.h stddef.h stdlib.h string.h]) -+ AC_CHECK_FUNCS([asprintf fwprintf newlocale putenv setenv setlocale \ -+ snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb]) -+ -+ dnl Use the _snprintf function only if it is declared (because on NetBSD it -+ dnl is defined as a weak alias of snprintf; we prefer to use the latter). -+ AC_CHECK_DECLS([_snprintf, _snwprintf], , , [#include ]) -+ -+ dnl Use the *_unlocked functions only if they are declared. -+ dnl (because some of them were defined without being declared in Solaris -+ dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built -+ dnl on Solaris 2.5.1 to run on Solaris 2.6). -+ AC_CHECK_DECLS([getc_unlocked], , , [#include ]) -+ -+ case $gt_cv_func_printf_posix in -+ *yes) HAVE_POSIX_PRINTF=1 ;; -+ *) HAVE_POSIX_PRINTF=0 ;; -+ esac -+ AC_SUBST([HAVE_POSIX_PRINTF]) -+ if test "$ac_cv_func_asprintf" = yes; then -+ HAVE_ASPRINTF=1 -+ else -+ HAVE_ASPRINTF=0 -+ fi -+ AC_SUBST([HAVE_ASPRINTF]) -+ if test "$ac_cv_func_snprintf" = yes; then -+ HAVE_SNPRINTF=1 -+ else -+ HAVE_SNPRINTF=0 -+ fi -+ AC_SUBST([HAVE_SNPRINTF]) -+ if test "$ac_cv_func_newlocale" = yes; then -+ HAVE_NEWLOCALE=1 -+ else -+ HAVE_NEWLOCALE=0 -+ fi -+ AC_SUBST([HAVE_NEWLOCALE]) -+ if test "$ac_cv_func_wprintf" = yes; then -+ HAVE_WPRINTF=1 -+ else -+ HAVE_WPRINTF=0 -+ fi -+ AC_SUBST([HAVE_WPRINTF]) -+ -+ AM_LANGINFO_CODESET -+ gt_LC_MESSAGES -+ -+ dnl Compilation on mingw and Cygwin needs special Makefile rules, because -+ dnl 1. when we install a shared library, we must arrange to export -+ dnl auxiliary pointer variables for every exported variable, -+ dnl 2. when we install a shared library and a static library simultaneously, -+ dnl the include file specifies __declspec(dllimport) and therefore we -+ dnl must arrange to define the auxiliary pointer variables for the -+ dnl exported variables _also_ in the static library. -+ if test "$enable_shared" = yes; then -+ case "$host_os" in -+ mingw* | cygwin*) is_woe32dll=yes ;; -+ *) is_woe32dll=no ;; -+ esac -+ else -+ is_woe32dll=no -+ fi -+ WOE32DLL=$is_woe32dll -+ AC_SUBST([WOE32DLL]) -+ -+ dnl On mingw and Cygwin, we can activate special Makefile rules which add -+ dnl version information to the shared libraries and executables. -+ case "$host_os" in -+ mingw* | cygwin*) is_woe32=yes ;; -+ *) is_woe32=no ;; -+ esac -+ WOE32=$is_woe32 -+ AC_SUBST([WOE32]) -+ if test $WOE32 = yes; then -+ dnl Check for a program that compiles Windows resource files. -+ AC_CHECK_TOOL([WINDRES], [windres]) -+ fi -+ -+ dnl Determine whether when creating a library, "-lc" should be passed to -+ dnl libtool or not. On many platforms, it is required for the libtool option -+ dnl -no-undefined to work. On HP-UX, however, the -lc - stored by libtool -+ dnl in the *.la files - makes it impossible to create multithreaded programs, -+ dnl because libtool also reorders the -lc to come before the -pthread, and -+ dnl this disables pthread_create() . -+ case "$host_os" in -+ hpux*) LTLIBC="" ;; -+ *) LTLIBC="-lc" ;; -+ esac -+ AC_SUBST([LTLIBC]) -+ -+ dnl Rename some macros and functions used for locking. -+ AH_BOTTOM([ -+#define __libc_lock_t gl_lock_t -+#define __libc_lock_define gl_lock_define -+#define __libc_lock_define_initialized gl_lock_define_initialized -+#define __libc_lock_init gl_lock_init -+#define __libc_lock_lock gl_lock_lock -+#define __libc_lock_unlock gl_lock_unlock -+#define __libc_lock_recursive_t gl_recursive_lock_t -+#define __libc_lock_define_recursive gl_recursive_lock_define -+#define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized -+#define __libc_lock_init_recursive gl_recursive_lock_init -+#define __libc_lock_lock_recursive gl_recursive_lock_lock -+#define __libc_lock_unlock_recursive gl_recursive_lock_unlock -+#define glthread_in_use libintl_thread_in_use -+#define glthread_lock_init_func libintl_lock_init_func -+#define glthread_lock_lock_func libintl_lock_lock_func -+#define glthread_lock_unlock_func libintl_lock_unlock_func -+#define glthread_lock_destroy_func libintl_lock_destroy_func -+#define glthread_rwlock_init_multithreaded libintl_rwlock_init_multithreaded -+#define glthread_rwlock_init_func libintl_rwlock_init_func -+#define glthread_rwlock_rdlock_multithreaded libintl_rwlock_rdlock_multithreaded -+#define glthread_rwlock_rdlock_func libintl_rwlock_rdlock_func -+#define glthread_rwlock_wrlock_multithreaded libintl_rwlock_wrlock_multithreaded -+#define glthread_rwlock_wrlock_func libintl_rwlock_wrlock_func -+#define glthread_rwlock_unlock_multithreaded libintl_rwlock_unlock_multithreaded -+#define glthread_rwlock_unlock_func libintl_rwlock_unlock_func -+#define glthread_rwlock_destroy_multithreaded libintl_rwlock_destroy_multithreaded -+#define glthread_rwlock_destroy_func libintl_rwlock_destroy_func -+#define glthread_recursive_lock_init_multithreaded libintl_recursive_lock_init_multithreaded -+#define glthread_recursive_lock_init_func libintl_recursive_lock_init_func -+#define glthread_recursive_lock_lock_multithreaded libintl_recursive_lock_lock_multithreaded -+#define glthread_recursive_lock_lock_func libintl_recursive_lock_lock_func -+#define glthread_recursive_lock_unlock_multithreaded libintl_recursive_lock_unlock_multithreaded -+#define glthread_recursive_lock_unlock_func libintl_recursive_lock_unlock_func -+#define glthread_recursive_lock_destroy_multithreaded libintl_recursive_lock_destroy_multithreaded -+#define glthread_recursive_lock_destroy_func libintl_recursive_lock_destroy_func -+#define glthread_once_func libintl_once_func -+#define glthread_once_singlethreaded libintl_once_singlethreaded -+#define glthread_once_multithreaded libintl_once_multithreaded -+]) -+]) -+ -+ -+dnl Checks for the core files of the intl subdirectory: -+dnl dcigettext.c -+dnl eval-plural.h -+dnl explodename.c -+dnl finddomain.c -+dnl gettextP.h -+dnl gmo.h -+dnl hash-string.h hash-string.c -+dnl l10nflist.c -+dnl libgnuintl.h.in (except the *printf stuff) -+dnl loadinfo.h -+dnl loadmsgcat.c -+dnl localealias.c -+dnl log.c -+dnl plural-exp.h plural-exp.c -+dnl plural.y -+dnl Used by libglocale. -+AC_DEFUN([gt_INTL_SUBDIR_CORE], -+[ -+ AC_REQUIRE([AC_C_INLINE])dnl -+ AC_REQUIRE([AC_TYPE_SIZE_T])dnl -+ AC_REQUIRE([gl_AC_HEADER_STDINT_H]) -+ AC_REQUIRE([AC_FUNC_ALLOCA])dnl -+ AC_REQUIRE([AC_FUNC_MMAP])dnl -+ AC_REQUIRE([gt_INTDIV0])dnl -+ AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl -+ AC_REQUIRE([gt_INTTYPES_PRI])dnl -+ AC_REQUIRE([gl_LOCK])dnl -+ -+ AC_LINK_IFELSE( -+ [AC_LANG_PROGRAM( -+ [[int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; }]], -+ [[]])], -+ [AC_DEFINE([HAVE_BUILTIN_EXPECT], [1], -+ [Define to 1 if the compiler understands __builtin_expect.])]) -+ -+ AC_CHECK_HEADERS([argz.h inttypes.h limits.h unistd.h sys/param.h]) -+ AC_CHECK_FUNCS([getcwd getegid geteuid getgid getuid mempcpy munmap \ -+ stpcpy strcasecmp strdup strtoul tsearch uselocale argz_count \ -+ argz_stringify argz_next __fsetlocking]) -+ -+ dnl Solaris 12 provides getlocalename_l, while Illumos doesn't have -+ dnl it nor the equivalent. -+ if test $ac_cv_func_uselocale = yes; then -+ AC_CHECK_FUNCS([getlocalename_l]) -+ fi -+ -+ dnl Use the *_unlocked functions only if they are declared. -+ dnl (because some of them were defined without being declared in Solaris -+ dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built -+ dnl on Solaris 2.5.1 to run on Solaris 2.6). -+ AC_CHECK_DECLS([feof_unlocked, fgets_unlocked], , , [#include ]) -+ -+ AM_ICONV -+ -+ dnl intl/plural.c is generated from intl/plural.y. It requires bison, -+ dnl because plural.y uses bison specific features. It requires at least -+ dnl bison-2.7 for %define api.pure. -+ dnl bison is only needed for the maintainer (who touches plural.y). But in -+ dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put -+ dnl the rule in general Makefile. Now, some people carelessly touch the -+ dnl files or have a broken "make" program, hence the plural.c rule will -+ dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not -+ dnl present or too old. -+ AC_CHECK_PROGS([INTLBISON], [bison]) -+ if test -z "$INTLBISON"; then -+ ac_verc_fail=yes -+ else -+ dnl Found it, now check the version. -+ AC_MSG_CHECKING([version of bison]) -+changequote(<<,>>)dnl -+ ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` -+ case $ac_prog_version in -+ '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -+ 2.[7-9]* | [3-9].*) -+changequote([,])dnl -+ ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; -+ *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; -+ esac -+ AC_MSG_RESULT([$ac_prog_version]) -+ fi -+ if test $ac_verc_fail = yes; then -+ INTLBISON=: -+ fi -+]) -+ -+dnl Copies _GL_UNUSED and _GL_ATTRIBUTE_PURE definitions from -+dnl gnulib-common.m4 as a fallback, if the project isn't using Gnulib. -+AC_DEFUN([gt_GL_ATTRIBUTE], [ -+ m4_ifndef([gl_[]COMMON], -+ AH_VERBATIM([gt_gl_attribute], -+[/* Define as a marker that can be attached to declarations that might not -+ be used. This helps to reduce warnings, such as from -+ GCC -Wunused-parameter. */ -+#ifndef _GL_UNUSED -+# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -+# define _GL_UNUSED __attribute__ ((__unused__)) -+# else -+# define _GL_UNUSED -+# endif -+#endif -+ -+/* The __pure__ attribute was added in gcc 2.96. */ -+#ifndef _GL_ATTRIBUTE_PURE -+# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) -+# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) -+# else -+# define _GL_ATTRIBUTE_PURE /* empty */ -+# endif -+#endif -+]))]) -diff -durN inetutils-1.9.4.orig/m4/intldir.m4 inetutils-1.9.4/m4/intldir.m4 ---- inetutils-1.9.4.orig/m4/intldir.m4 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/m4/intldir.m4 2017-05-15 17:51:56.453125000 +0800 -@@ -0,0 +1,19 @@ -+# intldir.m4 serial 2 (gettext-0.18) -+dnl Copyright (C) 2006, 2009-2014, 2016 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+dnl -+dnl This file can be used in projects which are not available under -+dnl the GNU General Public License or the GNU Library General Public -+dnl License but which still want to provide support for the GNU gettext -+dnl functionality. -+dnl Please note that the actual code of the GNU gettext library is covered -+dnl by the GNU Library General Public License, and the rest of the GNU -+dnl gettext package is covered by the GNU General Public License. -+dnl They are *not* in the public domain. -+ -+AC_PREREQ([2.52]) -+ -+dnl Tells the AM_GNU_GETTEXT macro to consider an intl/ directory. -+AC_DEFUN([AM_GNU_GETTEXT_INTL_SUBDIR], []) -diff -durN inetutils-1.9.4.orig/m4/intlmacosx.m4 inetutils-1.9.4/m4/intlmacosx.m4 ---- inetutils-1.9.4.orig/m4/intlmacosx.m4 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/m4/intlmacosx.m4 2017-05-15 17:51:56.578125000 +0800 -@@ -0,0 +1,56 @@ -+# intlmacosx.m4 serial 5 (gettext-0.18.2) -+dnl Copyright (C) 2004-2014, 2016 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+dnl -+dnl This file can be used in projects which are not available under -+dnl the GNU General Public License or the GNU Library General Public -+dnl License but which still want to provide support for the GNU gettext -+dnl functionality. -+dnl Please note that the actual code of the GNU gettext library is covered -+dnl by the GNU Library General Public License, and the rest of the GNU -+dnl gettext package is covered by the GNU General Public License. -+dnl They are *not* in the public domain. -+ -+dnl Checks for special options needed on Mac OS X. -+dnl Defines INTL_MACOSX_LIBS. -+AC_DEFUN([gt_INTL_MACOSX], -+[ -+ dnl Check for API introduced in Mac OS X 10.2. -+ AC_CACHE_CHECK([for CFPreferencesCopyAppValue], -+ [gt_cv_func_CFPreferencesCopyAppValue], -+ [gt_save_LIBS="$LIBS" -+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" -+ AC_LINK_IFELSE( -+ [AC_LANG_PROGRAM( -+ [[#include ]], -+ [[CFPreferencesCopyAppValue(NULL, NULL)]])], -+ [gt_cv_func_CFPreferencesCopyAppValue=yes], -+ [gt_cv_func_CFPreferencesCopyAppValue=no]) -+ LIBS="$gt_save_LIBS"]) -+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then -+ AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1], -+ [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) -+ fi -+ dnl Check for API introduced in Mac OS X 10.3. -+ AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent], -+ [gt_save_LIBS="$LIBS" -+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" -+ AC_LINK_IFELSE( -+ [AC_LANG_PROGRAM( -+ [[#include ]], -+ [[CFLocaleCopyCurrent();]])], -+ [gt_cv_func_CFLocaleCopyCurrent=yes], -+ [gt_cv_func_CFLocaleCopyCurrent=no]) -+ LIBS="$gt_save_LIBS"]) -+ if test $gt_cv_func_CFLocaleCopyCurrent = yes; then -+ AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1], -+ [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) -+ fi -+ INTL_MACOSX_LIBS= -+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then -+ INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" -+ fi -+ AC_SUBST([INTL_MACOSX_LIBS]) -+]) -diff -durN inetutils-1.9.4.orig/m4/intmax.m4 inetutils-1.9.4/m4/intmax.m4 ---- inetutils-1.9.4.orig/m4/intmax.m4 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/m4/intmax.m4 2017-05-15 17:51:56.703125000 +0800 -@@ -0,0 +1,36 @@ -+# intmax.m4 serial 6 (gettext-0.18.2) -+dnl Copyright (C) 2002-2005, 2008-2017 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+dnl From Bruno Haible. -+dnl Test whether the system has the 'intmax_t' type, but don't attempt to -+dnl find a replacement if it is lacking. -+ -+AC_DEFUN([gt_TYPE_INTMAX_T], -+[ -+ AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) -+ AC_REQUIRE([gl_AC_HEADER_STDINT_H]) -+ AC_CACHE_CHECK([for intmax_t], [gt_cv_c_intmax_t], -+ [AC_COMPILE_IFELSE( -+ [AC_LANG_PROGRAM( -+ [[ -+#include -+#include -+#if HAVE_STDINT_H_WITH_UINTMAX -+#include -+#endif -+#if HAVE_INTTYPES_H_WITH_UINTMAX -+#include -+#endif -+ ]], -+ [[intmax_t x = -1; -+ return !x;]])], -+ [gt_cv_c_intmax_t=yes], -+ [gt_cv_c_intmax_t=no])]) -+ if test $gt_cv_c_intmax_t = yes; then -+ AC_DEFINE([HAVE_INTMAX_T], [1], -+ [Define if you have the 'intmax_t' type in or .]) -+ fi -+]) -diff -durN inetutils-1.9.4.orig/m4/intmax_t.m4 inetutils-1.9.4/m4/intmax_t.m4 ---- inetutils-1.9.4.orig/m4/intmax_t.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/intmax_t.m4 2017-05-15 17:51:56.859375000 +0800 -@@ -1,5 +1,5 @@ - # intmax_t.m4 serial 8 --dnl Copyright (C) 1997-2004, 2006-2007, 2009-2015 Free Software Foundation, -+dnl Copyright (C) 1997-2004, 2006-2007, 2009-2017 Free Software Foundation, - dnl Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, -diff -durN inetutils-1.9.4.orig/m4/inttostr.m4 inetutils-1.9.4/m4/inttostr.m4 ---- inetutils-1.9.4.orig/m4/inttostr.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/inttostr.m4 2017-05-15 17:51:56.968750000 +0800 -@@ -1,5 +1,5 @@ - #serial 8 --dnl Copyright (C) 2004-2006, 2009-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2004-2006, 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/inttypes_h.m4 inetutils-1.9.4/m4/inttypes_h.m4 ---- inetutils-1.9.4.orig/m4/inttypes_h.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/inttypes_h.m4 2017-05-15 17:51:57.218750000 +0800 -@@ -1,5 +1,5 @@ - # inttypes_h.m4 serial 10 --dnl Copyright (C) 1997-2004, 2006, 2008-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 1997-2004, 2006, 2008-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/inttypes-pri.m4 inetutils-1.9.4/m4/inttypes-pri.m4 ---- inetutils-1.9.4.orig/m4/inttypes-pri.m4 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/m4/inttypes-pri.m4 2017-05-15 17:51:57.093750000 +0800 -@@ -0,0 +1,42 @@ -+# inttypes-pri.m4 serial 7 (gettext-0.18.2) -+dnl Copyright (C) 1997-2002, 2006, 2008-2017 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+dnl From Bruno Haible. -+ -+AC_PREREQ([2.53]) -+ -+# Define PRI_MACROS_BROKEN if exists and defines the PRI* -+# macros to non-string values. This is the case on AIX 4.3.3. -+ -+AC_DEFUN([gt_INTTYPES_PRI], -+[ -+ AC_CHECK_HEADERS([inttypes.h]) -+ if test $ac_cv_header_inttypes_h = yes; then -+ AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], -+ [gt_cv_inttypes_pri_broken], -+ [ -+ AC_COMPILE_IFELSE( -+ [AC_LANG_PROGRAM( -+ [[ -+#include -+#ifdef PRId32 -+char *p = PRId32; -+#endif -+ ]], -+ [[]])], -+ [gt_cv_inttypes_pri_broken=no], -+ [gt_cv_inttypes_pri_broken=yes]) -+ ]) -+ fi -+ if test "$gt_cv_inttypes_pri_broken" = yes; then -+ AC_DEFINE_UNQUOTED([PRI_MACROS_BROKEN], [1], -+ [Define if exists and defines unusable PRI* macros.]) -+ PRI_MACROS_BROKEN=1 -+ else -+ PRI_MACROS_BROKEN=0 -+ fi -+ AC_SUBST([PRI_MACROS_BROKEN]) -+]) -diff -durN inetutils-1.9.4.orig/m4/ioctl.m4 inetutils-1.9.4/m4/ioctl.m4 ---- inetutils-1.9.4.orig/m4/ioctl.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/ioctl.m4 2017-05-15 17:51:57.359375000 +0800 -@@ -1,5 +1,5 @@ - # ioctl.m4 serial 4 --dnl Copyright (C) 2008-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2008-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/langinfo_h.m4 inetutils-1.9.4/m4/langinfo_h.m4 ---- inetutils-1.9.4.orig/m4/langinfo_h.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/langinfo_h.m4 2017-05-15 17:51:57.546875000 +0800 -@@ -1,5 +1,5 @@ - # langinfo_h.m4 serial 7 --dnl Copyright (C) 2009-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/largefile.m4 inetutils-1.9.4/m4/largefile.m4 ---- inetutils-1.9.4.orig/m4/largefile.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/largefile.m4 2017-05-15 17:51:57.687500000 +0800 -@@ -1,6 +1,6 @@ - # Enable large files on systems where this is not the default. - --# Copyright 1992-1996, 1998-2015 Free Software Foundation, Inc. -+# Copyright 1992-1996, 1998-2017 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. -@@ -126,9 +126,24 @@ - else - WINDOWS_64_BIT_OFF_T=0 - fi -- dnl But all native Windows platforms (including mingw64) have a 32-bit -- dnl st_size member in 'struct stat'. -- WINDOWS_64_BIT_ST_SIZE=1 -+ dnl Some mingw versions define, if _FILE_OFFSET_BITS=64, 'struct stat' -+ dnl to 'struct _stat32i64' or 'struct _stat64' (depending on -+ dnl _USE_32BIT_TIME_T), which has a 32-bit st_size member. -+ AC_CACHE_CHECK([for 64-bit st_size], [gl_cv_member_st_size_64], -+ [AC_COMPILE_IFELSE( -+ [AC_LANG_PROGRAM( -+ [[#include -+ struct stat buf; -+ int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1]; -+ ]], -+ [[]])], -+ [gl_cv_member_st_size_64=yes], [gl_cv_member_st_size_64=no]) -+ ]) -+ if test $gl_cv_member_st_size_64 = no; then -+ WINDOWS_64_BIT_ST_SIZE=1 -+ else -+ WINDOWS_64_BIT_ST_SIZE=0 -+ fi - ;; - *) - dnl Nothing to do on gnulib's side. -diff -durN inetutils-1.9.4.orig/m4/lcmessage.m4 inetutils-1.9.4/m4/lcmessage.m4 ---- inetutils-1.9.4.orig/m4/lcmessage.m4 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/m4/lcmessage.m4 2017-05-15 17:51:57.796875000 +0800 -@@ -0,0 +1,35 @@ -+# lcmessage.m4 serial 7 (gettext-0.18.2) -+dnl Copyright (C) 1995-2002, 2004-2005, 2008-2014, 2016 Free Software -+dnl Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+dnl -+dnl This file can be used in projects which are not available under -+dnl the GNU General Public License or the GNU Library General Public -+dnl License but which still want to provide support for the GNU gettext -+dnl functionality. -+dnl Please note that the actual code of the GNU gettext library is covered -+dnl by the GNU Library General Public License, and the rest of the GNU -+dnl gettext package is covered by the GNU General Public License. -+dnl They are *not* in the public domain. -+ -+dnl Authors: -+dnl Ulrich Drepper , 1995. -+ -+# Check whether LC_MESSAGES is available in . -+ -+AC_DEFUN([gt_LC_MESSAGES], -+[ -+ AC_CACHE_CHECK([for LC_MESSAGES], [gt_cv_val_LC_MESSAGES], -+ [AC_LINK_IFELSE( -+ [AC_LANG_PROGRAM( -+ [[#include ]], -+ [[return LC_MESSAGES]])], -+ [gt_cv_val_LC_MESSAGES=yes], -+ [gt_cv_val_LC_MESSAGES=no])]) -+ if test $gt_cv_val_LC_MESSAGES = yes; then -+ AC_DEFINE([HAVE_LC_MESSAGES], [1], -+ [Define if your file defines LC_MESSAGES.]) -+ fi -+]) -diff -durN inetutils-1.9.4.orig/m4/lib-ld.m4 inetutils-1.9.4/m4/lib-ld.m4 ---- inetutils-1.9.4.orig/m4/lib-ld.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/lib-ld.m4 2017-05-15 17:51:57.921875000 +0800 -@@ -1,5 +1,5 @@ --# lib-ld.m4 serial 6 --dnl Copyright (C) 1996-2003, 2009-2015 Free Software Foundation, Inc. -+# lib-ld.m4 serial 7 -+dnl Copyright (C) 1996-2003, 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -@@ -47,73 +47,101 @@ - } - fi - --ac_prog=ld --if test "$GCC" = yes; then -- # Check if gcc -print-prog-name=ld gives a path. -+if test -n "$LD"; then -+ AC_MSG_CHECKING([for ld]) -+elif test "$GCC" = yes; then - AC_MSG_CHECKING([for ld used by $CC]) -- case $host in -- *-*-mingw*) -- # gcc leaves a trailing carriage return which upsets mingw -- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; -- *) -- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; -- esac -- case $ac_prog in -- # Accept absolute paths. -- [[\\/]]* | ?:[[\\/]]*) -- re_direlt='/[[^/]][[^/]]*/\.\./' -- # Canonicalize the pathname of ld -- ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'` -- while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do -- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` -- done -- test -z "$LD" && LD="$ac_prog" -- ;; -- "") -- # If it fails, then pretend we aren't using GCC. -- ac_prog=ld -- ;; -- *) -- # If it is relative, then search for the first ld in PATH. -- with_gnu_ld=unknown -- ;; -- esac - elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) - else - AC_MSG_CHECKING([for non-GNU ld]) - fi --AC_CACHE_VAL([acl_cv_path_LD], --[if test -z "$LD"; then -- acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -- for ac_dir in $PATH; do -- IFS="$acl_save_ifs" -- test -z "$ac_dir" && ac_dir=. -- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then -- acl_cv_path_LD="$ac_dir/$ac_prog" -- # Check to see if the program is GNU ld. I'd rather use --version, -- # but apparently some variants of GNU ld only accept -v. -- # Break only if it was the GNU/non-GNU ld that we prefer. -- case `"$acl_cv_path_LD" -v 2>&1 &5 | tr -d '\015'` ;; -+ *) -+ acl_output=`($CC -print-prog-name=ld) 2>&5` ;; -+ esac -+ case $acl_output in -+ # Accept absolute paths. -+ [[\\/]]* | ?:[[\\/]]*) -+ re_direlt='/[[^/]][[^/]]*/\.\./' -+ # Canonicalize the pathname of ld -+ acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'` -+ while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do -+ acl_output=`echo $acl_output | sed "s%$re_direlt%/%"` -+ done -+ # Got the pathname. No search in PATH is needed. -+ acl_cv_path_LD="$acl_output" -+ ac_prog= -+ ;; -+ "") -+ # If it fails, then pretend we aren't using GCC. -+ ;; -+ *) -+ # If it is relative, then search for the first ld in PATH. -+ with_gnu_ld=unknown -+ ;; - esac - fi -- done -- IFS="$acl_save_ifs" --else -- acl_cv_path_LD="$LD" # Let the user override the test with a path. --fi]) --LD="$acl_cv_path_LD" -+ if test -n "$ac_prog"; then -+ # Search for $ac_prog in $PATH. -+ acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -+ for ac_dir in $PATH; do -+ IFS="$acl_save_ifs" -+ test -z "$ac_dir" && ac_dir=. -+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then -+ acl_cv_path_LD="$ac_dir/$ac_prog" -+ # Check to see if the program is GNU ld. I'd rather use --version, -+ # but apparently some variants of GNU ld only accept -v. -+ # Break only if it was the GNU/non-GNU ld that we prefer. -+ case `"$acl_cv_path_LD" -v 2>&1 Solaris 64-bit Developer's Guide > The Development Environment -- dnl . -- dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." -- dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the -- dnl symlink is missing, so we set acl_libdirstem2 too. -- AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], -- [AC_EGREP_CPP([sixtyfour bits], [ -+ dnl Allow the user to override the result by setting acl_cv_libdirstems. -+ AC_CACHE_CHECK([for the common suffixes of directories in the library search path], -+ [acl_cv_libdirstems], -+ [acl_libdirstem=lib -+ acl_libdirstem2= -+ case "$host_os" in -+ solaris*) -+ dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment -+ dnl . -+ dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." -+ dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the -+ dnl symlink is missing, so we set acl_libdirstem2 too. -+ AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], -+ [AC_EGREP_CPP([sixtyfour bits], [ - #ifdef _LP64 - sixtyfour bits - #endif -- ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) -- ]) -- if test $gl_cv_solaris_64bit = yes; then -- acl_libdirstem=lib/64 -- case "$host_cpu" in -- sparc*) acl_libdirstem2=lib/sparcv9 ;; -- i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; -- esac -- fi -- ;; -- *) -- searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` -- if test -n "$searchpath"; then -- acl_save_IFS="${IFS= }"; IFS=":" -- for searchdir in $searchpath; do -- if test -d "$searchdir"; then -- case "$searchdir" in -- */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; -- */../ | */.. ) -- # Better ignore directories of this form. They are misleading. -- ;; -- *) searchdir=`cd "$searchdir" && pwd` -- case "$searchdir" in -- */lib64 ) acl_libdirstem=lib64 ;; -- esac ;; -- esac -- fi -- done -- IFS="$acl_save_IFS" -- fi -- ;; -- esac -- test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" -+ ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) -+ ]) -+ if test $gl_cv_solaris_64bit = yes; then -+ acl_libdirstem=lib/64 -+ case "$host_cpu" in -+ sparc*) acl_libdirstem2=lib/sparcv9 ;; -+ i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; -+ esac -+ fi -+ ;; -+ *) -+ dnl The result is a property of the system. However, non-system -+ dnl compilers sometimes have odd library search paths. Therefore -+ dnl prefer asking /usr/bin/gcc, if available, rather than $CC. -+ searchpath=`(if test -f /usr/bin/gcc \ -+ && LC_ALL=C /usr/bin/gcc -print-search-dirs >/dev/null 2>/dev/null; then \ -+ LC_ALL=C /usr/bin/gcc -print-search-dirs; \ -+ else \ -+ LC_ALL=C $CC -print-search-dirs; \ -+ fi) 2>/dev/null \ -+ | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` -+ if test -n "$searchpath"; then -+ acl_save_IFS="${IFS= }"; IFS=":" -+ for searchdir in $searchpath; do -+ if test -d "$searchdir"; then -+ case "$searchdir" in -+ */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; -+ */../ | */.. ) -+ # Better ignore directories of this form. They are misleading. -+ ;; -+ *) searchdir=`cd "$searchdir" && pwd` -+ case "$searchdir" in -+ */lib64 ) acl_libdirstem=lib64 ;; -+ esac ;; -+ esac -+ fi -+ done -+ IFS="$acl_save_IFS" -+ fi -+ ;; -+ esac -+ test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" -+ acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2" -+ ]) -+ # Decompose acl_cv_libdirstems into acl_libdirstem and acl_libdirstem2. -+ acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'` -+ acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e '/,/s/.*,//'` - ]) -diff -durN inetutils-1.9.4.orig/m4/limits-h.m4 inetutils-1.9.4/m4/limits-h.m4 ---- inetutils-1.9.4.orig/m4/limits-h.m4 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/m4/limits-h.m4 2017-05-15 17:51:58.265625000 +0800 -@@ -0,0 +1,31 @@ -+dnl Check whether limits.h has needed features. -+ -+dnl Copyright 2016-2017 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+dnl From Paul Eggert. -+ -+AC_DEFUN_ONCE([gl_LIMITS_H], -+[ -+ gl_CHECK_NEXT_HEADERS([limits.h]) -+ -+ AC_CACHE_CHECK([whether limits.h has ULLONG_WIDTH etc.], -+ [gl_cv_header_limits_width], -+ [AC_COMPILE_IFELSE( -+ [AC_LANG_PROGRAM([[#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ -+ #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 -+ #endif -+ #include -+ int ullw = ULLONG_WIDTH;]])], -+ [gl_cv_header_limits_width=yes], -+ [gl_cv_header_limits_width=no])]) -+ if test "$gl_cv_header_limits_width" = yes; then -+ LIMITS_H= -+ else -+ LIMITS_H=limits.h -+ fi -+ AC_SUBST([LIMITS_H]) -+ AM_CONDITIONAL([GL_GENERATE_LIMITS_H], [test -n "$LIMITS_H"]) -+]) -diff -durN inetutils-1.9.4.orig/m4/localcharset.m4 inetutils-1.9.4/m4/localcharset.m4 ---- inetutils-1.9.4.orig/m4/localcharset.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/localcharset.m4 2017-05-15 17:51:58.390625000 +0800 -@@ -1,5 +1,5 @@ - # localcharset.m4 serial 7 --dnl Copyright (C) 2002, 2004, 2006, 2009-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2002, 2004, 2006, 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/locale_h.m4 inetutils-1.9.4/m4/locale_h.m4 ---- inetutils-1.9.4.orig/m4/locale_h.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/locale_h.m4 2017-05-15 17:51:58.984375000 +0800 -@@ -1,5 +1,5 @@ - # locale_h.m4 serial 19 --dnl Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/localeconv.m4 inetutils-1.9.4/m4/localeconv.m4 ---- inetutils-1.9.4.orig/m4/localeconv.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/localeconv.m4 2017-05-15 17:51:59.171875000 +0800 -@@ -1,5 +1,5 @@ - # localeconv.m4 serial 1 --dnl Copyright (C) 2012-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2012-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/locale-fr.m4 inetutils-1.9.4/m4/locale-fr.m4 ---- inetutils-1.9.4.orig/m4/locale-fr.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/locale-fr.m4 2017-05-15 17:51:58.531250000 +0800 -@@ -1,5 +1,5 @@ - # locale-fr.m4 serial 17 --dnl Copyright (C) 2003, 2005-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2003, 2005-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/locale-ja.m4 inetutils-1.9.4/m4/locale-ja.m4 ---- inetutils-1.9.4.orig/m4/locale-ja.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/locale-ja.m4 2017-05-15 17:51:58.671875000 +0800 -@@ -1,5 +1,5 @@ - # locale-ja.m4 serial 12 --dnl Copyright (C) 2003, 2005-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2003, 2005-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/locale-zh.m4 inetutils-1.9.4/m4/locale-zh.m4 ---- inetutils-1.9.4.orig/m4/locale-zh.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/locale-zh.m4 2017-05-15 17:51:58.812500000 +0800 -@@ -1,5 +1,5 @@ - # locale-zh.m4 serial 12 --dnl Copyright (C) 2003, 2005-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2003, 2005-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/localtime-buffer.m4 inetutils-1.9.4/m4/localtime-buffer.m4 ---- inetutils-1.9.4.orig/m4/localtime-buffer.m4 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/m4/localtime-buffer.m4 2017-05-15 17:51:59.296875000 +0800 -@@ -0,0 +1,21 @@ -+# localtime-buffer.m4 serial 1 -+dnl Copyright (C) 2017 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+AC_DEFUN([gl_LOCALTIME_BUFFER_DEFAULTS], -+[ -+ NEED_LOCALTIME_BUFFER=0 -+]) -+ -+dnl Macro invoked from other modules, to signal that the compilation of -+dnl module 'localtime-buffer' is needed. -+AC_DEFUN([gl_LOCALTIME_BUFFER_NEEDED], -+[ -+ AC_REQUIRE([gl_LOCALTIME_BUFFER_DEFAULTS]) -+ AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) -+ NEED_LOCALTIME_BUFFER=1 -+ REPLACE_GMTIME=1 -+ REPLACE_LOCALTIME=1 -+]) -diff -durN inetutils-1.9.4.orig/m4/lock.m4 inetutils-1.9.4/m4/lock.m4 ---- inetutils-1.9.4.orig/m4/lock.m4 2015-03-31 15:08:17.000000000 +0800 -+++ inetutils-1.9.4/m4/lock.m4 2017-05-15 17:51:59.437500000 +0800 -@@ -1,5 +1,5 @@ --# lock.m4 serial 13 (gettext-0.18.2) --dnl Copyright (C) 2005-2015 Free Software Foundation, Inc. -+# lock.m4 serial 14 -+dnl Copyright (C) 2005-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -@@ -12,11 +12,16 @@ - if test "$gl_threads_api" = posix; then - # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the - # pthread_rwlock_* functions. -+ has_rwlock=false - AC_CHECK_TYPE([pthread_rwlock_t], -- [AC_DEFINE([HAVE_PTHREAD_RWLOCK], [1], -+ [has_rwlock=true -+ AC_DEFINE([HAVE_PTHREAD_RWLOCK], [1], - [Define if the POSIX multithreading library has read/write locks.])], - [], - [#include ]) -+ if $has_rwlock; then -+ gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER -+ fi - # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM( -diff -durN inetutils-1.9.4.orig/m4/longlong.m4 inetutils-1.9.4/m4/longlong.m4 ---- inetutils-1.9.4.orig/m4/longlong.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/longlong.m4 2017-05-15 17:51:59.562500000 +0800 -@@ -1,5 +1,5 @@ - # longlong.m4 serial 17 --dnl Copyright (C) 1999-2007, 2009-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 1999-2007, 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/lseek.m4 inetutils-1.9.4/m4/lseek.m4 ---- inetutils-1.9.4.orig/m4/lseek.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/lseek.m4 2017-05-15 17:51:59.703125000 +0800 -@@ -1,5 +1,5 @@ - # lseek.m4 serial 10 --dnl Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/lstat.m4 inetutils-1.9.4/m4/lstat.m4 ---- inetutils-1.9.4.orig/m4/lstat.m4 2015-05-12 20:15:30.000000000 +0800 -+++ inetutils-1.9.4/m4/lstat.m4 2017-05-15 17:51:59.843750000 +0800 -@@ -1,6 +1,6 @@ - # serial 27 - --# Copyright (C) 1997-2001, 2003-2015 Free Software Foundation, Inc. -+# Copyright (C) 1997-2001, 2003-2017 Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -diff -durN inetutils-1.9.4.orig/m4/malloc.m4 inetutils-1.9.4/m4/malloc.m4 ---- inetutils-1.9.4.orig/m4/malloc.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/malloc.m4 2017-05-15 17:52:00.000000000 +0800 -@@ -1,13 +1,13 @@ --# malloc.m4 serial 14 --dnl Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. -+# malloc.m4 serial 15 -+dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. - - m4_version_prereq([2.70], [] ,[ - --# This is taken from the following Autoconf patch: --# http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=7fbb553727ed7e0e689a17594b58559ecf3ea6e9 -+# This is adapted with modifications from upstream Autoconf here: -+# http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c - AC_DEFUN([_AC_FUNC_MALLOC_IF], - [ - AC_REQUIRE([AC_HEADER_STDC])dnl -@@ -23,7 +23,10 @@ - char *malloc (); - #endif - ]], -- [[return ! malloc (0);]]) -+ [[char *p = malloc (0); -+ int result = !p; -+ free (p); -+ return result;]]) - ], - [ac_cv_func_malloc_0_nonnull=yes], - [ac_cv_func_malloc_0_nonnull=no], -diff -durN inetutils-1.9.4.orig/m4/malloca.m4 inetutils-1.9.4/m4/malloca.m4 ---- inetutils-1.9.4.orig/m4/malloca.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/malloca.m4 2017-05-15 17:52:00.156250000 +0800 -@@ -1,5 +1,5 @@ - # malloca.m4 serial 1 --dnl Copyright (C) 2003-2004, 2006-2007, 2009-2015 Free Software Foundation, -+dnl Copyright (C) 2003-2004, 2006-2007, 2009-2017 Free Software Foundation, - dnl Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, -diff -durN inetutils-1.9.4.orig/m4/math_h.m4 inetutils-1.9.4/m4/math_h.m4 ---- inetutils-1.9.4.orig/m4/math_h.m4 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/m4/math_h.m4 2017-05-15 17:52:00.296875000 +0800 -@@ -0,0 +1,365 @@ -+# math_h.m4 serial 115 -+dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+AC_DEFUN([gl_MATH_H], -+[ -+ AC_REQUIRE([gl_MATH_H_DEFAULTS]) -+ gl_CHECK_NEXT_HEADERS([math.h]) -+ -+ AC_CACHE_CHECK([whether NAN macro works], [gl_cv_header_math_nan_works], -+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include ]], -+ [[/* Solaris 10 has a broken definition of NAN. Other platforms -+ fail to provide NAN, or provide it only in C99 mode; this -+ test only needs to fail when NAN is provided but wrong. */ -+ float f = 1.0f; -+#ifdef NAN -+ f = NAN; -+#endif -+ return f == 0;]])], -+ [gl_cv_header_math_nan_works=yes], -+ [gl_cv_header_math_nan_works=no])]) -+ if test $gl_cv_header_math_nan_works = no; then -+ REPLACE_NAN=1 -+ fi -+ AC_CACHE_CHECK([whether HUGE_VAL works], [gl_cv_header_math_huge_val_works], -+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include ]], -+ [[/* Solaris 10 has a broken definition of HUGE_VAL. */ -+ double d = HUGE_VAL; -+ return d == 0;]])], -+ [gl_cv_header_math_huge_val_works=yes], -+ [gl_cv_header_math_huge_val_works=no])]) -+ if test $gl_cv_header_math_huge_val_works = no; then -+ REPLACE_HUGE_VAL=1 -+ fi -+ -+ dnl Check for declarations of anything we want to poison if the -+ dnl corresponding gnulib module is not in use. -+ gl_WARN_ON_USE_PREPARE([[#include ]], -+ [acosf acosl asinf asinl atanf atanl -+ cbrt cbrtf cbrtl ceilf ceill copysign copysignf copysignl cosf cosl coshf -+ expf expl exp2 exp2f exp2l expm1 expm1f expm1l -+ fabsf fabsl floorf floorl fma fmaf fmal -+ fmod fmodf fmodl frexpf frexpl hypotf hypotl -+ ilogb ilogbf ilogbl -+ ldexpf ldexpl -+ log logf logl log10 log10f log10l log1p log1pf log1pl log2 log2f log2l -+ logb logbf logbl -+ modf modff modfl powf -+ remainder remainderf remainderl -+ rint rintf rintl round roundf roundl sinf sinl sinhf sqrtf sqrtl -+ tanf tanl tanhf trunc truncf truncl]) -+]) -+ -+AC_DEFUN([gl_MATH_MODULE_INDICATOR], -+[ -+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. -+ AC_REQUIRE([gl_MATH_H_DEFAULTS]) -+ gl_MODULE_INDICATOR_SET_VARIABLE([$1]) -+ dnl Define it also as a C macro, for the benefit of the unit tests. -+ gl_MODULE_INDICATOR_FOR_TESTS([$1]) -+]) -+ -+AC_DEFUN([gl_MATH_H_DEFAULTS], -+[ -+ GNULIB_ACOSF=0; AC_SUBST([GNULIB_ACOSF]) -+ GNULIB_ACOSL=0; AC_SUBST([GNULIB_ACOSL]) -+ GNULIB_ASINF=0; AC_SUBST([GNULIB_ASINF]) -+ GNULIB_ASINL=0; AC_SUBST([GNULIB_ASINL]) -+ GNULIB_ATANF=0; AC_SUBST([GNULIB_ATANF]) -+ GNULIB_ATANL=0; AC_SUBST([GNULIB_ATANL]) -+ GNULIB_ATAN2F=0; AC_SUBST([GNULIB_ATAN2F]) -+ GNULIB_CBRT=0; AC_SUBST([GNULIB_CBRT]) -+ GNULIB_CBRTF=0; AC_SUBST([GNULIB_CBRTF]) -+ GNULIB_CBRTL=0; AC_SUBST([GNULIB_CBRTL]) -+ GNULIB_CEIL=0; AC_SUBST([GNULIB_CEIL]) -+ GNULIB_CEILF=0; AC_SUBST([GNULIB_CEILF]) -+ GNULIB_CEILL=0; AC_SUBST([GNULIB_CEILL]) -+ GNULIB_COPYSIGN=0; AC_SUBST([GNULIB_COPYSIGN]) -+ GNULIB_COPYSIGNF=0; AC_SUBST([GNULIB_COPYSIGNF]) -+ GNULIB_COPYSIGNL=0; AC_SUBST([GNULIB_COPYSIGNL]) -+ GNULIB_COSF=0; AC_SUBST([GNULIB_COSF]) -+ GNULIB_COSL=0; AC_SUBST([GNULIB_COSL]) -+ GNULIB_COSHF=0; AC_SUBST([GNULIB_COSHF]) -+ GNULIB_EXPF=0; AC_SUBST([GNULIB_EXPF]) -+ GNULIB_EXPL=0; AC_SUBST([GNULIB_EXPL]) -+ GNULIB_EXP2=0; AC_SUBST([GNULIB_EXP2]) -+ GNULIB_EXP2F=0; AC_SUBST([GNULIB_EXP2F]) -+ GNULIB_EXP2L=0; AC_SUBST([GNULIB_EXP2L]) -+ GNULIB_EXPM1=0; AC_SUBST([GNULIB_EXPM1]) -+ GNULIB_EXPM1F=0; AC_SUBST([GNULIB_EXPM1F]) -+ GNULIB_EXPM1L=0; AC_SUBST([GNULIB_EXPM1L]) -+ GNULIB_FABSF=0; AC_SUBST([GNULIB_FABSF]) -+ GNULIB_FABSL=0; AC_SUBST([GNULIB_FABSL]) -+ GNULIB_FLOOR=0; AC_SUBST([GNULIB_FLOOR]) -+ GNULIB_FLOORF=0; AC_SUBST([GNULIB_FLOORF]) -+ GNULIB_FLOORL=0; AC_SUBST([GNULIB_FLOORL]) -+ GNULIB_FMA=0; AC_SUBST([GNULIB_FMA]) -+ GNULIB_FMAF=0; AC_SUBST([GNULIB_FMAF]) -+ GNULIB_FMAL=0; AC_SUBST([GNULIB_FMAL]) -+ GNULIB_FMOD=0; AC_SUBST([GNULIB_FMOD]) -+ GNULIB_FMODF=0; AC_SUBST([GNULIB_FMODF]) -+ GNULIB_FMODL=0; AC_SUBST([GNULIB_FMODL]) -+ GNULIB_FREXPF=0; AC_SUBST([GNULIB_FREXPF]) -+ GNULIB_FREXP=0; AC_SUBST([GNULIB_FREXP]) -+ GNULIB_FREXPL=0; AC_SUBST([GNULIB_FREXPL]) -+ GNULIB_HYPOT=0; AC_SUBST([GNULIB_HYPOT]) -+ GNULIB_HYPOTF=0; AC_SUBST([GNULIB_HYPOTF]) -+ GNULIB_HYPOTL=0; AC_SUBST([GNULIB_HYPOTL]) -+ GNULIB_ILOGB=0; AC_SUBST([GNULIB_ILOGB]) -+ GNULIB_ILOGBF=0; AC_SUBST([GNULIB_ILOGBF]) -+ GNULIB_ILOGBL=0; AC_SUBST([GNULIB_ILOGBL]) -+ GNULIB_ISFINITE=0; AC_SUBST([GNULIB_ISFINITE]) -+ GNULIB_ISINF=0; AC_SUBST([GNULIB_ISINF]) -+ GNULIB_ISNAN=0; AC_SUBST([GNULIB_ISNAN]) -+ GNULIB_ISNANF=0; AC_SUBST([GNULIB_ISNANF]) -+ GNULIB_ISNAND=0; AC_SUBST([GNULIB_ISNAND]) -+ GNULIB_ISNANL=0; AC_SUBST([GNULIB_ISNANL]) -+ GNULIB_LDEXPF=0; AC_SUBST([GNULIB_LDEXPF]) -+ GNULIB_LDEXPL=0; AC_SUBST([GNULIB_LDEXPL]) -+ GNULIB_LOG=0; AC_SUBST([GNULIB_LOG]) -+ GNULIB_LOGF=0; AC_SUBST([GNULIB_LOGF]) -+ GNULIB_LOGL=0; AC_SUBST([GNULIB_LOGL]) -+ GNULIB_LOG10=0; AC_SUBST([GNULIB_LOG10]) -+ GNULIB_LOG10F=0; AC_SUBST([GNULIB_LOG10F]) -+ GNULIB_LOG10L=0; AC_SUBST([GNULIB_LOG10L]) -+ GNULIB_LOG1P=0; AC_SUBST([GNULIB_LOG1P]) -+ GNULIB_LOG1PF=0; AC_SUBST([GNULIB_LOG1PF]) -+ GNULIB_LOG1PL=0; AC_SUBST([GNULIB_LOG1PL]) -+ GNULIB_LOG2=0; AC_SUBST([GNULIB_LOG2]) -+ GNULIB_LOG2F=0; AC_SUBST([GNULIB_LOG2F]) -+ GNULIB_LOG2L=0; AC_SUBST([GNULIB_LOG2L]) -+ GNULIB_LOGB=0; AC_SUBST([GNULIB_LOGB]) -+ GNULIB_LOGBF=0; AC_SUBST([GNULIB_LOGBF]) -+ GNULIB_LOGBL=0; AC_SUBST([GNULIB_LOGBL]) -+ GNULIB_MODF=0; AC_SUBST([GNULIB_MODF]) -+ GNULIB_MODFF=0; AC_SUBST([GNULIB_MODFF]) -+ GNULIB_MODFL=0; AC_SUBST([GNULIB_MODFL]) -+ GNULIB_POWF=0; AC_SUBST([GNULIB_POWF]) -+ GNULIB_REMAINDER=0; AC_SUBST([GNULIB_REMAINDER]) -+ GNULIB_REMAINDERF=0; AC_SUBST([GNULIB_REMAINDERF]) -+ GNULIB_REMAINDERL=0; AC_SUBST([GNULIB_REMAINDERL]) -+ GNULIB_RINT=0; AC_SUBST([GNULIB_RINT]) -+ GNULIB_RINTF=0; AC_SUBST([GNULIB_RINTF]) -+ GNULIB_RINTL=0; AC_SUBST([GNULIB_RINTL]) -+ GNULIB_ROUND=0; AC_SUBST([GNULIB_ROUND]) -+ GNULIB_ROUNDF=0; AC_SUBST([GNULIB_ROUNDF]) -+ GNULIB_ROUNDL=0; AC_SUBST([GNULIB_ROUNDL]) -+ GNULIB_SIGNBIT=0; AC_SUBST([GNULIB_SIGNBIT]) -+ GNULIB_SINF=0; AC_SUBST([GNULIB_SINF]) -+ GNULIB_SINL=0; AC_SUBST([GNULIB_SINL]) -+ GNULIB_SINHF=0; AC_SUBST([GNULIB_SINHF]) -+ GNULIB_SQRTF=0; AC_SUBST([GNULIB_SQRTF]) -+ GNULIB_SQRTL=0; AC_SUBST([GNULIB_SQRTL]) -+ GNULIB_TANF=0; AC_SUBST([GNULIB_TANF]) -+ GNULIB_TANL=0; AC_SUBST([GNULIB_TANL]) -+ GNULIB_TANHF=0; AC_SUBST([GNULIB_TANHF]) -+ GNULIB_TRUNC=0; AC_SUBST([GNULIB_TRUNC]) -+ GNULIB_TRUNCF=0; AC_SUBST([GNULIB_TRUNCF]) -+ GNULIB_TRUNCL=0; AC_SUBST([GNULIB_TRUNCL]) -+ dnl Assume proper GNU behavior unless another module says otherwise. -+ HAVE_ACOSF=1; AC_SUBST([HAVE_ACOSF]) -+ HAVE_ACOSL=1; AC_SUBST([HAVE_ACOSL]) -+ HAVE_ASINF=1; AC_SUBST([HAVE_ASINF]) -+ HAVE_ASINL=1; AC_SUBST([HAVE_ASINL]) -+ HAVE_ATANF=1; AC_SUBST([HAVE_ATANF]) -+ HAVE_ATANL=1; AC_SUBST([HAVE_ATANL]) -+ HAVE_ATAN2F=1; AC_SUBST([HAVE_ATAN2F]) -+ HAVE_CBRT=1; AC_SUBST([HAVE_CBRT]) -+ HAVE_CBRTF=1; AC_SUBST([HAVE_CBRTF]) -+ HAVE_CBRTL=1; AC_SUBST([HAVE_CBRTL]) -+ HAVE_COPYSIGN=1; AC_SUBST([HAVE_COPYSIGN]) -+ HAVE_COPYSIGNL=1; AC_SUBST([HAVE_COPYSIGNL]) -+ HAVE_COSF=1; AC_SUBST([HAVE_COSF]) -+ HAVE_COSL=1; AC_SUBST([HAVE_COSL]) -+ HAVE_COSHF=1; AC_SUBST([HAVE_COSHF]) -+ HAVE_EXPF=1; AC_SUBST([HAVE_EXPF]) -+ HAVE_EXPL=1; AC_SUBST([HAVE_EXPL]) -+ HAVE_EXPM1=1; AC_SUBST([HAVE_EXPM1]) -+ HAVE_EXPM1F=1; AC_SUBST([HAVE_EXPM1F]) -+ HAVE_FABSF=1; AC_SUBST([HAVE_FABSF]) -+ HAVE_FABSL=1; AC_SUBST([HAVE_FABSL]) -+ HAVE_FMA=1; AC_SUBST([HAVE_FMA]) -+ HAVE_FMAF=1; AC_SUBST([HAVE_FMAF]) -+ HAVE_FMAL=1; AC_SUBST([HAVE_FMAL]) -+ HAVE_FMODF=1; AC_SUBST([HAVE_FMODF]) -+ HAVE_FMODL=1; AC_SUBST([HAVE_FMODL]) -+ HAVE_FREXPF=1; AC_SUBST([HAVE_FREXPF]) -+ HAVE_HYPOTF=1; AC_SUBST([HAVE_HYPOTF]) -+ HAVE_HYPOTL=1; AC_SUBST([HAVE_HYPOTL]) -+ HAVE_ILOGB=1; AC_SUBST([HAVE_ILOGB]) -+ HAVE_ILOGBF=1; AC_SUBST([HAVE_ILOGBF]) -+ HAVE_ILOGBL=1; AC_SUBST([HAVE_ILOGBL]) -+ HAVE_ISNANF=1; AC_SUBST([HAVE_ISNANF]) -+ HAVE_ISNAND=1; AC_SUBST([HAVE_ISNAND]) -+ HAVE_ISNANL=1; AC_SUBST([HAVE_ISNANL]) -+ HAVE_LDEXPF=1; AC_SUBST([HAVE_LDEXPF]) -+ HAVE_LOGF=1; AC_SUBST([HAVE_LOGF]) -+ HAVE_LOGL=1; AC_SUBST([HAVE_LOGL]) -+ HAVE_LOG10F=1; AC_SUBST([HAVE_LOG10F]) -+ HAVE_LOG10L=1; AC_SUBST([HAVE_LOG10L]) -+ HAVE_LOG1P=1; AC_SUBST([HAVE_LOG1P]) -+ HAVE_LOG1PF=1; AC_SUBST([HAVE_LOG1PF]) -+ HAVE_LOG1PL=1; AC_SUBST([HAVE_LOG1PL]) -+ HAVE_LOGBF=1; AC_SUBST([HAVE_LOGBF]) -+ HAVE_LOGBL=1; AC_SUBST([HAVE_LOGBL]) -+ HAVE_MODFF=1; AC_SUBST([HAVE_MODFF]) -+ HAVE_MODFL=1; AC_SUBST([HAVE_MODFL]) -+ HAVE_POWF=1; AC_SUBST([HAVE_POWF]) -+ HAVE_REMAINDER=1; AC_SUBST([HAVE_REMAINDER]) -+ HAVE_REMAINDERF=1; AC_SUBST([HAVE_REMAINDERF]) -+ HAVE_RINT=1; AC_SUBST([HAVE_RINT]) -+ HAVE_RINTL=1; AC_SUBST([HAVE_RINTL]) -+ HAVE_SINF=1; AC_SUBST([HAVE_SINF]) -+ HAVE_SINL=1; AC_SUBST([HAVE_SINL]) -+ HAVE_SINHF=1; AC_SUBST([HAVE_SINHF]) -+ HAVE_SQRTF=1; AC_SUBST([HAVE_SQRTF]) -+ HAVE_SQRTL=1; AC_SUBST([HAVE_SQRTL]) -+ HAVE_TANF=1; AC_SUBST([HAVE_TANF]) -+ HAVE_TANL=1; AC_SUBST([HAVE_TANL]) -+ HAVE_TANHF=1; AC_SUBST([HAVE_TANHF]) -+ HAVE_DECL_ACOSL=1; AC_SUBST([HAVE_DECL_ACOSL]) -+ HAVE_DECL_ASINL=1; AC_SUBST([HAVE_DECL_ASINL]) -+ HAVE_DECL_ATANL=1; AC_SUBST([HAVE_DECL_ATANL]) -+ HAVE_DECL_CBRTF=1; AC_SUBST([HAVE_DECL_CBRTF]) -+ HAVE_DECL_CBRTL=1; AC_SUBST([HAVE_DECL_CBRTL]) -+ HAVE_DECL_CEILF=1; AC_SUBST([HAVE_DECL_CEILF]) -+ HAVE_DECL_CEILL=1; AC_SUBST([HAVE_DECL_CEILL]) -+ HAVE_DECL_COPYSIGNF=1; AC_SUBST([HAVE_DECL_COPYSIGNF]) -+ HAVE_DECL_COSL=1; AC_SUBST([HAVE_DECL_COSL]) -+ HAVE_DECL_EXPL=1; AC_SUBST([HAVE_DECL_EXPL]) -+ HAVE_DECL_EXP2=1; AC_SUBST([HAVE_DECL_EXP2]) -+ HAVE_DECL_EXP2F=1; AC_SUBST([HAVE_DECL_EXP2F]) -+ HAVE_DECL_EXP2L=1; AC_SUBST([HAVE_DECL_EXP2L]) -+ HAVE_DECL_EXPM1L=1; AC_SUBST([HAVE_DECL_EXPM1L]) -+ HAVE_DECL_FLOORF=1; AC_SUBST([HAVE_DECL_FLOORF]) -+ HAVE_DECL_FLOORL=1; AC_SUBST([HAVE_DECL_FLOORL]) -+ HAVE_DECL_FREXPL=1; AC_SUBST([HAVE_DECL_FREXPL]) -+ HAVE_DECL_LDEXPL=1; AC_SUBST([HAVE_DECL_LDEXPL]) -+ HAVE_DECL_LOGL=1; AC_SUBST([HAVE_DECL_LOGL]) -+ HAVE_DECL_LOG10L=1; AC_SUBST([HAVE_DECL_LOG10L]) -+ HAVE_DECL_LOG2=1; AC_SUBST([HAVE_DECL_LOG2]) -+ HAVE_DECL_LOG2F=1; AC_SUBST([HAVE_DECL_LOG2F]) -+ HAVE_DECL_LOG2L=1; AC_SUBST([HAVE_DECL_LOG2L]) -+ HAVE_DECL_LOGB=1; AC_SUBST([HAVE_DECL_LOGB]) -+ HAVE_DECL_REMAINDER=1; AC_SUBST([HAVE_DECL_REMAINDER]) -+ HAVE_DECL_REMAINDERL=1; AC_SUBST([HAVE_DECL_REMAINDERL]) -+ HAVE_DECL_RINTF=1; AC_SUBST([HAVE_DECL_RINTF]) -+ HAVE_DECL_ROUND=1; AC_SUBST([HAVE_DECL_ROUND]) -+ HAVE_DECL_ROUNDF=1; AC_SUBST([HAVE_DECL_ROUNDF]) -+ HAVE_DECL_ROUNDL=1; AC_SUBST([HAVE_DECL_ROUNDL]) -+ HAVE_DECL_SINL=1; AC_SUBST([HAVE_DECL_SINL]) -+ HAVE_DECL_SQRTL=1; AC_SUBST([HAVE_DECL_SQRTL]) -+ HAVE_DECL_TANL=1; AC_SUBST([HAVE_DECL_TANL]) -+ HAVE_DECL_TRUNC=1; AC_SUBST([HAVE_DECL_TRUNC]) -+ HAVE_DECL_TRUNCF=1; AC_SUBST([HAVE_DECL_TRUNCF]) -+ HAVE_DECL_TRUNCL=1; AC_SUBST([HAVE_DECL_TRUNCL]) -+ REPLACE_ACOSF=0; AC_SUBST([REPLACE_ACOSF]) -+ REPLACE_ASINF=0; AC_SUBST([REPLACE_ASINF]) -+ REPLACE_ATANF=0; AC_SUBST([REPLACE_ATANF]) -+ REPLACE_ATAN2F=0; AC_SUBST([REPLACE_ATAN2F]) -+ REPLACE_CBRTF=0; AC_SUBST([REPLACE_CBRTF]) -+ REPLACE_CBRTL=0; AC_SUBST([REPLACE_CBRTL]) -+ REPLACE_CEIL=0; AC_SUBST([REPLACE_CEIL]) -+ REPLACE_CEILF=0; AC_SUBST([REPLACE_CEILF]) -+ REPLACE_CEILL=0; AC_SUBST([REPLACE_CEILL]) -+ REPLACE_COSF=0; AC_SUBST([REPLACE_COSF]) -+ REPLACE_COSHF=0; AC_SUBST([REPLACE_COSHF]) -+ REPLACE_EXPF=0; AC_SUBST([REPLACE_EXPF]) -+ REPLACE_EXPM1=0; AC_SUBST([REPLACE_EXPM1]) -+ REPLACE_EXPM1F=0; AC_SUBST([REPLACE_EXPM1F]) -+ REPLACE_EXP2=0; AC_SUBST([REPLACE_EXP2]) -+ REPLACE_EXP2L=0; AC_SUBST([REPLACE_EXP2L]) -+ REPLACE_FABSL=0; AC_SUBST([REPLACE_FABSL]) -+ REPLACE_FLOOR=0; AC_SUBST([REPLACE_FLOOR]) -+ REPLACE_FLOORF=0; AC_SUBST([REPLACE_FLOORF]) -+ REPLACE_FLOORL=0; AC_SUBST([REPLACE_FLOORL]) -+ REPLACE_FMA=0; AC_SUBST([REPLACE_FMA]) -+ REPLACE_FMAF=0; AC_SUBST([REPLACE_FMAF]) -+ REPLACE_FMAL=0; AC_SUBST([REPLACE_FMAL]) -+ REPLACE_FMOD=0; AC_SUBST([REPLACE_FMOD]) -+ REPLACE_FMODF=0; AC_SUBST([REPLACE_FMODF]) -+ REPLACE_FMODL=0; AC_SUBST([REPLACE_FMODL]) -+ REPLACE_FREXPF=0; AC_SUBST([REPLACE_FREXPF]) -+ REPLACE_FREXP=0; AC_SUBST([REPLACE_FREXP]) -+ REPLACE_FREXPL=0; AC_SUBST([REPLACE_FREXPL]) -+ REPLACE_HUGE_VAL=0; AC_SUBST([REPLACE_HUGE_VAL]) -+ REPLACE_HYPOT=0; AC_SUBST([REPLACE_HYPOT]) -+ REPLACE_HYPOTF=0; AC_SUBST([REPLACE_HYPOTF]) -+ REPLACE_HYPOTL=0; AC_SUBST([REPLACE_HYPOTL]) -+ REPLACE_ILOGB=0; AC_SUBST([REPLACE_ILOGB]) -+ REPLACE_ILOGBF=0; AC_SUBST([REPLACE_ILOGBF]) -+ REPLACE_ISFINITE=0; AC_SUBST([REPLACE_ISFINITE]) -+ REPLACE_ISINF=0; AC_SUBST([REPLACE_ISINF]) -+ REPLACE_ISNAN=0; AC_SUBST([REPLACE_ISNAN]) -+ REPLACE_LDEXPL=0; AC_SUBST([REPLACE_LDEXPL]) -+ REPLACE_LOG=0; AC_SUBST([REPLACE_LOG]) -+ REPLACE_LOGF=0; AC_SUBST([REPLACE_LOGF]) -+ REPLACE_LOGL=0; AC_SUBST([REPLACE_LOGL]) -+ REPLACE_LOG10=0; AC_SUBST([REPLACE_LOG10]) -+ REPLACE_LOG10F=0; AC_SUBST([REPLACE_LOG10F]) -+ REPLACE_LOG10L=0; AC_SUBST([REPLACE_LOG10L]) -+ REPLACE_LOG1P=0; AC_SUBST([REPLACE_LOG1P]) -+ REPLACE_LOG1PF=0; AC_SUBST([REPLACE_LOG1PF]) -+ REPLACE_LOG1PL=0; AC_SUBST([REPLACE_LOG1PL]) -+ REPLACE_LOG2=0; AC_SUBST([REPLACE_LOG2]) -+ REPLACE_LOG2F=0; AC_SUBST([REPLACE_LOG2F]) -+ REPLACE_LOG2L=0; AC_SUBST([REPLACE_LOG2L]) -+ REPLACE_LOGB=0; AC_SUBST([REPLACE_LOGB]) -+ REPLACE_LOGBF=0; AC_SUBST([REPLACE_LOGBF]) -+ REPLACE_LOGBL=0; AC_SUBST([REPLACE_LOGBL]) -+ REPLACE_MODF=0; AC_SUBST([REPLACE_MODF]) -+ REPLACE_MODFF=0; AC_SUBST([REPLACE_MODFF]) -+ REPLACE_MODFL=0; AC_SUBST([REPLACE_MODFL]) -+ REPLACE_NAN=0; AC_SUBST([REPLACE_NAN]) -+ REPLACE_REMAINDER=0; AC_SUBST([REPLACE_REMAINDER]) -+ REPLACE_REMAINDERF=0; AC_SUBST([REPLACE_REMAINDERF]) -+ REPLACE_REMAINDERL=0; AC_SUBST([REPLACE_REMAINDERL]) -+ REPLACE_ROUND=0; AC_SUBST([REPLACE_ROUND]) -+ REPLACE_ROUNDF=0; AC_SUBST([REPLACE_ROUNDF]) -+ REPLACE_ROUNDL=0; AC_SUBST([REPLACE_ROUNDL]) -+ REPLACE_SIGNBIT=0; AC_SUBST([REPLACE_SIGNBIT]) -+ REPLACE_SIGNBIT_USING_GCC=0; AC_SUBST([REPLACE_SIGNBIT_USING_GCC]) -+ REPLACE_SINF=0; AC_SUBST([REPLACE_SINF]) -+ REPLACE_SINHF=0; AC_SUBST([REPLACE_SINHF]) -+ REPLACE_SQRTF=0; AC_SUBST([REPLACE_SQRTF]) -+ REPLACE_SQRTL=0; AC_SUBST([REPLACE_SQRTL]) -+ REPLACE_TANF=0; AC_SUBST([REPLACE_TANF]) -+ REPLACE_TANHF=0; AC_SUBST([REPLACE_TANHF]) -+ REPLACE_TRUNC=0; AC_SUBST([REPLACE_TRUNC]) -+ REPLACE_TRUNCF=0; AC_SUBST([REPLACE_TRUNCF]) -+ REPLACE_TRUNCL=0; AC_SUBST([REPLACE_TRUNCL]) -+]) -+ -+# gl_LONG_DOUBLE_VS_DOUBLE -+# determines whether 'long double' and 'double' have the same representation. -+# Sets variable HAVE_SAME_LONG_DOUBLE_AS_DOUBLE to 0 or 1, and defines -+# HAVE_SAME_LONG_DOUBLE_AS_DOUBLE accordingly. -+# The currently known platforms where this is the case are: -+# Linux/HPPA, Minix 3.1.8, AIX 5, AIX 6 and 7 with xlc, MSVC 9. -+AC_DEFUN([gl_LONG_DOUBLE_VS_DOUBLE], -+[ -+ AC_CACHE_CHECK([whether long double and double are the same], -+ [gl_cv_long_double_equals_double], -+ [AC_COMPILE_IFELSE( -+ [AC_LANG_PROGRAM([[#include ]], -+ [[typedef int check[sizeof (long double) == sizeof (double) -+ && LDBL_MANT_DIG == DBL_MANT_DIG -+ && LDBL_MAX_EXP == DBL_MAX_EXP -+ && LDBL_MIN_EXP == DBL_MIN_EXP -+ ? 1 : -1]; -+ ]])], -+ [gl_cv_long_double_equals_double=yes], -+ [gl_cv_long_double_equals_double=no]) -+ ]) -+ if test $gl_cv_long_double_equals_double = yes; then -+ AC_DEFINE([HAVE_SAME_LONG_DOUBLE_AS_DOUBLE], [1], -+ [Define to 1 if 'long double' and 'double' have the same representation.]) -+ HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1 -+ else -+ HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0 -+ fi -+ AC_SUBST([HAVE_SAME_LONG_DOUBLE_AS_DOUBLE]) -+]) -diff -durN inetutils-1.9.4.orig/m4/mbrtowc.m4 inetutils-1.9.4/m4/mbrtowc.m4 ---- inetutils-1.9.4.orig/m4/mbrtowc.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/mbrtowc.m4 2017-05-15 17:52:00.437500000 +0800 -@@ -1,5 +1,5 @@ --# mbrtowc.m4 serial 26 --dnl Copyright (C) 2001-2002, 2004-2005, 2008-2015 Free Software Foundation, -+# mbrtowc.m4 serial 27 -*- coding: utf-8 -*- -+dnl Copyright (C) 2001-2002, 2004-2005, 2008-2017 Free Software Foundation, - dnl Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, -@@ -40,6 +40,7 @@ - gl_MBRTOWC_RETVAL - gl_MBRTOWC_NUL_RETVAL - gl_MBRTOWC_EMPTY_INPUT -+ gl_MBRTOWC_C_LOCALE - case "$gl_cv_func_mbrtowc_null_arg1" in - *yes) ;; - *) AC_DEFINE([MBRTOWC_NULL_ARG1_BUG], [1], -@@ -76,6 +77,13 @@ - REPLACE_MBRTOWC=1 - ;; - esac -+ case $gl_cv_C_locale_sans_EILSEQ in -+ *yes) ;; -+ *) AC_DEFINE([C_LOCALE_MAYBE_EILSEQ], [1], -+ [Define to 1 if the C locale may have encoding errors.]) -+ REPLACE_MBRTOWC=1 -+ ;; -+ esac - fi - fi - ]) -@@ -156,7 +164,7 @@ - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) - if (mbsinit (&state)) -- return 1; -+ return 2; - } - return 0; - }]])], -@@ -216,7 +224,7 @@ - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 3, 6, &state) != 4 - && mbtowc (&wc, input + 3, 6) == 4) -- return 1; -+ return 2; - } - return 0; - }]])], -@@ -344,7 +352,7 @@ - mbrtowc (&wc, NULL, 5, &state); - /* Check that wc was not modified. */ - if (wc != (wchar_t) 0xBADFACE) -- return 1; -+ return 2; - } - return 0; - }]])], -@@ -531,7 +539,7 @@ - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, "", 1, &state) != 0) -- return 1; -+ return 2; - } - return 0; - }]])], -@@ -569,14 +577,54 @@ - int - main (void) - { -- return mbrtowc (&wc, "", 0, &mbs) == (size_t) -2; -+ return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2; - }]])], -- [gl_cv_func_mbrtowc_empty_input=no], - [gl_cv_func_mbrtowc_empty_input=yes], -+ [gl_cv_func_mbrtowc_empty_input=no], - [:]) - ]) - ]) - -+dnl Test whether mbrtowc reports encoding errors in the C locale. -+dnl Although POSIX was never intended to allow this, the GNU C Library -+dnl and other implementations do it. See: -+dnl https://sourceware.org/bugzilla/show_bug.cgi?id=19932 -+ -+AC_DEFUN([gl_MBRTOWC_C_LOCALE], -+[ -+ AC_CACHE_CHECK([whether the C locale is free of encoding errors], -+ [gl_cv_C_locale_sans_EILSEQ], -+ [ -+ dnl Initial guess, used when cross-compiling or when no suitable locale -+ dnl is present. -+ gl_cv_C_locale_sans_EILSEQ="guessing no" -+ -+ AC_RUN_IFELSE( -+ [AC_LANG_PROGRAM( -+ [[#include -+ #include -+ #include -+ ]], [[ -+ int i; -+ char *locale = setlocale (LC_ALL, "C"); -+ if (! locale) -+ return 2; -+ for (i = CHAR_MIN; i <= CHAR_MAX; i++) -+ { -+ char c = i; -+ wchar_t wc; -+ mbstate_t mbs = { 0, }; -+ size_t ss = mbrtowc (&wc, &c, 1, &mbs); -+ if (1 < ss) -+ return 3; -+ } -+ return 0; -+ ]])], -+ [gl_cv_C_locale_sans_EILSEQ=yes], -+ [gl_cv_C_locale_sans_EILSEQ=no], -+ [:])]) -+]) -+ - # Prerequisites of lib/mbrtowc.c. - AC_DEFUN([gl_PREREQ_MBRTOWC], [ - : -diff -durN inetutils-1.9.4.orig/m4/mbsinit.m4 inetutils-1.9.4/m4/mbsinit.m4 ---- inetutils-1.9.4.orig/m4/mbsinit.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/mbsinit.m4 2017-05-15 17:52:00.562500000 +0800 -@@ -1,5 +1,5 @@ - # mbsinit.m4 serial 8 --dnl Copyright (C) 2008, 2010-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2008, 2010-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/mbsrtowcs.m4 inetutils-1.9.4/m4/mbsrtowcs.m4 ---- inetutils-1.9.4.orig/m4/mbsrtowcs.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/mbsrtowcs.m4 2017-05-15 17:52:00.687500000 +0800 -@@ -1,5 +1,5 @@ - # mbsrtowcs.m4 serial 13 --dnl Copyright (C) 2008-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2008-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/mbstate_t.m4 inetutils-1.9.4/m4/mbstate_t.m4 ---- inetutils-1.9.4.orig/m4/mbstate_t.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/mbstate_t.m4 2017-05-15 17:52:00.812500000 +0800 -@@ -1,5 +1,5 @@ - # mbstate_t.m4 serial 13 --dnl Copyright (C) 2000-2002, 2008-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2000-2002, 2008-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/mbtowc.m4 inetutils-1.9.4/m4/mbtowc.m4 ---- inetutils-1.9.4.orig/m4/mbtowc.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/mbtowc.m4 2017-05-15 17:52:00.984375000 +0800 -@@ -1,5 +1,5 @@ - # mbtowc.m4 serial 2 --dnl Copyright (C) 2011-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/memchr.m4 inetutils-1.9.4/m4/memchr.m4 ---- inetutils-1.9.4.orig/m4/memchr.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/memchr.m4 2017-05-15 17:52:01.140625000 +0800 -@@ -1,5 +1,5 @@ - # memchr.m4 serial 12 --dnl Copyright (C) 2002-2004, 2009-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2002-2004, 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/mempcpy.m4 inetutils-1.9.4/m4/mempcpy.m4 ---- inetutils-1.9.4.orig/m4/mempcpy.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/mempcpy.m4 2017-05-15 17:52:01.328125000 +0800 -@@ -1,5 +1,5 @@ - # mempcpy.m4 serial 11 --dnl Copyright (C) 2003-2004, 2006-2007, 2009-2015 Free Software Foundation, -+dnl Copyright (C) 2003-2004, 2006-2007, 2009-2017 Free Software Foundation, - dnl Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, -diff -durN inetutils-1.9.4.orig/m4/memrchr.m4 inetutils-1.9.4/m4/memrchr.m4 ---- inetutils-1.9.4.orig/m4/memrchr.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/memrchr.m4 2017-05-15 17:52:01.515625000 +0800 -@@ -1,5 +1,5 @@ - # memrchr.m4 serial 10 --dnl Copyright (C) 2002-2003, 2005-2007, 2009-2015 Free Software Foundation, -+dnl Copyright (C) 2002-2003, 2005-2007, 2009-2017 Free Software Foundation, - dnl Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, -diff -durN inetutils-1.9.4.orig/m4/mgetgroups.m4 inetutils-1.9.4/m4/mgetgroups.m4 ---- inetutils-1.9.4.orig/m4/mgetgroups.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/mgetgroups.m4 2017-05-15 17:52:01.656250000 +0800 -@@ -1,5 +1,5 @@ - #serial 5 --dnl Copyright (C) 2007-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/minmax.m4 inetutils-1.9.4/m4/minmax.m4 ---- inetutils-1.9.4.orig/m4/minmax.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/minmax.m4 2017-05-15 17:52:01.796875000 +0800 -@@ -1,5 +1,5 @@ - # minmax.m4 serial 4 --dnl Copyright (C) 2005, 2009-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2005, 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/mkstemp.m4 inetutils-1.9.4/m4/mkstemp.m4 ---- inetutils-1.9.4.orig/m4/mkstemp.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/mkstemp.m4 2017-05-15 17:52:01.921875000 +0800 -@@ -1,6 +1,6 @@ - #serial 23 - --# Copyright (C) 2001, 2003-2007, 2009-2015 Free Software Foundation, Inc. -+# Copyright (C) 2001, 2003-2007, 2009-2017 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. -diff -durN inetutils-1.9.4.orig/m4/mmap-anon.m4 inetutils-1.9.4/m4/mmap-anon.m4 ---- inetutils-1.9.4.orig/m4/mmap-anon.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/mmap-anon.m4 2017-05-15 17:52:02.046875000 +0800 -@@ -1,5 +1,5 @@ - # mmap-anon.m4 serial 10 --dnl Copyright (C) 2005, 2007, 2009-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2005, 2007, 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/mode_t.m4 inetutils-1.9.4/m4/mode_t.m4 ---- inetutils-1.9.4.orig/m4/mode_t.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/mode_t.m4 2017-05-15 17:52:02.171875000 +0800 -@@ -1,5 +1,5 @@ - # mode_t.m4 serial 2 --dnl Copyright (C) 2009-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/msvc-inval.m4 inetutils-1.9.4/m4/msvc-inval.m4 ---- inetutils-1.9.4.orig/m4/msvc-inval.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/msvc-inval.m4 2017-05-15 17:52:02.296875000 +0800 -@@ -1,5 +1,5 @@ - # msvc-inval.m4 serial 1 --dnl Copyright (C) 2011-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/msvc-nothrow.m4 inetutils-1.9.4/m4/msvc-nothrow.m4 ---- inetutils-1.9.4.orig/m4/msvc-nothrow.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/msvc-nothrow.m4 2017-05-15 17:52:02.421875000 +0800 -@@ -1,5 +1,5 @@ - # msvc-nothrow.m4 serial 1 --dnl Copyright (C) 2011-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/multiarch.m4 inetutils-1.9.4/m4/multiarch.m4 ---- inetutils-1.9.4.orig/m4/multiarch.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/multiarch.m4 2017-05-15 17:52:02.578125000 +0800 -@@ -1,5 +1,5 @@ - # multiarch.m4 serial 7 --dnl Copyright (C) 2008-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2008-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/netdb_h.m4 inetutils-1.9.4/m4/netdb_h.m4 ---- inetutils-1.9.4.orig/m4/netdb_h.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/netdb_h.m4 2017-05-15 17:52:02.734375000 +0800 -@@ -1,5 +1,5 @@ - # netdb_h.m4 serial 11 --dnl Copyright (C) 2008-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2008-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/netinet_in_h.m4 inetutils-1.9.4/m4/netinet_in_h.m4 ---- inetutils-1.9.4.orig/m4/netinet_in_h.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/netinet_in_h.m4 2017-05-15 17:52:02.890625000 +0800 -@@ -1,5 +1,5 @@ - # netinet_in_h.m4 serial 5 --dnl Copyright (C) 2006-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2006-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/nl_langinfo.m4 inetutils-1.9.4/m4/nl_langinfo.m4 ---- inetutils-1.9.4.orig/m4/nl_langinfo.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/nl_langinfo.m4 2017-05-15 17:52:03.015625000 +0800 -@@ -1,5 +1,5 @@ - # nl_langinfo.m4 serial 5 --dnl Copyright (C) 2009-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/nls.m4 inetutils-1.9.4/m4/nls.m4 ---- inetutils-1.9.4.orig/m4/nls.m4 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/m4/nls.m4 2017-05-15 17:52:03.187500000 +0800 -@@ -0,0 +1,32 @@ -+# nls.m4 serial 5 (gettext-0.18) -+dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016 Free Software -+dnl Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+dnl -+dnl This file can be used in projects which are not available under -+dnl the GNU General Public License or the GNU Library General Public -+dnl License but which still want to provide support for the GNU gettext -+dnl functionality. -+dnl Please note that the actual code of the GNU gettext library is covered -+dnl by the GNU Library General Public License, and the rest of the GNU -+dnl gettext package is covered by the GNU General Public License. -+dnl They are *not* in the public domain. -+ -+dnl Authors: -+dnl Ulrich Drepper , 1995-2000. -+dnl Bruno Haible , 2000-2003. -+ -+AC_PREREQ([2.50]) -+ -+AC_DEFUN([AM_NLS], -+[ -+ AC_MSG_CHECKING([whether NLS is requested]) -+ dnl Default is enabled NLS -+ AC_ARG_ENABLE([nls], -+ [ --disable-nls do not use Native Language Support], -+ USE_NLS=$enableval, USE_NLS=yes) -+ AC_MSG_RESULT([$USE_NLS]) -+ AC_SUBST([USE_NLS]) -+]) -diff -durN inetutils-1.9.4.orig/m4/nocrash.m4 inetutils-1.9.4/m4/nocrash.m4 ---- inetutils-1.9.4.orig/m4/nocrash.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/nocrash.m4 2017-05-15 17:52:03.375000000 +0800 -@@ -1,5 +1,5 @@ - # nocrash.m4 serial 4 --dnl Copyright (C) 2005, 2009-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2005, 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -@@ -110,11 +110,12 @@ - #else - /* Avoid a crash on POSIX systems. */ - #include -+#include - /* A POSIX signal handler. */ - static void - exception_handler (int sig) - { -- exit (1); -+ _exit (1); - } - static void - nocrash_init (void) -diff -durN inetutils-1.9.4.orig/m4/obstack.m4 inetutils-1.9.4/m4/obstack.m4 ---- inetutils-1.9.4.orig/m4/obstack.m4 2015-03-31 15:07:23.000000000 +0800 -+++ inetutils-1.9.4/m4/obstack.m4 2017-05-15 17:52:03.515625000 +0800 -@@ -1,6 +1,6 @@ - # See if we need to provide obstacks. - --dnl Copyright 1996-2015 Free Software Foundation, Inc. -+dnl Copyright 1996-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/off_t.m4 inetutils-1.9.4/m4/off_t.m4 ---- inetutils-1.9.4.orig/m4/off_t.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/off_t.m4 2017-05-15 17:52:03.687500000 +0800 -@@ -1,5 +1,5 @@ - # off_t.m4 serial 1 --dnl Copyright (C) 2012-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2012-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/onceonly.m4 inetutils-1.9.4/m4/onceonly.m4 ---- inetutils-1.9.4.orig/m4/onceonly.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/onceonly.m4 1970-01-01 08:00:00.000000000 +0800 -@@ -1,104 +0,0 @@ --# onceonly.m4 serial 9 --dnl Copyright (C) 2002-2003, 2005-2006, 2008-2015 Free Software Foundation, --dnl Inc. --dnl --dnl This file 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 3 of the License, or --dnl (at your option) any later version. --dnl --dnl This file is distributed in the hope that it will be useful, --dnl but WITHOUT ANY WARRANTY; without even the implied warranty of --dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --dnl GNU General Public License for more details. --dnl --dnl You should have received a copy of the GNU General Public License --dnl along with this file. If not, see . --dnl --dnl As a special exception to the GNU General Public License, --dnl this file may be distributed as part of a program --dnl that contains a configuration script generated by Autoconf, under --dnl the same distribution terms as the rest of that program. -- --dnl This file defines some "once only" variants of standard autoconf macros. --dnl AC_CHECK_HEADERS_ONCE like AC_CHECK_HEADERS --dnl AC_CHECK_FUNCS_ONCE like AC_CHECK_FUNCS --dnl AC_CHECK_DECLS_ONCE like AC_CHECK_DECLS --dnl AC_REQUIRE([AC_FUNC_STRCOLL]) like AC_FUNC_STRCOLL --dnl The advantage is that the check for each of the headers/functions/decls --dnl will be put only once into the 'configure' file. It keeps the size of --dnl the 'configure' file down, and avoids redundant output when 'configure' --dnl is run. --dnl The drawback is that the checks cannot be conditionalized. If you write --dnl if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi --dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to --dnl empty, and the check will be inserted before the body of the AC_DEFUNed --dnl function. -- --dnl The original code implemented AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE --dnl in terms of AC_DEFUN and AC_REQUIRE. This implementation uses diversions to --dnl named sections DEFAULTS and INIT_PREPARE in order to check all requested --dnl headers at once, thus reducing the size of 'configure'. It is known to work --dnl with autoconf 2.57..2.62 at least . The size reduction is ca. 9%. -- --dnl Autoconf version 2.59 plus gnulib is required; this file is not needed --dnl with Autoconf 2.60 or greater. But note that autoconf's implementation of --dnl AC_CHECK_DECLS_ONCE expects a comma-separated list of symbols as first --dnl argument! --AC_PREREQ([2.59]) -- --# AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of --# AC_CHECK_HEADERS(HEADER1 HEADER2 ...). --AC_DEFUN([AC_CHECK_HEADERS_ONCE], [ -- : -- m4_foreach_w([gl_HEADER_NAME], [$1], [ -- AC_DEFUN([gl_CHECK_HEADER_]m4_quote(m4_translit(gl_HEADER_NAME, -- [./-], [___])), [ -- m4_divert_text([INIT_PREPARE], -- [gl_header_list="$gl_header_list gl_HEADER_NAME"]) -- gl_HEADERS_EXPANSION -- AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([gl_HEADER_NAME])), -- [Define to 1 if you have the <]m4_defn([gl_HEADER_NAME])[> header file.]) -- ]) -- AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(m4_translit(gl_HEADER_NAME, -- [./-], [___]))) -- ]) --]) --m4_define([gl_HEADERS_EXPANSION], [ -- m4_divert_text([DEFAULTS], [gl_header_list=]) -- AC_CHECK_HEADERS([$gl_header_list]) -- m4_define([gl_HEADERS_EXPANSION], []) --]) -- --# AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of --# AC_CHECK_FUNCS(FUNC1 FUNC2 ...). --AC_DEFUN([AC_CHECK_FUNCS_ONCE], [ -- : -- m4_foreach_w([gl_FUNC_NAME], [$1], [ -- AC_DEFUN([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]), [ -- m4_divert_text([INIT_PREPARE], -- [gl_func_list="$gl_func_list gl_FUNC_NAME"]) -- gl_FUNCS_EXPANSION -- AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([gl_FUNC_NAME])), -- [Define to 1 if you have the ']m4_defn([gl_FUNC_NAME])[' function.]) -- ]) -- AC_REQUIRE([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME])) -- ]) --]) --m4_define([gl_FUNCS_EXPANSION], [ -- m4_divert_text([DEFAULTS], [gl_func_list=]) -- AC_CHECK_FUNCS([$gl_func_list]) -- m4_define([gl_FUNCS_EXPANSION], []) --]) -- --# AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of --# AC_CHECK_DECLS(DECL1, DECL2, ...). --AC_DEFUN([AC_CHECK_DECLS_ONCE], [ -- : -- m4_foreach_w([gl_DECL_NAME], [$1], [ -- AC_DEFUN([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]), [ -- AC_CHECK_DECLS(m4_defn([gl_DECL_NAME])) -- ]) -- AC_REQUIRE([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME])) -- ]) --]) -diff -durN inetutils-1.9.4.orig/m4/open.m4 inetutils-1.9.4/m4/open.m4 ---- inetutils-1.9.4.orig/m4/open.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/open.m4 2017-05-15 17:52:03.859375000 +0800 -@@ -1,5 +1,5 @@ - # open.m4 serial 14 --dnl Copyright (C) 2007-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/openat.m4 inetutils-1.9.4/m4/openat.m4 ---- inetutils-1.9.4.orig/m4/openat.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/openat.m4 2017-05-15 17:52:04.015625000 +0800 -@@ -1,7 +1,7 @@ - # serial 45 - # See if we need to use our replacement for Solaris' openat et al functions. - --dnl Copyright (C) 2004-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2004-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/opendir.m4 inetutils-1.9.4/m4/opendir.m4 ---- inetutils-1.9.4.orig/m4/opendir.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/opendir.m4 2017-05-15 17:52:04.140625000 +0800 -@@ -1,5 +1,5 @@ --# opendir.m4 serial 2 --dnl Copyright (C) 2011-2015 Free Software Foundation, Inc. -+# opendir.m4 serial 4 -+dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -@@ -22,4 +22,10 @@ - fi - fi - ]) -+ dnl Replace opendir() on OS/2 kLIBC to support dirfd() function replaced -+ dnl by gnulib. -+ case $host_os,$HAVE_OPENDIR in -+ os2*,1) -+ REPLACE_OPENDIR=1;; -+ esac - ]) -diff -durN inetutils-1.9.4.orig/m4/pathmax.m4 inetutils-1.9.4/m4/pathmax.m4 ---- inetutils-1.9.4.orig/m4/pathmax.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/pathmax.m4 2017-05-15 17:52:04.265625000 +0800 -@@ -1,5 +1,5 @@ - # pathmax.m4 serial 10 --dnl Copyright (C) 2002-2003, 2005-2006, 2009-2015 Free Software Foundation, -+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2017 Free Software Foundation, - dnl Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, -diff -durN inetutils-1.9.4.orig/m4/po.m4 inetutils-1.9.4/m4/po.m4 ---- inetutils-1.9.4.orig/m4/po.m4 2015-05-12 20:15:30.000000000 +0800 -+++ inetutils-1.9.4/m4/po.m4 2017-05-15 17:52:04.406250000 +0800 -@@ -1,16 +1,16 @@ - # po.m4 serial 24 (gettext-0.19) --dnl Copyright (C) 1995-2014 Free Software Foundation, Inc. -+dnl Copyright (C) 1995-2014, 2016 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. - dnl --dnl This file can can be used in projects which are not available under -+dnl This file can be used in projects which are not available under - dnl the GNU General Public License or the GNU Library General Public - dnl License but which still want to provide support for the GNU gettext - dnl functionality. - dnl Please note that the actual code of the GNU gettext library is covered - dnl by the GNU Library General Public License, and the rest of the GNU --dnl gettext package package is covered by the GNU General Public License. -+dnl gettext package is covered by the GNU General Public License. - dnl They are *not* in the public domain. - - dnl Authors: -diff -durN inetutils-1.9.4.orig/m4/poll.m4 inetutils-1.9.4/m4/poll.m4 ---- inetutils-1.9.4.orig/m4/poll.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/poll.m4 2017-05-15 17:52:04.531250000 +0800 -@@ -1,5 +1,5 @@ - # poll.m4 serial 17 --dnl Copyright (c) 2003, 2005-2007, 2009-2015 Free Software Foundation, Inc. -+dnl Copyright (c) 2003, 2005-2007, 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/poll_h.m4 inetutils-1.9.4/m4/poll_h.m4 ---- inetutils-1.9.4.orig/m4/poll_h.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/poll_h.m4 2017-05-15 17:52:04.687500000 +0800 -@@ -1,5 +1,5 @@ - # poll_h.m4 serial 2 --dnl Copyright (C) 2010-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2010-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/posix_openpt.m4 inetutils-1.9.4/m4/posix_openpt.m4 ---- inetutils-1.9.4.orig/m4/posix_openpt.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/posix_openpt.m4 2017-05-15 17:52:04.812500000 +0800 -@@ -1,5 +1,5 @@ - # posix_openpt.m4 serial 2 --dnl Copyright (C) 2011-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/printf.m4 inetutils-1.9.4/m4/printf.m4 ---- inetutils-1.9.4.orig/m4/printf.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/printf.m4 2017-05-15 17:52:05.093750000 +0800 -@@ -1,5 +1,5 @@ --# printf.m4 serial 52 --dnl Copyright (C) 2003, 2007-2015 Free Software Foundation, Inc. -+# printf.m4 serial 53 -+dnl Copyright (C) 2003, 2007-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -@@ -38,6 +38,8 @@ - if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0 - || strcmp (buf, "12345671 33") != 0) - result |= 1; -+#else -+ result |= 1; - #endif - buf[0] = '\0'; - if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0 -@@ -487,6 +489,13 @@ - && strcmp (buf, "0x6.0ap-2 33") != 0 - && strcmp (buf, "0xc.14p-3 33") != 0)) - result |= 4; -+ /* This catches a Mac OS X 10.12.4 (Darwin 16.5) bug: it doesn't round. */ -+ if (sprintf (buf, "%.0a %d", 1.51, 33, 44, 55) < 0 -+ || (strcmp (buf, "0x2p+0 33") != 0 -+ && strcmp (buf, "0x3p-1 33") != 0 -+ && strcmp (buf, "0x6p-2 33") != 0 -+ && strcmp (buf, "0xcp-3 33") != 0)) -+ result |= 4; - /* This catches a FreeBSD 6.1 bug. See - */ - if (sprintf (buf, "%010a %d", 1.0 / zero, 33, 44, 55) < 0 -diff -durN inetutils-1.9.4.orig/m4/printf-posix.m4 inetutils-1.9.4/m4/printf-posix.m4 ---- inetutils-1.9.4.orig/m4/printf-posix.m4 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/m4/printf-posix.m4 2017-05-15 17:52:04.953125000 +0800 -@@ -0,0 +1,48 @@ -+# printf-posix.m4 serial 6 (gettext-0.18.2) -+dnl Copyright (C) 2003, 2007, 2009-2017 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+dnl From Bruno Haible. -+dnl Test whether the printf() function supports POSIX/XSI format strings with -+dnl positions. -+ -+AC_DEFUN([gt_PRINTF_POSIX], -+[ -+ AC_REQUIRE([AC_PROG_CC]) -+ AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings], -+ gt_cv_func_printf_posix, -+ [ -+ AC_RUN_IFELSE( -+ [AC_LANG_SOURCE([[ -+#include -+#include -+/* The string "%2$d %1$d", with dollar characters protected from the shell's -+ dollar expansion (possibly an autoconf bug). */ -+static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; -+static char buf[100]; -+int main () -+{ -+ sprintf (buf, format, 33, 55); -+ return (strcmp (buf, "55 33") != 0); -+}]])], -+ [gt_cv_func_printf_posix=yes], -+ [gt_cv_func_printf_posix=no], -+ [ -+ AC_EGREP_CPP([notposix], [ -+#if defined __NetBSD__ || defined __BEOS__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ -+ notposix -+#endif -+ ], -+ [gt_cv_func_printf_posix="guessing no"], -+ [gt_cv_func_printf_posix="guessing yes"]) -+ ]) -+ ]) -+ case $gt_cv_func_printf_posix in -+ *yes) -+ AC_DEFINE([HAVE_POSIX_PRINTF], [1], -+ [Define if your printf() function supports format strings with positions.]) -+ ;; -+ esac -+]) -diff -durN inetutils-1.9.4.orig/m4/progtest.m4 inetutils-1.9.4/m4/progtest.m4 ---- inetutils-1.9.4.orig/m4/progtest.m4 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/m4/progtest.m4 2017-05-15 17:52:05.281250000 +0800 -@@ -0,0 +1,91 @@ -+# progtest.m4 serial 7 (gettext-0.18.2) -+dnl Copyright (C) 1996-2003, 2005, 2008-2017 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+dnl -+dnl This file can can be used in projects which are not available under -+dnl the GNU General Public License or the GNU Library General Public -+dnl License but which still want to provide support for the GNU gettext -+dnl functionality. -+dnl Please note that the actual code of the GNU gettext library is covered -+dnl by the GNU Library General Public License, and the rest of the GNU -+dnl gettext package package is covered by the GNU General Public License. -+dnl They are *not* in the public domain. -+ -+dnl Authors: -+dnl Ulrich Drepper , 1996. -+ -+AC_PREREQ([2.50]) -+ -+# Search path for a program which passes the given test. -+ -+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, -+dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) -+AC_DEFUN([AM_PATH_PROG_WITH_TEST], -+[ -+# Prepare PATH_SEPARATOR. -+# The user is always right. -+if test "${PATH_SEPARATOR+set}" != set; then -+ # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which -+ # contains only /bin. Note that ksh looks also at the FPATH variable, -+ # so we have to set that as well for the test. -+ PATH_SEPARATOR=: -+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ -+ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ -+ || PATH_SEPARATOR=';' -+ } -+fi -+ -+# Find out how to test for executable files. Don't use a zero-byte file, -+# as systems may use methods other than mode bits to determine executability. -+cat >conf$$.file <<_ASEOF -+#! /bin/sh -+exit 0 -+_ASEOF -+chmod +x conf$$.file -+if test -x conf$$.file >/dev/null 2>&1; then -+ ac_executable_p="test -x" -+else -+ ac_executable_p="test -f" -+fi -+rm -f conf$$.file -+ -+# Extract the first word of "$2", so it can be a program name with args. -+set dummy $2; ac_word=[$]2 -+AC_MSG_CHECKING([for $ac_word]) -+AC_CACHE_VAL([ac_cv_path_$1], -+[case "[$]$1" in -+ [[\\/]]* | ?:[[\\/]]*) -+ ac_cv_path_$1="[$]$1" # Let the user override the test with a path. -+ ;; -+ *) -+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR -+ for ac_dir in ifelse([$5], , $PATH, [$5]); do -+ IFS="$ac_save_IFS" -+ test -z "$ac_dir" && ac_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then -+ echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD -+ if [$3]; then -+ ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" -+ break 2 -+ fi -+ fi -+ done -+ done -+ IFS="$ac_save_IFS" -+dnl If no 4th arg is given, leave the cache variable unset, -+dnl so AC_PATH_PROGS will keep looking. -+ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" -+])dnl -+ ;; -+esac])dnl -+$1="$ac_cv_path_$1" -+if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then -+ AC_MSG_RESULT([$][$1]) -+else -+ AC_MSG_RESULT([no]) -+fi -+AC_SUBST([$1])dnl -+]) -diff -durN inetutils-1.9.4.orig/m4/pthread_rwlock_rdlock.m4 inetutils-1.9.4/m4/pthread_rwlock_rdlock.m4 ---- inetutils-1.9.4.orig/m4/pthread_rwlock_rdlock.m4 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/m4/pthread_rwlock_rdlock.m4 2017-05-15 17:52:05.453125000 +0800 -@@ -0,0 +1,163 @@ -+# pthread_rwlock_rdlock.m4 serial 1 -+dnl Copyright (C) 2017 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+dnl From Bruno Haible. -+dnl Inspired by -+dnl https://github.com/linux-test-project/ltp/blob/master/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/2-2.c -+dnl by Intel Corporation. -+ -+dnl Test whether in a situation where -+dnl - an rwlock is taken by a reader and has a writer waiting, -+dnl - an additional reader requests the lock, -+dnl - the waiting writer and the requesting reader threads have the same -+dnl priority, -+dnl the requesting reader thread gets blocked, so that at some point the -+dnl waiting writer can acquire the lock. -+dnl Without such a guarantee, when there a N readers and each of the readers -+dnl spends more than 1/Nth of the time with the lock held, there is a high -+dnl probability that the waiting writer will not get the lock in a given finite -+dnl time, a phenomenon called "writer starvation". -+dnl Without such a guarantee, applications have a hard time avoiding writer -+dnl starvation. -+dnl -+dnl POSIX:2008 makes this requirement only for implementations that support TPS -+dnl (Thread Priority Scheduling) and only for the scheduling policies SCHED_FIFO -+dnl and SCHED_RR, see -+dnl http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_rwlock_rdlock.html -+dnl but test verifies the guarantee regardless of TPS and regardless of -+dnl scheduling policy. -+AC_DEFUN([gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER], -+[ -+ AC_REQUIRE([gl_THREADLIB_EARLY]) -+ AC_CACHE_CHECK([whether pthread_rwlock_rdlock prefers a writer to a reader], -+ [gl_cv_pthread_rwlock_rdlock_prefer_writer], -+ [save_LIBS="$LIBS" -+ LIBS="$LIBS $LIBMULTITHREAD" -+ AC_RUN_IFELSE( -+ [AC_LANG_SOURCE([[ -+#include -+#include -+#include -+#include -+ -+#define SUCCEED() exit (0) -+#define FAILURE() exit (1) -+#define UNEXPECTED(n) (exit (10 + (n))) -+ -+/* The main thread creates the waiting writer and the requesting reader threads -+ in the default way; this guarantees that they have the same priority. -+ We can reuse the main thread as first reader thread. */ -+ -+static pthread_rwlock_t lock; -+static pthread_t reader1; -+static pthread_t writer; -+static pthread_t reader2; -+static pthread_t timer; -+/* Used to pass control from writer to reader2 and from reader2 to timer, -+ as in a relay race. -+ Passing control from one running thread to another running thread -+ is most likely faster than to create the second thread. */ -+static pthread_mutex_t baton; -+ -+static void * -+timer_func (void *ignored) -+{ -+ /* Step 13 (can be before or after step 12): -+ The timer thread takes the baton, then waits a moment to make sure -+ it can tell whether the second reader thread is blocked at step 12. */ -+ if (pthread_mutex_lock (&baton)) -+ UNEXPECTED (13); -+ usleep (100000); -+ /* By the time we get here, it's clear that the second reader thread is -+ blocked at step 12. This is the desired behaviour. */ -+ SUCCEED (); -+} -+ -+static void * -+reader2_func (void *ignored) -+{ -+ int err; -+ -+ /* Step 8 (can be before or after step 7): -+ The second reader thread takes the baton, then waits a moment to make sure -+ the writer thread has reached step 7. */ -+ if (pthread_mutex_lock (&baton)) -+ UNEXPECTED (8); -+ usleep (100000); -+ /* Step 9: The second reader thread requests the lock. */ -+ err = pthread_rwlock_tryrdlock (&lock); -+ if (err == 0) -+ FAILURE (); -+ else if (err != EBUSY) -+ UNEXPECTED (9); -+ /* Step 10: Launch a timer, to test whether the next call blocks. */ -+ if (pthread_create (&timer, NULL, timer_func, NULL)) -+ UNEXPECTED (10); -+ /* Step 11: Release the baton. */ -+ if (pthread_mutex_unlock (&baton)) -+ UNEXPECTED (11); -+ /* Step 12: The second reader thread requests the lock. */ -+ err = pthread_rwlock_rdlock (&lock); -+ if (err == 0) -+ FAILURE (); -+ else -+ UNEXPECTED (12); -+} -+ -+static void * -+writer_func (void *ignored) -+{ -+ /* Step 4: Take the baton, so that the second reader thread does not go ahead -+ too early. */ -+ if (pthread_mutex_lock (&baton)) -+ UNEXPECTED (4); -+ /* Step 5: Create the second reader thread. */ -+ if (pthread_create (&reader2, NULL, reader2_func, NULL)) -+ UNEXPECTED (5); -+ /* Step 6: Release the baton. */ -+ if (pthread_mutex_unlock (&baton)) -+ UNEXPECTED (6); -+ /* Step 7: The writer thread requests the lock. */ -+ if (pthread_rwlock_wrlock (&lock)) -+ UNEXPECTED (7); -+ return NULL; -+} -+ -+int -+main () -+{ -+ reader1 = pthread_self (); -+ -+ /* Step 1: The main thread initializes the lock and the baton. */ -+ if (pthread_rwlock_init (&lock, NULL)) -+ UNEXPECTED (1); -+ if (pthread_mutex_init (&baton, NULL)) -+ UNEXPECTED (1); -+ /* Step 2: The main thread acquires the lock as a reader. */ -+ if (pthread_rwlock_rdlock (&lock)) -+ UNEXPECTED (2); -+ /* Step 3: Create the writer thread. */ -+ if (pthread_create (&writer, NULL, writer_func, NULL)) -+ UNEXPECTED (3); -+ /* Job done. Go to sleep. */ -+ for (;;) -+ { -+ sleep (1); -+ } -+} -+]])], -+ [gl_cv_pthread_rwlock_rdlock_prefer_writer=yes], -+ [gl_cv_pthread_rwlock_rdlock_prefer_writer=no], -+ [gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"]) -+ LIBS="$save_LIBS" -+ ]) -+ case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in -+ *yes) -+ AC_DEFINE([HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER], [1], -+ [Define if the 'pthread_rwlock_rdlock' function prefers a writer to a reader.]) -+ ;; -+ esac -+]) -diff -durN inetutils-1.9.4.orig/m4/pty.m4 inetutils-1.9.4/m4/pty.m4 ---- inetutils-1.9.4.orig/m4/pty.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/pty.m4 2017-05-15 17:52:05.609375000 +0800 -@@ -1,5 +1,5 @@ - # pty.m4 serial 13 --dnl Copyright (C) 2010-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2010-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/pty_h.m4 inetutils-1.9.4/m4/pty_h.m4 ---- inetutils-1.9.4.orig/m4/pty_h.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/pty_h.m4 2017-05-15 17:52:05.718750000 +0800 -@@ -1,5 +1,5 @@ - # pty_h.m4 serial 10 --dnl Copyright (C) 2009-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/rawmemchr.m4 inetutils-1.9.4/m4/rawmemchr.m4 ---- inetutils-1.9.4.orig/m4/rawmemchr.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/rawmemchr.m4 2017-05-15 17:52:05.843750000 +0800 -@@ -1,5 +1,5 @@ - # rawmemchr.m4 serial 2 --dnl Copyright (C) 2003, 2007-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2003, 2007-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/readdir.m4 inetutils-1.9.4/m4/readdir.m4 ---- inetutils-1.9.4.orig/m4/readdir.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/readdir.m4 2017-05-15 17:52:06.093750000 +0800 -@@ -1,5 +1,5 @@ - # readdir.m4 serial 1 --dnl Copyright (C) 2011-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/read-file.m4 inetutils-1.9.4/m4/read-file.m4 ---- inetutils-1.9.4.orig/m4/read-file.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/read-file.m4 2017-05-15 17:52:05.968750000 +0800 -@@ -1,5 +1,5 @@ - # read-file.m4 serial 3 --dnl Copyright (C) 2002-2006, 2009-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2002-2006, 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/readutmp.m4 inetutils-1.9.4/m4/readutmp.m4 ---- inetutils-1.9.4.orig/m4/readutmp.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/readutmp.m4 2017-05-15 17:52:06.218750000 +0800 -@@ -1,5 +1,5 @@ - # readutmp.m4 serial 20 --dnl Copyright (C) 2002-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2002-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/realloc.m4 inetutils-1.9.4/m4/realloc.m4 ---- inetutils-1.9.4.orig/m4/realloc.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/realloc.m4 2017-05-15 17:52:06.328125000 +0800 -@@ -1,13 +1,13 @@ --# realloc.m4 serial 13 --dnl Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. -+# realloc.m4 serial 14 -+dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. - - m4_version_prereq([2.70], [] ,[ - --# This is taken from the following Autoconf patch: --# http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=7fbb553727ed7e0e689a17594b58559ecf3ea6e9 -+# This is adapted with modifications from upstream Autoconf here: -+# http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c - AC_DEFUN([_AC_FUNC_REALLOC_IF], - [ - AC_REQUIRE([AC_HEADER_STDC])dnl -@@ -23,7 +23,10 @@ - char *realloc (); - #endif - ]], -- [[return ! realloc (0, 0);]]) -+ [[char *p = realloc (0, 0); -+ int result = !p; -+ free (p); -+ return result;]]) - ], - [ac_cv_func_realloc_0_nonnull=yes], - [ac_cv_func_realloc_0_nonnull=no], -diff -durN inetutils-1.9.4.orig/m4/regex.m4 inetutils-1.9.4/m4/regex.m4 ---- inetutils-1.9.4.orig/m4/regex.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/regex.m4 2017-05-15 17:52:06.468750000 +0800 -@@ -1,6 +1,6 @@ --# serial 65 -+# serial 66 - --# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. -+# Copyright (C) 1996-2001, 2003-2017 Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -93,6 +93,7 @@ - 0, sizeof data - 1, ®s) - != -1) - result |= 1; -+ regfree (®ex); - } - - { -@@ -124,6 +125,7 @@ - if (i != 0 && i != 21) - result |= 1; - } -+ regfree (®ex); - } - - if (! setlocale (LC_ALL, "C")) -diff -durN inetutils-1.9.4.orig/m4/rewinddir.m4 inetutils-1.9.4/m4/rewinddir.m4 ---- inetutils-1.9.4.orig/m4/rewinddir.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/rewinddir.m4 2017-05-15 17:52:06.625000000 +0800 -@@ -1,5 +1,5 @@ - # rewinddir.m4 serial 1 --dnl Copyright (C) 2011-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/save-cwd.m4 inetutils-1.9.4/m4/save-cwd.m4 ---- inetutils-1.9.4.orig/m4/save-cwd.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/save-cwd.m4 2017-05-15 17:52:06.750000000 +0800 -@@ -1,5 +1,5 @@ - # serial 10 --dnl Copyright (C) 2002-2006, 2009-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2002-2006, 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/secure_getenv.m4 inetutils-1.9.4/m4/secure_getenv.m4 ---- inetutils-1.9.4.orig/m4/secure_getenv.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/secure_getenv.m4 2017-05-15 17:52:06.890625000 +0800 -@@ -1,5 +1,5 @@ - # Look up an environment variable more securely. --dnl Copyright 2013-2015 Free Software Foundation, Inc. -+dnl Copyright 2013-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -@@ -22,4 +22,5 @@ - if test $ac_cv_func___secure_getenv = no; then - AC_CHECK_FUNCS([issetugid]) - fi -+ AC_CHECK_FUNCS_ONCE([getuid geteuid getgid getegid]) - ]) -diff -durN inetutils-1.9.4.orig/m4/select.m4 inetutils-1.9.4/m4/select.m4 ---- inetutils-1.9.4.orig/m4/select.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/select.m4 2017-05-15 17:52:07.000000000 +0800 -@@ -1,5 +1,5 @@ --# select.m4 serial 7 --dnl Copyright (C) 2009-2015 Free Software Foundation, Inc. -+# select.m4 serial 8 -+dnl Copyright (C) 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -@@ -7,6 +7,7 @@ - AC_DEFUN([gl_FUNC_SELECT], - [ - AC_REQUIRE([gl_HEADER_SYS_SELECT]) -+ AC_REQUIRE([AC_C_RESTRICT]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_REQUIRE([gl_SOCKETS]) - if test "$ac_cv_header_winsock2_h" = yes; then -diff -durN inetutils-1.9.4.orig/m4/servent.m4 inetutils-1.9.4/m4/servent.m4 ---- inetutils-1.9.4.orig/m4/servent.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/servent.m4 2017-05-15 17:52:07.187500000 +0800 -@@ -1,5 +1,5 @@ - # servent.m4 serial 2 --dnl Copyright (C) 2008, 2010-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2008, 2010-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/setenv.m4 inetutils-1.9.4/m4/setenv.m4 ---- inetutils-1.9.4.orig/m4/setenv.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/setenv.m4 2017-05-15 17:52:07.390625000 +0800 -@@ -1,5 +1,5 @@ - # setenv.m4 serial 26 --dnl Copyright (C) 2001-2004, 2006-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2001-2004, 2006-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/sethostname.m4 inetutils-1.9.4/m4/sethostname.m4 ---- inetutils-1.9.4.orig/m4/sethostname.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/sethostname.m4 2017-05-15 17:52:07.546875000 +0800 -@@ -1,5 +1,5 @@ - # sethostname.m4 serial 1 --dnl Copyright (C) 2011-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/signal_h.m4 inetutils-1.9.4/m4/signal_h.m4 ---- inetutils-1.9.4.orig/m4/signal_h.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/signal_h.m4 2017-05-15 17:52:07.703125000 +0800 -@@ -1,5 +1,5 @@ - # signal_h.m4 serial 18 --dnl Copyright (C) 2007-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/size_max.m4 inetutils-1.9.4/m4/size_max.m4 ---- inetutils-1.9.4.orig/m4/size_max.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/size_max.m4 2017-05-15 17:52:07.859375000 +0800 -@@ -1,5 +1,5 @@ - # size_max.m4 serial 10 --dnl Copyright (C) 2003, 2005-2006, 2008-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2003, 2005-2006, 2008-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/sleep.m4 inetutils-1.9.4/m4/sleep.m4 ---- inetutils-1.9.4.orig/m4/sleep.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/sleep.m4 2017-05-15 17:52:07.968750000 +0800 -@@ -1,5 +1,5 @@ - # sleep.m4 serial 7 --dnl Copyright (C) 2007-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/snprintf.m4 inetutils-1.9.4/m4/snprintf.m4 ---- inetutils-1.9.4.orig/m4/snprintf.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/snprintf.m4 2017-05-15 17:52:08.093750000 +0800 -@@ -1,5 +1,5 @@ --# snprintf.m4 serial 6 --dnl Copyright (C) 2002-2004, 2007-2015 Free Software Foundation, Inc. -+# snprintf.m4 serial 7 -+dnl Copyright (C) 2002-2004, 2007-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -@@ -46,6 +46,14 @@ - AC_LIBOBJ([snprintf]) - if test $ac_cv_func_snprintf = yes; then - REPLACE_SNPRINTF=1 -+ else -+ AC_CHECK_DECLS_ONCE([snprintf]) -+ if test $ac_cv_have_decl_snprintf = yes; then -+ dnl If the function is declared but does not appear to exist, it may be -+ dnl defined as an inline function. In order to avoid a conflict, we have -+ dnl to define rpl_snprintf, not snprintf. -+ REPLACE_SNPRINTF=1 -+ fi - fi - gl_PREREQ_SNPRINTF - ]) -diff -durN inetutils-1.9.4.orig/m4/socketlib.m4 inetutils-1.9.4/m4/socketlib.m4 ---- inetutils-1.9.4.orig/m4/socketlib.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/socketlib.m4 2017-05-15 17:52:08.203125000 +0800 -@@ -1,5 +1,5 @@ - # socketlib.m4 serial 1 --dnl Copyright (C) 2008-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2008-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/sockets.m4 inetutils-1.9.4/m4/sockets.m4 ---- inetutils-1.9.4.orig/m4/sockets.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/sockets.m4 2017-05-15 17:52:08.328125000 +0800 -@@ -1,5 +1,5 @@ - # sockets.m4 serial 7 --dnl Copyright (C) 2008-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2008-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/socklen.m4 inetutils-1.9.4/m4/socklen.m4 ---- inetutils-1.9.4.orig/m4/socklen.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/socklen.m4 2017-05-15 17:52:08.500000000 +0800 -@@ -1,5 +1,5 @@ - # socklen.m4 serial 10 --dnl Copyright (C) 2005-2007, 2009-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2005-2007, 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/sockpfaf.m4 inetutils-1.9.4/m4/sockpfaf.m4 ---- inetutils-1.9.4.orig/m4/sockpfaf.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/sockpfaf.m4 2017-05-15 17:52:08.625000000 +0800 -@@ -1,5 +1,5 @@ - # sockpfaf.m4 serial 8 --dnl Copyright (C) 2004, 2006, 2009-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2004, 2006, 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/ssize_t.m4 inetutils-1.9.4/m4/ssize_t.m4 ---- inetutils-1.9.4.orig/m4/ssize_t.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/ssize_t.m4 2017-05-15 17:52:08.750000000 +0800 -@@ -1,5 +1,5 @@ - # ssize_t.m4 serial 5 (gettext-0.18.2) --dnl Copyright (C) 2001-2003, 2006, 2010-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2001-2003, 2006, 2010-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/st_dm_mode.m4 inetutils-1.9.4/m4/st_dm_mode.m4 ---- inetutils-1.9.4.orig/m4/st_dm_mode.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/st_dm_mode.m4 2017-05-15 17:52:08.921875000 +0800 -@@ -1,6 +1,6 @@ - # serial 6 - --# Copyright (C) 1998-1999, 2001, 2009-2015 Free Software Foundation, Inc. -+# Copyright (C) 1998-1999, 2001, 2009-2017 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. -@@ -17,7 +17,7 @@ - - if test $ac_cv_struct_st_dm_mode = yes; then - AC_DEFINE([HAVE_ST_DM_MODE], [1], -- [Define if struct stat has an st_dm_mode member. ]) -+ [Define if struct stat has an st_dm_mode member.]) - fi - ] - ) -diff -durN inetutils-1.9.4.orig/m4/stat.m4 inetutils-1.9.4/m4/stat.m4 ---- inetutils-1.9.4.orig/m4/stat.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/stat.m4 2017-05-15 17:52:09.093750000 +0800 -@@ -1,6 +1,6 @@ --# serial 11 -+# serial 12 - --# Copyright (C) 2009-2015 Free Software Foundation, Inc. -+# Copyright (C) 2009-2017 Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -8,64 +8,60 @@ - - AC_DEFUN([gl_FUNC_STAT], - [ -- AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles -+ AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) - AC_CHECK_FUNCS_ONCE([lstat]) -- dnl mingw is the only known platform where stat(".") and stat("./") differ -- AC_CACHE_CHECK([whether stat handles trailing slashes on directories], -- [gl_cv_func_stat_dir_slash], -- [AC_RUN_IFELSE( -- [AC_LANG_PROGRAM( -- [[#include --]], [[struct stat st; return stat (".", &st) != stat ("./", &st);]])], -- [gl_cv_func_stat_dir_slash=yes], [gl_cv_func_stat_dir_slash=no], -- [case $host_os in -- mingw*) gl_cv_func_stat_dir_slash="guessing no";; -- *) gl_cv_func_stat_dir_slash="guessing yes";; -- esac])]) -- dnl AIX 7.1, Solaris 9, mingw64 mistakenly succeed on stat("file/"). -- dnl (For mingw, this is due to a broken stat() override in libmingwex.a.) -- dnl FreeBSD 7.2 mistakenly succeeds on stat("link-to-file/"). -- AC_CACHE_CHECK([whether stat handles trailing slashes on files], -- [gl_cv_func_stat_file_slash], -- [touch conftest.tmp -- # Assume that if we have lstat, we can also check symlinks. -- if test $ac_cv_func_lstat = yes; then -- ln -s conftest.tmp conftest.lnk -- fi -- AC_RUN_IFELSE( -- [AC_LANG_PROGRAM( -- [[#include -+ case "$host_os" in -+ mingw*) -+ dnl On this platform, the original stat() returns st_atime, st_mtime, -+ dnl st_ctime values that are affected by the time zone. -+ REPLACE_STAT=1 -+ ;; -+ *) -+ dnl AIX 7.1, Solaris 9, mingw64 mistakenly succeed on stat("file/"). -+ dnl (For mingw, this is due to a broken stat() override in libmingwex.a.) -+ dnl FreeBSD 7.2 mistakenly succeeds on stat("link-to-file/"). -+ AC_CACHE_CHECK([whether stat handles trailing slashes on files], -+ [gl_cv_func_stat_file_slash], -+ [touch conftest.tmp -+ # Assume that if we have lstat, we can also check symlinks. -+ if test $ac_cv_func_lstat = yes; then -+ ln -s conftest.tmp conftest.lnk -+ fi -+ AC_RUN_IFELSE( -+ [AC_LANG_PROGRAM( -+ [[#include - ]], [[int result = 0; -- struct stat st; -- if (!stat ("conftest.tmp/", &st)) -- result |= 1; -+ struct stat st; -+ if (!stat ("conftest.tmp/", &st)) -+ result |= 1; - #if HAVE_LSTAT -- if (!stat ("conftest.lnk/", &st)) -- result |= 2; -+ if (!stat ("conftest.lnk/", &st)) -+ result |= 2; - #endif -- return result; -- ]])], -- [gl_cv_func_stat_file_slash=yes], [gl_cv_func_stat_file_slash=no], -- [case "$host_os" in -- # Guess yes on glibc systems. -- *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;; -- # If we don't know, assume the worst. -- *) gl_cv_func_stat_file_slash="guessing no" ;; -- esac -- ]) -- rm -f conftest.tmp conftest.lnk]) -- case $gl_cv_func_stat_dir_slash in -- *no) REPLACE_STAT=1 -- AC_DEFINE([REPLACE_FUNC_STAT_DIR], [1], [Define to 1 if stat needs -- help when passed a directory name with a trailing slash]);; -- esac -- case $gl_cv_func_stat_file_slash in -- *no) REPLACE_STAT=1 -- AC_DEFINE([REPLACE_FUNC_STAT_FILE], [1], [Define to 1 if stat needs -- help when passed a file name with a trailing slash]);; -+ return result; -+ ]])], -+ [gl_cv_func_stat_file_slash=yes], [gl_cv_func_stat_file_slash=no], -+ [case "$host_os" in -+ # Guess yes on glibc systems. -+ *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;; -+ # If we don't know, assume the worst. -+ *) gl_cv_func_stat_file_slash="guessing no" ;; -+ esac -+ ]) -+ rm -f conftest.tmp conftest.lnk]) -+ case $gl_cv_func_stat_file_slash in -+ *no) -+ REPLACE_STAT=1 -+ AC_DEFINE([REPLACE_FUNC_STAT_FILE], [1], [Define to 1 if stat needs -+ help when passed a file name with a trailing slash]);; -+ esac -+ ;; - esac - ]) - --# Prerequisites of lib/stat.c. --AC_DEFUN([gl_PREREQ_STAT], [:]) -+# Prerequisites of lib/stat.c and lib/stat-w32.c. -+AC_DEFUN([gl_PREREQ_STAT], [ -+ AC_REQUIRE([gl_HEADER_SYS_STAT_H]) -+ : -+]) -diff -durN inetutils-1.9.4.orig/m4/stdalign.m4 inetutils-1.9.4/m4/stdalign.m4 ---- inetutils-1.9.4.orig/m4/stdalign.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/stdalign.m4 2017-05-15 17:52:09.281250000 +0800 -@@ -1,6 +1,6 @@ - # Check for stdalign.h that conforms to C11. - --dnl Copyright 2011-2015 Free Software Foundation, Inc. -+dnl Copyright 2011-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -@@ -35,8 +35,8 @@ - || (defined __APPLE__ && defined __MACH__ \ - ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \ - : __GNUC__) \ -- || __HP_cc || __HP_aCC || __IBMC__ || __IBMCPP__ \ -- || __ICC || 0x5110 <= __SUNPRO_C \ -+ || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \ -+ || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__ \ - || 1300 <= _MSC_VER) - struct alignas_test { char c; char alignas (8) alignas_8; }; - char test_alignas[offsetof (struct alignas_test, alignas_8) == 8 -diff -durN inetutils-1.9.4.orig/m4/stdarg.m4 inetutils-1.9.4/m4/stdarg.m4 ---- inetutils-1.9.4.orig/m4/stdarg.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/stdarg.m4 2017-05-15 17:52:09.406250000 +0800 -@@ -1,5 +1,5 @@ - # stdarg.m4 serial 6 --dnl Copyright (C) 2006, 2008-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2006, 2008-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/stdbool.m4 inetutils-1.9.4/m4/stdbool.m4 ---- inetutils-1.9.4.orig/m4/stdbool.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/stdbool.m4 2017-05-15 17:52:09.531250000 +0800 -@@ -1,11 +1,11 @@ - # Check for stdbool.h that conforms to C99. - --dnl Copyright (C) 2002-2006, 2009-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2002-2006, 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. - --#serial 5 -+#serial 7 - - # Prepare for substituting if it is not supported. - -@@ -43,56 +43,64 @@ - [AC_LANG_PROGRAM( - [[ - #include -- #ifndef bool -- "error: bool is not defined" -- #endif -- #ifndef false -- "error: false is not defined" -- #endif -- #if false -- "error: false is not 0" -- #endif -- #ifndef true -- "error: true is not defined" -- #endif -- #if true != 1 -- "error: true is not 1" -+ -+ #ifdef __cplusplus -+ typedef bool Bool; -+ #else -+ typedef _Bool Bool; -+ #ifndef bool -+ "error: bool is not defined" -+ #endif -+ #ifndef false -+ "error: false is not defined" -+ #endif -+ #if false -+ "error: false is not 0" -+ #endif -+ #ifndef true -+ "error: true is not defined" -+ #endif -+ #if true != 1 -+ "error: true is not 1" -+ #endif - #endif -+ - #ifndef __bool_true_false_are_defined - "error: __bool_true_false_are_defined is not defined" - #endif - -- struct s { _Bool s: 1; _Bool t; } s; -+ struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s; - - char a[true == 1 ? 1 : -1]; - char b[false == 0 ? 1 : -1]; - char c[__bool_true_false_are_defined == 1 ? 1 : -1]; - char d[(bool) 0.5 == true ? 1 : -1]; - /* See body of main program for 'e'. */ -- char f[(_Bool) 0.0 == false ? 1 : -1]; -+ char f[(Bool) 0.0 == false ? 1 : -1]; - char g[true]; -- char h[sizeof (_Bool)]; -+ char h[sizeof (Bool)]; - char i[sizeof s.t]; - enum { j = false, k = true, l = false * true, m = true * 256 }; - /* The following fails for - HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ -- _Bool n[m]; -+ Bool n[m]; - char o[sizeof n == m * sizeof n[0] ? 1 : -1]; -- char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; -+ char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; - /* Catch a bug in an HP-UX C compiler. See - http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html - http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html - */ -- _Bool q = true; -- _Bool *pq = &q; -+ Bool q = true; -+ Bool *pq = &q; -+ bool *qq = &q; - ]], - [[ - bool e = &s; -- *pq |= q; -- *pq |= ! q; -+ *pq |= q; *pq |= ! q; -+ *qq |= q; *qq |= ! q; - /* Refer to every declared value, to avoid compiler optimizations. */ - return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l -- + !m + !n + !o + !p + !q + !pq); -+ + !m + !n + !o + !p + !q + !pq + !qq); - ]])], - [ac_cv_header_stdbool_h=yes], - [ac_cv_header_stdbool_h=no])]) -diff -durN inetutils-1.9.4.orig/m4/stddef_h.m4 inetutils-1.9.4/m4/stddef_h.m4 ---- inetutils-1.9.4.orig/m4/stddef_h.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/stddef_h.m4 2017-05-15 17:52:09.734375000 +0800 -@@ -1,6 +1,6 @@ - dnl A placeholder for , for platforms that have issues. - # stddef_h.m4 serial 5 --dnl Copyright (C) 2009-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/stdint.m4 inetutils-1.9.4/m4/stdint.m4 ---- inetutils-1.9.4.orig/m4/stdint.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/stdint.m4 2017-05-15 17:52:09.890625000 +0800 -@@ -1,5 +1,5 @@ --# stdint.m4 serial 43 --dnl Copyright (C) 2001-2015 Free Software Foundation, Inc. -+# stdint.m4 serial 50 -+dnl Copyright (C) 2001-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -@@ -11,6 +11,9 @@ - [ - AC_PREREQ([2.59])dnl - -+ AC_REQUIRE([gl_LIMITS_H]) -+ AC_REQUIRE([gt_TYPE_WINT_T]) -+ - dnl Check for long long int and unsigned long long int. - AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) - if test $ac_cv_type_long_long_int = yes; then -@@ -70,6 +73,8 @@ - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([[ - #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ -+#define __STDC_CONSTANT_MACROS 1 -+#define __STDC_LIMIT_MACROS 1 - #include - /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in . */ - #if !(defined WCHAR_MIN && defined WCHAR_MAX) -@@ -150,6 +155,15 @@ - intmax_t i = INTMAX_MAX; - uintmax_t j = UINTMAX_MAX; - -+/* Check that SIZE_MAX has the correct type, if possible. */ -+#if 201112 <= __STDC_VERSION__ -+int k = _Generic (SIZE_MAX, size_t: 0); -+#elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \ -+ || (0x5110 <= __SUNPRO_C && !__STDC__)) -+extern size_t k; -+extern __typeof__ (SIZE_MAX) k; -+#endif -+ - #include /* for CHAR_BIT */ - #define TYPE_MINIMUM(t) \ - ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t))) -@@ -218,6 +232,8 @@ - AC_RUN_IFELSE([ - AC_LANG_PROGRAM([[ - #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ -+#define __STDC_CONSTANT_MACROS 1 -+#define __STDC_LIMIT_MACROS 1 - #include - ] - gl_STDINT_INCLUDES -@@ -278,28 +294,74 @@ - ]) - ]) - fi -+ -+ HAVE_C99_STDINT_H=0 -+ HAVE_SYS_BITYPES_H=0 -+ HAVE_SYS_INTTYPES_H=0 -+ STDINT_H=stdint.h - if test "$gl_cv_header_working_stdint_h" = yes; then -- STDINT_H= -+ HAVE_C99_STDINT_H=1 -+ dnl Now see whether the system works without -+ dnl __STDC_CONSTANT_MACROS/__STDC_LIMIT_MACROS defined. -+ AC_CACHE_CHECK([whether stdint.h predates C++11], -+ [gl_cv_header_stdint_predates_cxx11_h], -+ [gl_cv_header_stdint_predates_cxx11_h=yes -+ AC_COMPILE_IFELSE([ -+ AC_LANG_PROGRAM([[ -+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ -+#include -+] -+gl_STDINT_INCLUDES -+[ -+intmax_t im = INTMAX_MAX; -+int32_t i32 = INT32_C (0x7fffffff); -+ ]])], -+ [gl_cv_header_stdint_predates_cxx11_h=no])]) -+ -+ if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then -+ AC_DEFINE([__STDC_CONSTANT_MACROS], [1], -+ [Define to 1 if the system predates C++11.]) -+ AC_DEFINE([__STDC_LIMIT_MACROS], [1], -+ [Define to 1 if the system predates C++11.]) -+ fi -+ AC_CACHE_CHECK([whether stdint.h has UINTMAX_WIDTH etc.], -+ [gl_cv_header_stdint_width], -+ [gl_cv_header_stdint_width=no -+ AC_COMPILE_IFELSE( -+ [AC_LANG_PROGRAM([[ -+ /* Work if build is not clean. */ -+ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 -+ #ifndef __STDC_WANT_IEC_60559_BFP_EXT__ -+ #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 -+ #endif -+ #include -+ ]gl_STDINT_INCLUDES[ -+ int iw = UINTMAX_WIDTH; -+ ]])], -+ [gl_cv_header_stdint_width=yes])]) -+ if test "$gl_cv_header_stdint_width" = yes; then -+ STDINT_H= -+ fi - else - dnl Check for , and for - dnl (used in Linux libc4 >= 4.6.7 and libc5). - AC_CHECK_HEADERS([sys/inttypes.h sys/bitypes.h]) - if test $ac_cv_header_sys_inttypes_h = yes; then - HAVE_SYS_INTTYPES_H=1 -- else -- HAVE_SYS_INTTYPES_H=0 - fi -- AC_SUBST([HAVE_SYS_INTTYPES_H]) - if test $ac_cv_header_sys_bitypes_h = yes; then - HAVE_SYS_BITYPES_H=1 -- else -- HAVE_SYS_BITYPES_H=0 - fi -- AC_SUBST([HAVE_SYS_BITYPES_H]) -- - gl_STDINT_TYPE_PROPERTIES -- STDINT_H=stdint.h - fi -+ -+ dnl The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH. -+ LIMITS_H=limits.h -+ AM_CONDITIONAL([GL_GENERATE_LIMITS_H], [test -n "$LIMITS_H"]) -+ -+ AC_SUBST([HAVE_C99_STDINT_H]) -+ AC_SUBST([HAVE_SYS_BITYPES_H]) -+ AC_SUBST([HAVE_SYS_INTTYPES_H]) - AC_SUBST([STDINT_H]) - AM_CONDITIONAL([GL_GENERATE_STDINT_H], [test -n "$STDINT_H"]) - ]) -@@ -467,7 +529,7 @@ - dnl requirement that wint_t is "unchanged by default argument promotions". - dnl In this case gnulib's and override wint_t. - dnl Set the variable BITSIZEOF_WINT_T accordingly. -- if test $BITSIZEOF_WINT_T -lt 32; then -+ if test $GNULIB_OVERRIDES_WINT_T = 1; then - BITSIZEOF_WINT_T=32 - fi - ]) -@@ -477,8 +539,3 @@ - m4_ifdef([AC_COMPUTE_INT], [], [ - AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) - ]) -- --# Hey Emacs! --# Local Variables: --# indent-tabs-mode: nil --# End: -diff -durN inetutils-1.9.4.orig/m4/stdint_h.m4 inetutils-1.9.4/m4/stdint_h.m4 ---- inetutils-1.9.4.orig/m4/stdint_h.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/stdint_h.m4 2017-05-15 17:52:10.031250000 +0800 -@@ -1,5 +1,5 @@ - # stdint_h.m4 serial 9 --dnl Copyright (C) 1997-2004, 2006, 2008-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 1997-2004, 2006, 2008-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/stdio_h.m4 inetutils-1.9.4/m4/stdio_h.m4 ---- inetutils-1.9.4.orig/m4/stdio_h.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/stdio_h.m4 2017-05-15 17:52:10.203125000 +0800 -@@ -1,29 +1,39 @@ --# stdio_h.m4 serial 44 --dnl Copyright (C) 2007-2015 Free Software Foundation, Inc. -+# stdio_h.m4 serial 48 -+dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. - - AC_DEFUN([gl_STDIO_H], - [ -- dnl For __USE_MINGW_ANSI_STDIO -- AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) -- -+ AH_VERBATIM([MINGW_ANSI_STDIO], -+[/* Use GNU style printf and scanf. */ -+#ifndef __USE_MINGW_ANSI_STDIO -+# undef __USE_MINGW_ANSI_STDIO -+#endif -+]) -+ AC_DEFINE([__USE_MINGW_ANSI_STDIO]) - AC_REQUIRE([gl_STDIO_H_DEFAULTS]) - gl_NEXT_HEADERS([stdio.h]) - - dnl Determine whether __USE_MINGW_ANSI_STDIO makes printf and - dnl inttypes.h behave like gnu instead of system; we must give our - dnl printf wrapper the right attribute to match. -- AC_CACHE_CHECK([whether inttypes macros match system or gnu printf], -+ AC_CACHE_CHECK([which flavor of printf attribute matches inttypes macros], - [gl_cv_func_printf_attribute_flavor], -- [AC_EGREP_CPP([findme .(ll|j)d. findme], -- [#define __STDC_FORMAT_MACROS 1 -+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -+ #define __STDC_FORMAT_MACROS 1 - #include - #include -- findme PRIdMAX findme -- ], [gl_cv_func_printf_attribute_flavor=gnu], -- [gl_cv_func_printf_attribute_flavor=system])]) -+ /* For non-mingw systems, compilation will trivially succeed. -+ For mingw, compilation will succeed for older mingw (system -+ printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */ -+ #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \ -+ (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -+ extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1]; -+ #endif -+ ]])], [gl_cv_func_printf_attribute_flavor=system], -+ [gl_cv_func_printf_attribute_flavor=gnu])]) - if test "$gl_cv_func_printf_attribute_flavor" = gnu; then - AC_DEFINE([GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU], [1], - [Define to 1 if printf and friends should be labeled with -diff -durN inetutils-1.9.4.orig/m4/stdlib_h.m4 inetutils-1.9.4/m4/stdlib_h.m4 ---- inetutils-1.9.4.orig/m4/stdlib_h.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/stdlib_h.m4 2017-05-15 17:52:10.406250000 +0800 -@@ -1,5 +1,5 @@ --# stdlib_h.m4 serial 42 --dnl Copyright (C) 2007-2015 Free Software Foundation, Inc. -+# stdlib_h.m4 serial 43 -+dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -@@ -21,7 +21,7 @@ - #endif - ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt - initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps -- posix_openpt ptsname ptsname_r random random_r realpath rpmatch -+ posix_openpt ptsname ptsname_r qsort_r random random_r realpath rpmatch - secure_getenv setenv setstate setstate_r srandom srandom_r - strtod strtoll strtoull unlockpt unsetenv]) - ]) -@@ -85,6 +85,7 @@ - HAVE_POSIX_OPENPT=1; AC_SUBST([HAVE_POSIX_OPENPT]) - HAVE_PTSNAME=1; AC_SUBST([HAVE_PTSNAME]) - HAVE_PTSNAME_R=1; AC_SUBST([HAVE_PTSNAME_R]) -+ HAVE_QSORT_R=1; AC_SUBST([HAVE_QSORT_R]) - HAVE_RANDOM=1; AC_SUBST([HAVE_RANDOM]) - HAVE_RANDOM_H=1; AC_SUBST([HAVE_RANDOM_H]) - HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R]) -diff -durN inetutils-1.9.4.orig/m4/strcase.m4 inetutils-1.9.4/m4/strcase.m4 ---- inetutils-1.9.4.orig/m4/strcase.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/strcase.m4 2017-05-15 17:52:10.718750000 +0800 -@@ -1,5 +1,5 @@ - # strcase.m4 serial 11 --dnl Copyright (C) 2002, 2005-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2002, 2005-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/strchrnul.m4 inetutils-1.9.4/m4/strchrnul.m4 ---- inetutils-1.9.4.orig/m4/strchrnul.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/strchrnul.m4 2017-05-15 17:52:10.890625000 +0800 -@@ -1,5 +1,5 @@ - # strchrnul.m4 serial 9 --dnl Copyright (C) 2003, 2007, 2009-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2003, 2007, 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/strdup.m4 inetutils-1.9.4/m4/strdup.m4 ---- inetutils-1.9.4.orig/m4/strdup.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/strdup.m4 2017-05-15 17:52:11.015625000 +0800 -@@ -1,6 +1,6 @@ - # strdup.m4 serial 13 - --dnl Copyright (C) 2002-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2002-2017 Free Software Foundation, Inc. - - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, -diff -durN inetutils-1.9.4.orig/m4/strerror.m4 inetutils-1.9.4/m4/strerror.m4 ---- inetutils-1.9.4.orig/m4/strerror.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/strerror.m4 2017-05-15 17:52:11.156250000 +0800 -@@ -1,5 +1,5 @@ - # strerror.m4 serial 17 --dnl Copyright (C) 2002, 2007-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2002, 2007-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/string_h.m4 inetutils-1.9.4/m4/string_h.m4 ---- inetutils-1.9.4.orig/m4/string_h.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/string_h.m4 2017-05-15 17:52:11.312500000 +0800 -@@ -1,6 +1,6 @@ - # Configure a GNU-like replacement for . - --# Copyright (C) 2007-2015 Free Software Foundation, Inc. -+# Copyright (C) 2007-2017 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. -diff -durN inetutils-1.9.4.orig/m4/strings_h.m4 inetutils-1.9.4/m4/strings_h.m4 ---- inetutils-1.9.4.orig/m4/strings_h.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/strings_h.m4 2017-05-15 17:52:11.468750000 +0800 -@@ -1,7 +1,7 @@ - # Configure a replacement for . - # serial 6 - --# Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. -+# Copyright (C) 2007, 2009-2017 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. -diff -durN inetutils-1.9.4.orig/m4/strndup.m4 inetutils-1.9.4/m4/strndup.m4 ---- inetutils-1.9.4.orig/m4/strndup.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/strndup.m4 2017-05-15 17:52:11.625000000 +0800 -@@ -1,5 +1,5 @@ --# strndup.m4 serial 21 --dnl Copyright (C) 2002-2003, 2005-2015 Free Software Foundation, Inc. -+# strndup.m4 serial 22 -+dnl Copyright (C) 2002-2003, 2005-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -@@ -31,11 +31,14 @@ - #endif - char *strndup (const char *, size_t); - #endif -+ int result; - char *s; - s = strndup ("some longer string", 15); - free (s); - s = strndup ("shorter string", 13); -- return s[13] != '\0';]])], -+ result = s[13] != '\0'; -+ free (s); -+ return result;]])], - [gl_cv_func_strndup_works=yes], - [gl_cv_func_strndup_works=no], - [ -diff -durN inetutils-1.9.4.orig/m4/strnlen.m4 inetutils-1.9.4/m4/strnlen.m4 ---- inetutils-1.9.4.orig/m4/strnlen.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/strnlen.m4 2017-05-15 17:52:11.796875000 +0800 -@@ -1,5 +1,5 @@ - # strnlen.m4 serial 13 --dnl Copyright (C) 2002-2003, 2005-2007, 2009-2015 Free Software Foundation, -+dnl Copyright (C) 2002-2003, 2005-2007, 2009-2017 Free Software Foundation, - dnl Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, -diff -durN inetutils-1.9.4.orig/m4/sys_ioctl_h.m4 inetutils-1.9.4/m4/sys_ioctl_h.m4 ---- inetutils-1.9.4.orig/m4/sys_ioctl_h.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/sys_ioctl_h.m4 2017-05-15 17:52:11.921875000 +0800 -@@ -1,5 +1,5 @@ - # sys_ioctl_h.m4 serial 10 --dnl Copyright (C) 2008-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2008-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/sys_select_h.m4 inetutils-1.9.4/m4/sys_select_h.m4 ---- inetutils-1.9.4.orig/m4/sys_select_h.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/sys_select_h.m4 2017-05-15 17:52:12.046875000 +0800 -@@ -1,5 +1,5 @@ - # sys_select_h.m4 serial 20 --dnl Copyright (C) 2006-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2006-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/sys_socket_h.m4 inetutils-1.9.4/m4/sys_socket_h.m4 ---- inetutils-1.9.4.orig/m4/sys_socket_h.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/sys_socket_h.m4 2017-05-15 17:52:12.187500000 +0800 -@@ -1,5 +1,5 @@ - # sys_socket_h.m4 serial 23 --dnl Copyright (C) 2005-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2005-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/sys_stat_h.m4 inetutils-1.9.4/m4/sys_stat_h.m4 ---- inetutils-1.9.4.orig/m4/sys_stat_h.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/sys_stat_h.m4 2017-05-15 17:52:12.296875000 +0800 -@@ -1,5 +1,5 @@ --# sys_stat_h.m4 serial 28 -*- Autoconf -*- --dnl Copyright (C) 2006-2015 Free Software Foundation, Inc. -+# sys_stat_h.m4 serial 31 -*- Autoconf -*- -+dnl Copyright (C) 2006-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -@@ -19,18 +19,21 @@ - dnl Ensure the type mode_t gets defined. - AC_REQUIRE([AC_TYPE_MODE_T]) - -- dnl Whether to override 'struct stat'. -+ dnl Whether to enable precise timestamps in 'struct stat'. -+ m4_ifdef([gl_WINDOWS_STAT_TIMESPEC], [ -+ AC_REQUIRE([gl_WINDOWS_STAT_TIMESPEC]) -+ ], [ -+ WINDOWS_STAT_TIMESPEC=0 -+ ]) -+ AC_SUBST([WINDOWS_STAT_TIMESPEC]) -+ -+ dnl Whether to ensure that struct stat.st_size is 64-bit wide. - m4_ifdef([gl_LARGEFILE], [ - AC_REQUIRE([gl_LARGEFILE]) - ], [ - WINDOWS_64_BIT_ST_SIZE=0 - ]) - AC_SUBST([WINDOWS_64_BIT_ST_SIZE]) -- if test $WINDOWS_64_BIT_ST_SIZE = 1; then -- AC_DEFINE([_GL_WINDOWS_64_BIT_ST_SIZE], [1], -- [Define to 1 if Gnulib overrides 'struct stat' on Windows so that -- struct stat.st_size becomes 64-bit.]) -- fi - - dnl Define types that are supposed to be defined in or - dnl . -@@ -72,6 +75,7 @@ - GNULIB_MKNODAT=0; AC_SUBST([GNULIB_MKNODAT]) - GNULIB_STAT=0; AC_SUBST([GNULIB_STAT]) - GNULIB_UTIMENSAT=0; AC_SUBST([GNULIB_UTIMENSAT]) -+ GNULIB_OVERRIDES_STRUCT_STAT=0; AC_SUBST([GNULIB_OVERRIDES_STRUCT_STAT]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_FCHMODAT=1; AC_SUBST([HAVE_FCHMODAT]) - HAVE_FSTATAT=1; AC_SUBST([HAVE_FSTATAT]) -diff -durN inetutils-1.9.4.orig/m4/sys_time_h.m4 inetutils-1.9.4/m4/sys_time_h.m4 ---- inetutils-1.9.4.orig/m4/sys_time_h.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/sys_time_h.m4 2017-05-15 17:52:12.453125000 +0800 -@@ -1,7 +1,7 @@ - # Configure a replacement for . --# serial 8 -+# serial 9 - --# Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. -+# Copyright (C) 2007, 2009-2017 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. -diff -durN inetutils-1.9.4.orig/m4/sys_types_h.m4 inetutils-1.9.4/m4/sys_types_h.m4 ---- inetutils-1.9.4.orig/m4/sys_types_h.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/sys_types_h.m4 2017-05-15 17:52:12.593750000 +0800 -@@ -1,5 +1,5 @@ --# sys_types_h.m4 serial 5 --dnl Copyright (C) 2011-2015 Free Software Foundation, Inc. -+# sys_types_h.m4 serial 7 -+dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -@@ -17,8 +17,41 @@ - - dnl Whether to override the 'off_t' type. - AC_REQUIRE([gl_TYPE_OFF_T]) -+ -+ dnl Whether to override the 'dev_t' and 'ino_t' types. -+ m4_ifdef([gl_WINDOWS_STAT_INODES], [ -+ AC_REQUIRE([gl_WINDOWS_STAT_INODES]) -+ ], [ -+ WINDOWS_STAT_INODES=0 -+ ]) -+ AC_SUBST([WINDOWS_STAT_INODES]) - ]) - - AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS], - [ - ]) -+ -+# This works around a buggy version in autoconf <= 2.69. -+# See -+ -+m4_version_prereq([2.70], [], [ -+ -+# This is taken from the following Autoconf patch: -+# http://git.sv.gnu.org/cgit/autoconf.git/commit/?id=e17a30e98 -+ -+m4_undefine([AC_HEADER_MAJOR]) -+AC_DEFUN([AC_HEADER_MAJOR], -+[AC_CHECK_HEADERS_ONCE([sys/types.h]) -+AC_CHECK_HEADER([sys/mkdev.h], -+ [AC_DEFINE([MAJOR_IN_MKDEV], [1], -+ [Define to 1 if `major', `minor', and `makedev' are declared in -+ .])]) -+if test $ac_cv_header_sys_mkdev_h = no; then -+ AC_CHECK_HEADER([sys/sysmacros.h], -+ [AC_DEFINE([MAJOR_IN_SYSMACROS], [1], -+ [Define to 1 if `major', `minor', and `makedev' are declared in -+ .])]) -+fi -+]) -+ -+]) -diff -durN inetutils-1.9.4.orig/m4/sys_uio_h.m4 inetutils-1.9.4/m4/sys_uio_h.m4 ---- inetutils-1.9.4.orig/m4/sys_uio_h.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/sys_uio_h.m4 2017-05-15 17:52:12.734375000 +0800 -@@ -1,5 +1,5 @@ - # sys_uio_h.m4 serial 1 --dnl Copyright (C) 2011-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/sysexits.m4 inetutils-1.9.4/m4/sysexits.m4 ---- inetutils-1.9.4.orig/m4/sysexits.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/sysexits.m4 2017-05-15 17:52:12.875000000 +0800 -@@ -1,5 +1,5 @@ - # sysexits.m4 serial 6 --dnl Copyright (C) 2003, 2005, 2007, 2009-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2003, 2005, 2007, 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/tempname.m4 inetutils-1.9.4/m4/tempname.m4 ---- inetutils-1.9.4.orig/m4/tempname.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/tempname.m4 2017-05-15 17:52:13.046875000 +0800 -@@ -1,6 +1,6 @@ - #serial 5 - --# Copyright (C) 2006-2007, 2009-2015 Free Software Foundation, Inc. -+# Copyright (C) 2006-2007, 2009-2017 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. -diff -durN inetutils-1.9.4.orig/m4/termios_h.m4 inetutils-1.9.4/m4/termios_h.m4 ---- inetutils-1.9.4.orig/m4/termios_h.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/termios_h.m4 2017-05-15 17:52:13.171875000 +0800 -@@ -1,5 +1,5 @@ - # termios_h.m4 serial 4 --dnl Copyright (C) 2010-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2010-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/threadlib.m4 inetutils-1.9.4/m4/threadlib.m4 ---- inetutils-1.9.4.orig/m4/threadlib.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/threadlib.m4 2017-05-15 17:52:13.296875000 +0800 -@@ -1,5 +1,5 @@ --# threadlib.m4 serial 11 (gettext-0.18.2) --dnl Copyright (C) 2005-2015 Free Software Foundation, Inc. -+# threadlib.m4 serial 12 -+dnl Copyright (C) 2005-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -@@ -195,8 +195,10 @@ - # Therefore pthread_in_use() needs to actually try to create a - # thread: pthread_create from libc will fail, whereas - # pthread_create will actually create a thread. -+ # On Solaris 10 or newer, this test is no longer needed, because -+ # libc contains the fully functional pthread functions. - case "$host_os" in -- solaris* | hpux*) -+ solaris | solaris2.[1-9] | solaris2.[1-9].* | hpux*) - AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1], - [Define if the pthread_in_use() detection is hard.]) - esac -diff -durN inetutils-1.9.4.orig/m4/time_h.m4 inetutils-1.9.4/m4/time_h.m4 ---- inetutils-1.9.4.orig/m4/time_h.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/time_h.m4 2017-05-15 17:52:13.406250000 +0800 -@@ -1,8 +1,8 @@ - # Configure a more-standard replacement for . - --# Copyright (C) 2000-2001, 2003-2007, 2009-2015 Free Software Foundation, Inc. -+# Copyright (C) 2000-2001, 2003-2007, 2009-2017 Free Software Foundation, Inc. - --# serial 9 -+# serial 11 - - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -104,23 +104,34 @@ - - AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS], - [ -+ GNULIB_CTIME=0; AC_SUBST([GNULIB_CTIME]) - GNULIB_MKTIME=0; AC_SUBST([GNULIB_MKTIME]) -+ GNULIB_LOCALTIME=0; AC_SUBST([GNULIB_LOCALTIME]) - GNULIB_NANOSLEEP=0; AC_SUBST([GNULIB_NANOSLEEP]) -+ GNULIB_STRFTIME=0; AC_SUBST([GNULIB_STRFTIME]) - GNULIB_STRPTIME=0; AC_SUBST([GNULIB_STRPTIME]) - GNULIB_TIMEGM=0; AC_SUBST([GNULIB_TIMEGM]) - GNULIB_TIME_R=0; AC_SUBST([GNULIB_TIME_R]) -+ GNULIB_TIME_RZ=0; AC_SUBST([GNULIB_TIME_RZ]) -+ GNULIB_TZSET=0; AC_SUBST([GNULIB_TZSET]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_DECL_LOCALTIME_R=1; AC_SUBST([HAVE_DECL_LOCALTIME_R]) - HAVE_NANOSLEEP=1; AC_SUBST([HAVE_NANOSLEEP]) - HAVE_STRPTIME=1; AC_SUBST([HAVE_STRPTIME]) - HAVE_TIMEGM=1; AC_SUBST([HAVE_TIMEGM]) -+ HAVE_TZSET=1; AC_SUBST([HAVE_TZSET]) -+ dnl Even GNU libc does not have timezone_t yet. -+ HAVE_TIMEZONE_T=0; AC_SUBST([HAVE_TIMEZONE_T]) - dnl If another module says to replace or to not replace, do that. - dnl Otherwise, replace only if someone compiles with -DGNULIB_PORTCHECK; - dnl this lets maintainers check for portability. -+ REPLACE_CTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_CTIME]) - REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; AC_SUBST([REPLACE_LOCALTIME_R]) - REPLACE_MKTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_MKTIME]) - REPLACE_NANOSLEEP=GNULIB_PORTCHECK; AC_SUBST([REPLACE_NANOSLEEP]) -+ REPLACE_STRFTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_STRFTIME]) - REPLACE_TIMEGM=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TIMEGM]) -+ REPLACE_TZSET=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TZSET]) - - dnl Hack so that the time module doesn't depend on the sys_time module. - dnl First, default GNULIB_GETTIMEOFDAY to 0 if sys_time is absent. -diff -durN inetutils-1.9.4.orig/m4/uintmax_t.m4 inetutils-1.9.4/m4/uintmax_t.m4 ---- inetutils-1.9.4.orig/m4/uintmax_t.m4 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/m4/uintmax_t.m4 2017-05-15 17:52:13.531250000 +0800 -@@ -0,0 +1,30 @@ -+# uintmax_t.m4 serial 12 -+dnl Copyright (C) 1997-2004, 2007-2017 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+dnl From Paul Eggert. -+ -+AC_PREREQ([2.13]) -+ -+# Define uintmax_t to 'unsigned long' or 'unsigned long long' -+# if it is not already defined in or . -+ -+AC_DEFUN([gl_AC_TYPE_UINTMAX_T], -+[ -+ AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) -+ AC_REQUIRE([gl_AC_HEADER_STDINT_H]) -+ if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then -+ AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) -+ test $ac_cv_type_unsigned_long_long_int = yes \ -+ && ac_type='unsigned long long' \ -+ || ac_type='unsigned long' -+ AC_DEFINE_UNQUOTED([uintmax_t], [$ac_type], -+ [Define to unsigned long or unsigned long long -+ if and don't define.]) -+ else -+ AC_DEFINE([HAVE_UINTMAX_T], [1], -+ [Define if you have the 'uintmax_t' type in or .]) -+ fi -+]) -diff -durN inetutils-1.9.4.orig/m4/unistd_h.m4 inetutils-1.9.4/m4/unistd_h.m4 ---- inetutils-1.9.4.orig/m4/unistd_h.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/unistd_h.m4 2017-05-15 17:52:13.796875000 +0800 -@@ -1,5 +1,5 @@ --# unistd_h.m4 serial 68 --dnl Copyright (C) 2006-2015 Free Software Foundation, Inc. -+# unistd_h.m4 serial 70 -+dnl Copyright (C) 2006-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -@@ -46,8 +46,8 @@ - gethostname getlogin getlogin_r getpagesize - getusershell setusershell endusershell - group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite -- readlink readlinkat rmdir sethostname sleep symlink symlinkat ttyname_r -- unlink unlinkat usleep]) -+ readlink readlinkat rmdir sethostname sleep symlink symlinkat -+ truncate ttyname_r unlink unlinkat usleep]) - ]) - - AC_DEFUN([gl_UNISTD_MODULE_INDICATOR], -@@ -102,6 +102,7 @@ - GNULIB_SLEEP=0; AC_SUBST([GNULIB_SLEEP]) - GNULIB_SYMLINK=0; AC_SUBST([GNULIB_SYMLINK]) - GNULIB_SYMLINKAT=0; AC_SUBST([GNULIB_SYMLINKAT]) -+ GNULIB_TRUNCATE=0; AC_SUBST([GNULIB_TRUNCATE]) - GNULIB_TTYNAME_R=0; AC_SUBST([GNULIB_TTYNAME_R]) - GNULIB_UNISTD_H_NONBLOCKING=0; AC_SUBST([GNULIB_UNISTD_H_NONBLOCKING]) - GNULIB_UNISTD_H_SIGPIPE=0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE]) -@@ -139,12 +140,14 @@ - HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP]) - HAVE_SYMLINK=1; AC_SUBST([HAVE_SYMLINK]) - HAVE_SYMLINKAT=1; AC_SUBST([HAVE_SYMLINKAT]) -+ HAVE_TRUNCATE=1; AC_SUBST([HAVE_TRUNCATE]) - HAVE_UNLINKAT=1; AC_SUBST([HAVE_UNLINKAT]) - HAVE_USLEEP=1; AC_SUBST([HAVE_USLEEP]) - HAVE_DECL_ENVIRON=1; AC_SUBST([HAVE_DECL_ENVIRON]) - HAVE_DECL_FCHDIR=1; AC_SUBST([HAVE_DECL_FCHDIR]) - HAVE_DECL_FDATASYNC=1; AC_SUBST([HAVE_DECL_FDATASYNC]) - HAVE_DECL_GETDOMAINNAME=1; AC_SUBST([HAVE_DECL_GETDOMAINNAME]) -+ HAVE_DECL_GETLOGIN=1; AC_SUBST([HAVE_DECL_GETLOGIN]) - HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R]) - HAVE_DECL_GETPAGESIZE=1; AC_SUBST([HAVE_DECL_GETPAGESIZE]) - HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL]) -@@ -178,6 +181,7 @@ - REPLACE_SLEEP=0; AC_SUBST([REPLACE_SLEEP]) - REPLACE_SYMLINK=0; AC_SUBST([REPLACE_SYMLINK]) - REPLACE_SYMLINKAT=0; AC_SUBST([REPLACE_SYMLINKAT]) -+ REPLACE_TRUNCATE=0; AC_SUBST([REPLACE_TRUNCATE]) - REPLACE_TTYNAME_R=0; AC_SUBST([REPLACE_TTYNAME_R]) - REPLACE_UNLINK=0; AC_SUBST([REPLACE_UNLINK]) - REPLACE_UNLINKAT=0; AC_SUBST([REPLACE_UNLINKAT]) -diff -durN inetutils-1.9.4.orig/m4/unistd-safer.m4 inetutils-1.9.4/m4/unistd-safer.m4 ---- inetutils-1.9.4.orig/m4/unistd-safer.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/unistd-safer.m4 2017-05-15 17:52:13.671875000 +0800 -@@ -1,5 +1,5 @@ - #serial 9 --dnl Copyright (C) 2002, 2005-2006, 2009-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2002, 2005-2006, 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/vasnprintf.m4 inetutils-1.9.4/m4/vasnprintf.m4 ---- inetutils-1.9.4.orig/m4/vasnprintf.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/vasnprintf.m4 2017-05-15 17:52:13.906250000 +0800 -@@ -1,5 +1,5 @@ - # vasnprintf.m4 serial 36 --dnl Copyright (C) 2002-2004, 2006-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2002-2004, 2006-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/vasprintf.m4 inetutils-1.9.4/m4/vasprintf.m4 ---- inetutils-1.9.4.orig/m4/vasprintf.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/vasprintf.m4 2017-05-15 17:52:14.062500000 +0800 -@@ -1,5 +1,5 @@ - # vasprintf.m4 serial 6 --dnl Copyright (C) 2002-2003, 2006-2007, 2009-2015 Free Software Foundation, -+dnl Copyright (C) 2002-2003, 2006-2007, 2009-2017 Free Software Foundation, - dnl Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, -diff -durN inetutils-1.9.4.orig/m4/version-etc.m4 inetutils-1.9.4/m4/version-etc.m4 ---- inetutils-1.9.4.orig/m4/version-etc.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/version-etc.m4 2017-05-15 17:52:14.265625000 +0800 -@@ -1,5 +1,5 @@ - # version-etc.m4 serial 1 --# Copyright (C) 2009-2015 Free Software Foundation, Inc. -+# Copyright (C) 2009-2017 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. -diff -durN inetutils-1.9.4.orig/m4/visibility.m4 inetutils-1.9.4/m4/visibility.m4 ---- inetutils-1.9.4.orig/m4/visibility.m4 1970-01-01 08:00:00.000000000 +0800 -+++ inetutils-1.9.4/m4/visibility.m4 2017-05-15 17:52:14.421875000 +0800 -@@ -0,0 +1,77 @@ -+# visibility.m4 serial 5 (gettext-0.18.2) -+dnl Copyright (C) 2005, 2008, 2010-2017 Free Software Foundation, Inc. -+dnl This file is free software; the Free Software Foundation -+dnl gives unlimited permission to copy and/or distribute it, -+dnl with or without modifications, as long as this notice is preserved. -+ -+dnl From Bruno Haible. -+ -+dnl Tests whether the compiler supports the command-line option -+dnl -fvisibility=hidden and the function and variable attributes -+dnl __attribute__((__visibility__("hidden"))) and -+dnl __attribute__((__visibility__("default"))). -+dnl Does *not* test for __visibility__("protected") - which has tricky -+dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on -+dnl Mac OS X. -+dnl Does *not* test for __visibility__("internal") - which has processor -+dnl dependent semantics. -+dnl Does *not* test for #pragma GCC visibility push(hidden) - which is -+dnl "really only recommended for legacy code". -+dnl Set the variable CFLAG_VISIBILITY. -+dnl Defines and sets the variable HAVE_VISIBILITY. -+ -+AC_DEFUN([gl_VISIBILITY], -+[ -+ AC_REQUIRE([AC_PROG_CC]) -+ CFLAG_VISIBILITY= -+ HAVE_VISIBILITY=0 -+ if test -n "$GCC"; then -+ dnl First, check whether -Werror can be added to the command line, or -+ dnl whether it leads to an error because of some other option that the -+ dnl user has put into $CC $CFLAGS $CPPFLAGS. -+ AC_MSG_CHECKING([whether the -Werror option is usable]) -+ AC_CACHE_VAL([gl_cv_cc_vis_werror], [ -+ gl_save_CFLAGS="$CFLAGS" -+ CFLAGS="$CFLAGS -Werror" -+ AC_COMPILE_IFELSE( -+ [AC_LANG_PROGRAM([[]], [[]])], -+ [gl_cv_cc_vis_werror=yes], -+ [gl_cv_cc_vis_werror=no]) -+ CFLAGS="$gl_save_CFLAGS"]) -+ AC_MSG_RESULT([$gl_cv_cc_vis_werror]) -+ dnl Now check whether visibility declarations are supported. -+ AC_MSG_CHECKING([for simple visibility declarations]) -+ AC_CACHE_VAL([gl_cv_cc_visibility], [ -+ gl_save_CFLAGS="$CFLAGS" -+ CFLAGS="$CFLAGS -fvisibility=hidden" -+ dnl We use the option -Werror and a function dummyfunc, because on some -+ dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning -+ dnl "visibility attribute not supported in this configuration; ignored" -+ dnl at the first function definition in every compilation unit, and we -+ dnl don't want to use the option in this case. -+ if test $gl_cv_cc_vis_werror = yes; then -+ CFLAGS="$CFLAGS -Werror" -+ fi -+ AC_COMPILE_IFELSE( -+ [AC_LANG_PROGRAM( -+ [[extern __attribute__((__visibility__("hidden"))) int hiddenvar; -+ extern __attribute__((__visibility__("default"))) int exportedvar; -+ extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); -+ extern __attribute__((__visibility__("default"))) int exportedfunc (void); -+ void dummyfunc (void) {} -+ ]], -+ [[]])], -+ [gl_cv_cc_visibility=yes], -+ [gl_cv_cc_visibility=no]) -+ CFLAGS="$gl_save_CFLAGS"]) -+ AC_MSG_RESULT([$gl_cv_cc_visibility]) -+ if test $gl_cv_cc_visibility = yes; then -+ CFLAG_VISIBILITY="-fvisibility=hidden" -+ HAVE_VISIBILITY=1 -+ fi -+ fi -+ AC_SUBST([CFLAG_VISIBILITY]) -+ AC_SUBST([HAVE_VISIBILITY]) -+ AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY], -+ [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.]) -+]) -diff -durN inetutils-1.9.4.orig/m4/vsnprintf.m4 inetutils-1.9.4/m4/vsnprintf.m4 ---- inetutils-1.9.4.orig/m4/vsnprintf.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/vsnprintf.m4 2017-05-15 17:52:14.531250000 +0800 -@@ -1,5 +1,5 @@ --# vsnprintf.m4 serial 6 --dnl Copyright (C) 2002-2004, 2007-2015 Free Software Foundation, Inc. -+# vsnprintf.m4 serial 7 -+dnl Copyright (C) 2002-2004, 2007-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -@@ -46,6 +46,14 @@ - AC_LIBOBJ([vsnprintf]) - if test $ac_cv_func_vsnprintf = yes; then - REPLACE_VSNPRINTF=1 -+ else -+ AC_CHECK_DECLS_ONCE([vsnprintf]) -+ if test $ac_cv_have_decl_vsnprintf = yes; then -+ dnl If the function is declared but does not appear to exist, it may be -+ dnl defined as an inline function. In order to avoid a conflict, we have -+ dnl to define rpl_vsnprintf, not vsnprintf. -+ REPLACE_VSNPRINTF=1 -+ fi - fi - gl_PREREQ_VSNPRINTF - ]) -diff -durN inetutils-1.9.4.orig/m4/warn-on-use.m4 inetutils-1.9.4/m4/warn-on-use.m4 ---- inetutils-1.9.4.orig/m4/warn-on-use.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/warn-on-use.m4 2017-05-15 17:52:14.656250000 +0800 -@@ -1,5 +1,5 @@ - # warn-on-use.m4 serial 5 --dnl Copyright (C) 2010-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2010-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/wchar_h.m4 inetutils-1.9.4/m4/wchar_h.m4 ---- inetutils-1.9.4.orig/m4/wchar_h.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/wchar_h.m4 2017-05-15 17:52:14.781250000 +0800 -@@ -1,13 +1,13 @@ - dnl A placeholder for ISO C99 , for platforms that have issues. - --dnl Copyright (C) 2007-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. - - dnl Written by Eric Blake. - --# wchar_h.m4 serial 39 -+# wchar_h.m4 serial 42 - - AC_DEFUN([gl_WCHAR_H], - [ -@@ -35,6 +35,8 @@ - fi - AC_SUBST([HAVE_WINT_T]) - -+ AC_REQUIRE([gl_TYPE_WINT_T_PREREQ]) -+ - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use. - gl_WARN_ON_USE_PREPARE([[ -@@ -53,7 +55,7 @@ - wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset - wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp - wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr -- wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth -+ wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth wcsftime - ]) - ]) - -@@ -81,8 +83,14 @@ - extern int zero (void); - int main () { return zero(); } - ]])]) -+ dnl Do not rename the object file from conftest.$ac_objext to -+ dnl conftest1.$ac_objext, as this will cause the link to fail on -+ dnl z/OS when using the XPLINK object format (due to duplicate -+ dnl CSECT names). Instead, temporarily redefine $ac_compile so -+ dnl that the object file has the latter name from the start. -+ save_ac_compile="$ac_compile" -+ ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/` - if AC_TRY_EVAL([ac_compile]); then -- mv conftest.$ac_objext conftest1.$ac_objext - AC_LANG_CONFTEST([ - AC_LANG_SOURCE([[#define wcstod renamed_wcstod - /* Tru64 with Desktop Toolkit C has a bug: must be included before -@@ -95,8 +103,9 @@ - #include - int zero (void) { return 0; } - ]])]) -+ dnl See note above about renaming object files. -+ ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/` - if AC_TRY_EVAL([ac_compile]); then -- mv conftest.$ac_objext conftest2.$ac_objext - if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&AS_MESSAGE_LOG_FD 2>&1; then - : - else -@@ -104,6 +113,7 @@ - fi - fi - fi -+ ac_compile="$save_ac_compile" - rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext - ]) - if test $gl_cv_header_wchar_h_correct_inline = no; then -@@ -169,6 +179,7 @@ - GNULIB_WCSSTR=0; AC_SUBST([GNULIB_WCSSTR]) - GNULIB_WCSTOK=0; AC_SUBST([GNULIB_WCSTOK]) - GNULIB_WCSWIDTH=0; AC_SUBST([GNULIB_WCSWIDTH]) -+ GNULIB_WCSFTIME=0; AC_SUBST([GNULIB_WCSFTIME]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_BTOWC=1; AC_SUBST([HAVE_BTOWC]) - HAVE_MBSINIT=1; AC_SUBST([HAVE_MBSINIT]) -@@ -207,6 +218,7 @@ - HAVE_WCSSTR=1; AC_SUBST([HAVE_WCSSTR]) - HAVE_WCSTOK=1; AC_SUBST([HAVE_WCSTOK]) - HAVE_WCSWIDTH=1; AC_SUBST([HAVE_WCSWIDTH]) -+ HAVE_WCSFTIME=1; AC_SUBST([HAVE_WCSFTIME]) - HAVE_DECL_WCTOB=1; AC_SUBST([HAVE_DECL_WCTOB]) - HAVE_DECL_WCWIDTH=1; AC_SUBST([HAVE_DECL_WCWIDTH]) - REPLACE_MBSTATE_T=0; AC_SUBST([REPLACE_MBSTATE_T]) -@@ -222,4 +234,5 @@ - REPLACE_WCSNRTOMBS=0; AC_SUBST([REPLACE_WCSNRTOMBS]) - REPLACE_WCWIDTH=0; AC_SUBST([REPLACE_WCWIDTH]) - REPLACE_WCSWIDTH=0; AC_SUBST([REPLACE_WCSWIDTH]) -+ REPLACE_WCSFTIME=0; AC_SUBST([REPLACE_WCSFTIME]) - ]) -diff -durN inetutils-1.9.4.orig/m4/wchar_t.m4 inetutils-1.9.4/m4/wchar_t.m4 ---- inetutils-1.9.4.orig/m4/wchar_t.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/wchar_t.m4 2017-05-15 17:52:14.906250000 +0800 -@@ -1,5 +1,5 @@ - # wchar_t.m4 serial 4 (gettext-0.18.2) --dnl Copyright (C) 2002-2003, 2008-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2002-2003, 2008-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/wcrtomb.m4 inetutils-1.9.4/m4/wcrtomb.m4 ---- inetutils-1.9.4.orig/m4/wcrtomb.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/wcrtomb.m4 2017-05-15 17:52:15.031250000 +0800 -@@ -1,5 +1,5 @@ - # wcrtomb.m4 serial 11 --dnl Copyright (C) 2008-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2008-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/wctype_h.m4 inetutils-1.9.4/m4/wctype_h.m4 ---- inetutils-1.9.4.orig/m4/wctype_h.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/wctype_h.m4 2017-05-15 17:52:15.156250000 +0800 -@@ -1,8 +1,8 @@ --# wctype_h.m4 serial 18 -+# wctype_h.m4 serial 20 - - dnl A placeholder for ISO C99 , for platforms that lack it. - --dnl Copyright (C) 2006-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2006-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -@@ -30,6 +30,8 @@ - fi - AC_SUBST([HAVE_WINT_T]) - -+ AC_REQUIRE([gl_TYPE_WINT_T_PREREQ]) -+ - gl_CHECK_NEXT_HEADERS([wctype.h]) - if test $ac_cv_header_wctype_h = yes; then - if test $ac_cv_func_iswcntrl = yes; then -diff -durN inetutils-1.9.4.orig/m4/wint_t.m4 inetutils-1.9.4/m4/wint_t.m4 ---- inetutils-1.9.4.orig/m4/wint_t.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/wint_t.m4 2017-05-15 17:52:15.312500000 +0800 -@@ -1,11 +1,12 @@ --# wint_t.m4 serial 5 (gettext-0.18.2) --dnl Copyright (C) 2003, 2007-2015 Free Software Foundation, Inc. -+# wint_t.m4 serial 7 -+dnl Copyright (C) 2003, 2007-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. - - dnl From Bruno Haible. --dnl Test whether has the 'wint_t' type. -+dnl Test whether has the 'wint_t' type and whether gnulib's -+dnl or would, if present, override 'wint_t'. - dnl Prerequisite: AC_PROG_CC - - AC_DEFUN([gt_TYPE_WINT_T], -@@ -28,5 +29,46 @@ - [gt_cv_c_wint_t=no])]) - if test $gt_cv_c_wint_t = yes; then - AC_DEFINE([HAVE_WINT_T], [1], [Define if you have the 'wint_t' type.]) -+ -+ dnl Determine whether gnulib's or would, if present, -+ dnl override 'wint_t'. -+ AC_CACHE_CHECK([whether wint_t is too small], -+ [gl_cv_type_wint_t_too_small], -+ [AC_COMPILE_IFELSE( -+ [AC_LANG_PROGRAM([[ -+/* Tru64 with Desktop Toolkit C has a bug: must be included before -+ . -+ BSD/OS 4.0.1 has a bug: , and must be -+ included before . */ -+#if !(defined __GLIBC__ && !defined __UCLIBC__) -+# include -+# include -+# include -+#endif -+#include -+ int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1]; -+ ]])], -+ [gl_cv_type_wint_t_too_small=no], -+ [gl_cv_type_wint_t_too_small=yes])]) -+ if test $gl_cv_type_wint_t_too_small = yes; then -+ GNULIB_OVERRIDES_WINT_T=1 -+ else -+ GNULIB_OVERRIDES_WINT_T=0 -+ fi -+ else -+ GNULIB_OVERRIDES_WINT_T=0 -+ fi -+ AC_SUBST([GNULIB_OVERRIDES_WINT_T]) -+]) -+ -+dnl Prerequisites of the 'wint_t' override. -+AC_DEFUN([gl_TYPE_WINT_T_PREREQ], -+[ -+ AC_CHECK_HEADERS_ONCE([crtdefs.h]) -+ if test $ac_cv_header_crtdefs_h = yes; then -+ HAVE_CRTDEFS_H=1 -+ else -+ HAVE_CRTDEFS_H=0 - fi -+ AC_SUBST([HAVE_CRTDEFS_H]) - ]) -diff -durN inetutils-1.9.4.orig/m4/xalloc.m4 inetutils-1.9.4/m4/xalloc.m4 ---- inetutils-1.9.4.orig/m4/xalloc.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/xalloc.m4 2017-05-15 17:52:15.484375000 +0800 -@@ -1,5 +1,5 @@ - # xalloc.m4 serial 18 --dnl Copyright (C) 2002-2006, 2009-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2002-2006, 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/xgetcwd.m4 inetutils-1.9.4/m4/xgetcwd.m4 ---- inetutils-1.9.4.orig/m4/xgetcwd.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/xgetcwd.m4 2017-05-15 17:52:15.625000000 +0800 -@@ -1,5 +1,5 @@ - #serial 8 --dnl Copyright (C) 2002-2006, 2009-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2002-2006, 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/xsize.m4 inetutils-1.9.4/m4/xsize.m4 ---- inetutils-1.9.4.orig/m4/xsize.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/xsize.m4 2017-05-15 17:52:15.750000000 +0800 -@@ -1,5 +1,5 @@ - # xsize.m4 serial 5 --dnl Copyright (C) 2003-2004, 2008-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2003-2004, 2008-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/m4/xvasprintf.m4 inetutils-1.9.4/m4/xvasprintf.m4 ---- inetutils-1.9.4.orig/m4/xvasprintf.m4 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/m4/xvasprintf.m4 2017-05-15 17:52:15.921875000 +0800 -@@ -1,5 +1,5 @@ - # xvasprintf.m4 serial 2 --dnl Copyright (C) 2006, 2009-2015 Free Software Foundation, Inc. -+dnl Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc. - dnl This file is free software; the Free Software Foundation - dnl gives unlimited permission to copy and/or distribute it, - dnl with or without modifications, as long as this notice is preserved. -diff -durN inetutils-1.9.4.orig/maint.mk inetutils-1.9.4/maint.mk ---- inetutils-1.9.4.orig/maint.mk 2015-03-31 15:08:18.000000000 +0800 -+++ inetutils-1.9.4/maint.mk 2017-05-15 17:52:16.062500000 +0800 -@@ -2,7 +2,7 @@ - # This Makefile fragment tries to be general-purpose enough to be - # used by many projects via the gnulib maintainer-makefile module. - --## Copyright (C) 2001-2015 Free Software Foundation, Inc. -+## Copyright (C) 2001-2017 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 -@@ -55,6 +55,10 @@ - - VC_LIST = $(srcdir)/$(_build-aux)/vc-list-files -C $(srcdir) - -+# You can override this variable in cfg.mk if your gnulib submodule lives -+# in a different location. -+gnulib_dir ?= $(srcdir)/gnulib -+ - # You can override this variable in cfg.mk to set your own regexp - # matching files to ignore. - VC_LIST_ALWAYS_EXCLUDE_REGEX ?= ^$$ -@@ -437,17 +441,26 @@ - halt='the above files do not include ' \ - $(_sc_search_regexp) - -+# Print each file name for which the first #include does not match -+# $(config_h_header). Like grep -m 1, this only looks at the first match. -+perl_config_h_first_ = \ -+ -e 'BEGIN {$$ret = 0}' \ -+ -e 'if (/^\# *include\b/) {' \ -+ -e ' if (not m{^\# *include $(config_h_header)}) {' \ -+ -e ' print "$$ARGV\n";' \ -+ -e ' $$ret = 1;' \ -+ -e ' }' \ -+ -e ' \# Move on to next file after first include' \ -+ -e ' close ARGV;' \ -+ -e '}' \ -+ -e 'END {exit $$ret}' -+ - # You must include before including any other header file. - # This can possibly be via a package-specific header, if given by cfg.mk. - sc_require_config_h_first: - @if $(VC_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \ -- fail=0; \ -- for i in $$($(VC_LIST_EXCEPT) | grep '\.c$$'); do \ -- grep '^# *include\>' $$i | $(SED) 1q \ -- | grep -E '^# *include $(config_h_header)' > /dev/null \ -- || { echo $$i; fail=1; }; \ -- done; \ -- test $$fail = 1 && \ -+ files=$$($(VC_LIST_EXCEPT) | grep '\.c$$') && \ -+ perl -n $(perl_config_h_first_) $$files || \ - { echo '$(ME): the above files include some other header' \ - 'before ' 1>&2; exit 1; } || :; \ - else :; \ -@@ -648,18 +661,14 @@ - re='\<(strn?casecmp|ffs(ll)?)\>' \ - $(_sc_header_without_use) - --# Get the list of symbol names with this: --# perl -lne '/^# *define ([A-Z]\w+)\(/ and print $1' lib/intprops.h|fmt --_intprops_names = \ -- TYPE_IS_INTEGER TYPE_TWOS_COMPLEMENT TYPE_ONES_COMPLEMENT \ -- TYPE_SIGNED_MAGNITUDE TYPE_SIGNED TYPE_MINIMUM TYPE_MAXIMUM \ -- INT_BITS_STRLEN_BOUND INT_STRLEN_BOUND INT_BUFSIZE_BOUND \ -- INT_ADD_RANGE_OVERFLOW INT_SUBTRACT_RANGE_OVERFLOW \ -- INT_NEGATE_RANGE_OVERFLOW INT_MULTIPLY_RANGE_OVERFLOW \ -- INT_DIVIDE_RANGE_OVERFLOW INT_REMAINDER_RANGE_OVERFLOW \ -- INT_LEFT_SHIFT_RANGE_OVERFLOW INT_ADD_OVERFLOW INT_SUBTRACT_OVERFLOW \ -- INT_NEGATE_OVERFLOW INT_MULTIPLY_OVERFLOW INT_DIVIDE_OVERFLOW \ -- INT_REMAINDER_OVERFLOW INT_LEFT_SHIFT_OVERFLOW -+# Extract the raw list of symbol names with this: -+gl_extract_define_simple = \ -+ /^\# *define ([A-Z]\w+)\(/ and print $$1 -+# Filter out duplicates and convert to a space-separated list: -+_intprops_names = \ -+ $(shell f=$(gnulib_dir)/lib/intprops.h; \ -+ perl -lne '$(gl_extract_define_simple)' $$f | sort -u | tr '\n' ' ') -+# Remove trailing space and convert to a regular expression: - _intprops_syms_re = $(subst $(_sp),|,$(strip $(_intprops_names))) - # Prohibit the inclusion of intprops.h without an actual use. - sc_prohibit_intprops_without_use: -@@ -687,7 +696,7 @@ - # Prohibit the inclusion of verify.h without an actual use. - sc_prohibit_verify_without_use: - @h='verify.h' \ -- re='\<(verify(true|expr)?|static_assert) *\(' \ -+ re='\<(verify(true|expr)?|assume|static_assert) *\(' \ - $(_sc_header_without_use) - - # Don't include xfreopen.h unless you use one of its functions. -@@ -709,15 +718,6 @@ - $(_sc_search_regexp) - - # Ensure that each .c file containing a "main" function also --# calls set_program_name. --sc_program_name: -- @require='set_program_name *\(.*\);' \ -- in_vc_files='\.c$$' \ -- containing='\
$@-1; \ -- files=; \ -- for file in $$($(VC_LIST_EXCEPT)) $(generated_files); do \ -- test -r $$file || continue; \ -- case $$file in \ -- *.m4|*.mk) continue ;; \ -- *.?|*.??) ;; \ -- *) continue;; \ -- esac; \ -- case $$file in \ -- *.[ch]) \ -- base=`expr " $$file" : ' \(.*\)\..'`; \ -- { test -f $$base.l || test -f $$base.y; } && continue;; \ -- esac; \ -- files="$$files $$file"; \ -- done; \ -+ files=$$(perl $(perl_translatable_files_list_) \ -+ $$($(VC_LIST_EXCEPT)) $(generated_files)); \ - grep -E -l '$(_gl_translatable_string_re)' $$files \ - | $(SED) 's|^$(_dot_escaped_srcdir)/||' | sort -u > $@-2; \ - diff -u -L $(po_file) -L $(po_file) $@-1 $@-2 \ -@@ -1285,7 +1293,6 @@ - - rel-files = $(DIST_ARCHIVES) - --gnulib_dir ?= $(srcdir)/gnulib - gnulib-version = $$(cd $(gnulib_dir) \ - && { git describe || git rev-parse --short=10 HEAD; } ) - bootstrap-tools ?= autoconf,automake,gnulib -@@ -1495,7 +1502,10 @@ - --highlight --frames --legend \ - --title "$(PACKAGE_NAME)" - --coverage: init-coverage build-coverage gen-coverage -+coverage: -+ $(MAKE) init-coverage -+ $(MAKE) build-coverage -+ $(MAKE) gen-coverage - - # Some projects carry local adjustments for gnulib modules via patches in - # a gnulib patch directory whose default name is gl/ (defined in bootstrap -@@ -1600,7 +1610,7 @@ - # do not need to be marked. Symbols matching '__.*' are - # reserved by the compiler, so are automatically excluded below. - _gl_TS_unmarked_extern_functions ?= main usage --_gl_TS_function_match ?= /^(?:$(_gl_TS_extern)) +.*?(\S+) *\(/ -+_gl_TS_function_match ?= /^(?:$(_gl_TS_extern)) +.*?(\w+) *\(/ - - # If your project uses a macro like "XTERN", then put - # the following in cfg.mk to override this default: -@@ -1633,6 +1643,7 @@ - - .PHONY: _gl_tight_scope - _gl_tight_scope: $(bin_PROGRAMS) -+ sed_wrap='s/^/^_?/;s/$$/$$/'; \ - t=exceptions-$$$$; \ - trap 's=$$?; rm -f $$t; exit $$s' 0; \ - for sig in 1 2 3 13 15; do \ -@@ -1642,19 +1653,19 @@ - test -f $$f && d= || d=$(srcdir)/; echo $$d$$f; done`; \ - hdr=`for f in $(_gl_TS_headers); do \ - test -f $$f && d= || d=$(srcdir)/; echo $$d$$f; done`; \ -- ( printf '^%s$$\n' '__.*' $(_gl_TS_unmarked_extern_functions); \ -+ ( printf '%s\n' '__.*' $(_gl_TS_unmarked_extern_functions); \ - grep -h -A1 '^extern .*[^;]$$' $$src \ -- | grep -vE '^(extern |--)' | $(SED) 's/ .*//'; \ -+ | grep -vE '^(extern |--|#)' | $(SED) 's/ .*//; /^$$/d'; \ - perl -lne \ -- '$(_gl_TS_function_match) and print "^$$1\$$"' $$hdr; \ -- ) | sort -u > $$t; \ -+ '$(_gl_TS_function_match) and print $$1' $$hdr; \ -+ ) | sort -u | $(SED) "$$sed_wrap" > $$t; \ - nm -g $(_gl_TS_obj_files)|$(SED) -n 's/.* T //p'|grep -Ev -f $$t \ - && { echo the above functions should have static scope >&2; \ - exit 1; } || : ; \ -- ( printf '^%s$$\n' '__.*' $(_gl_TS_unmarked_extern_vars); \ -- perl -lne '$(_gl_TS_var_match) and print "^$$1\$$"' \ -+ ( printf '%s\n' '__.*' main $(_gl_TS_unmarked_extern_vars); \ -+ perl -lne '$(_gl_TS_var_match) and print $$1' \ - $$hdr $(_gl_TS_other_headers) \ -- ) | sort -u > $$t; \ -+ ) | sort -u | $(SED) "$$sed_wrap" > $$t; \ - nm -g $(_gl_TS_obj_files) | $(SED) -n 's/.* [BCDGRS] //p' \ - | sort -u | grep -Ev -f $$t \ - && { echo the above variables should have static scope >&2; \ -diff -durN inetutils-1.9.4.orig/Makefile.in inetutils-1.9.4/Makefile.in ---- inetutils-1.9.4.orig/Makefile.in 2015-06-09 15:48:08.000000000 +0800 -+++ inetutils-1.9.4/Makefile.in 2017-05-15 17:58:14.656250000 +0800 -@@ -108,10 +108,18 @@ - host_triplet = @host@ - subdir = . - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 --am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ -+am__aclocal_m4_deps = $(top_srcdir)/am/check_macro.m4 \ -+ $(top_srcdir)/am/check_member.m4 \ -+ $(top_srcdir)/am/check_weak_refs.m4 \ -+ $(top_srcdir)/am/config_paths.m4 $(top_srcdir)/am/enable.m4 \ -+ $(top_srcdir)/am/flushleft.m4 $(top_srcdir)/am/krb5.m4 \ -+ $(top_srcdir)/am/libcurses.m4 $(top_srcdir)/am/libidn.m4 \ -+ $(top_srcdir)/am/readline.m4 $(top_srcdir)/am/result.m4 \ -+ $(top_srcdir)/m4/00gnulib.m4 \ - $(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \ - $(top_srcdir)/m4/argp.m4 $(top_srcdir)/m4/arpa_inet_h.m4 \ - $(top_srcdir)/m4/autobuild.m4 $(top_srcdir)/m4/btowc.m4 \ -+ $(top_srcdir)/m4/builtin-expect.m4 \ - $(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/close.m4 \ - $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/codeset.m4 \ - $(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/d-ino.m4 \ -@@ -126,51 +134,56 @@ - $(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl.m4 \ - $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopendir.m4 \ - $(top_srcdir)/m4/filemode.m4 $(top_srcdir)/m4/filenamecat.m4 \ -- $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fnmatch.m4 \ -- $(top_srcdir)/m4/fopen.m4 $(top_srcdir)/m4/fseek.m4 \ -- $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/fstat.m4 \ -- $(top_srcdir)/m4/fstatat.m4 $(top_srcdir)/m4/ftell.m4 \ -- $(top_srcdir)/m4/ftello.m4 $(top_srcdir)/m4/getaddrinfo.m4 \ -+ $(top_srcdir)/m4/flexmember.m4 $(top_srcdir)/m4/float_h.m4 \ -+ $(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fopen.m4 \ -+ $(top_srcdir)/m4/fseek.m4 $(top_srcdir)/m4/fseeko.m4 \ -+ $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/fstatat.m4 \ -+ $(top_srcdir)/m4/ftell.m4 $(top_srcdir)/m4/ftello.m4 \ -+ $(top_srcdir)/m4/getaddrinfo.m4 \ - $(top_srcdir)/m4/getcwd-abort-bug.m4 \ - $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \ - $(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getdomainname.m4 \ - $(top_srcdir)/m4/getdtablesize.m4 \ - $(top_srcdir)/m4/getgroups.m4 $(top_srcdir)/m4/gethostname.m4 \ -- $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getlogin_r.m4 \ -- $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpass.m4 \ -+ $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getlogin.m4 \ -+ $(top_srcdir)/m4/getlogin_r.m4 $(top_srcdir)/m4/getopt.m4 \ -+ $(top_srcdir)/m4/getpass.m4 $(top_srcdir)/m4/getprogname.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettimeofday.m4 \ - $(top_srcdir)/m4/getugroups.m4 \ - $(top_srcdir)/m4/getusershell.m4 $(top_srcdir)/m4/glibc21.m4 \ - $(top_srcdir)/m4/glob.m4 $(top_srcdir)/m4/gnulib-common.m4 \ -- $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/hostent.m4 \ -+ $(top_srcdir)/m4/gnulib-comp.m4 \ -+ $(top_srcdir)/m4/hard-locale.m4 $(top_srcdir)/m4/hostent.m4 \ - $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inet_ntop.m4 \ - $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttostr.m4 \ - $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/ioctl.m4 \ - $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ -- $(top_srcdir)/m4/lib-prefix.m4 \ -+ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/limits-h.m4 \ - $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \ - $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \ - $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localeconv.m4 \ -- $(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/longlong.m4 \ -- $(top_srcdir)/m4/lseek.m4 $(top_srcdir)/m4/lstat.m4 \ -- $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \ -- $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \ -- $(top_srcdir)/m4/mbsrtowcs.m4 $(top_srcdir)/m4/mbstate_t.m4 \ -- $(top_srcdir)/m4/mbtowc.m4 $(top_srcdir)/m4/memchr.m4 \ -- $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/memrchr.m4 \ -- $(top_srcdir)/m4/mgetgroups.m4 $(top_srcdir)/m4/minmax.m4 \ -- $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mmap-anon.m4 \ -- $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \ -+ $(top_srcdir)/m4/localtime-buffer.m4 $(top_srcdir)/m4/lock.m4 \ -+ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \ -+ $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/malloc.m4 \ -+ $(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/mbrtowc.m4 \ -+ $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbsrtowcs.m4 \ -+ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ -+ $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mempcpy.m4 \ -+ $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/mgetgroups.m4 \ -+ $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkstemp.m4 \ -+ $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/mode_t.m4 \ -+ $(top_srcdir)/m4/msvc-inval.m4 \ - $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \ - $(top_srcdir)/m4/netdb_h.m4 $(top_srcdir)/m4/netinet_in_h.m4 \ - $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nocrash.m4 \ - $(top_srcdir)/m4/obstack.m4 $(top_srcdir)/m4/off_t.m4 \ -- $(top_srcdir)/m4/onceonly.m4 $(top_srcdir)/m4/open.m4 \ -- $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/opendir.m4 \ -- $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \ -- $(top_srcdir)/m4/poll.m4 $(top_srcdir)/m4/poll_h.m4 \ -- $(top_srcdir)/m4/posix_openpt.m4 $(top_srcdir)/m4/printf.m4 \ -+ $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/openat.m4 \ -+ $(top_srcdir)/m4/opendir.m4 $(top_srcdir)/m4/pathmax.m4 \ -+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/poll.m4 \ -+ $(top_srcdir)/m4/poll_h.m4 $(top_srcdir)/m4/posix_openpt.m4 \ -+ $(top_srcdir)/m4/printf.m4 \ -+ $(top_srcdir)/m4/pthread_rwlock_rdlock.m4 \ - $(top_srcdir)/m4/pty.m4 $(top_srcdir)/m4/pty_h.m4 \ - $(top_srcdir)/m4/rawmemchr.m4 $(top_srcdir)/m4/read-file.m4 \ - $(top_srcdir)/m4/readdir.m4 $(top_srcdir)/m4/readutmp.m4 \ -@@ -207,14 +220,7 @@ - $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctype_h.m4 \ - $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \ - $(top_srcdir)/m4/xgetcwd.m4 $(top_srcdir)/m4/xsize.m4 \ -- $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/am/check_macro.m4 \ -- $(top_srcdir)/am/check_member.m4 \ -- $(top_srcdir)/am/check_weak_refs.m4 \ -- $(top_srcdir)/am/config_paths.m4 $(top_srcdir)/am/enable.m4 \ -- $(top_srcdir)/am/flushleft.m4 $(top_srcdir)/am/krb5.m4 \ -- $(top_srcdir)/am/libcurses.m4 $(top_srcdir)/am/libidn.m4 \ -- $(top_srcdir)/am/readline.m4 $(top_srcdir)/am/result.m4 \ -- $(top_srcdir)/configure.ac -+ $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/configure.ac - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) - DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ -@@ -292,9 +298,8 @@ - $(top_srcdir)/build-aux/missing AUTHORS COPYING ChangeLog \ - INSTALL NEWS README THANKS TODO build-aux/ar-lib \ - build-aux/compile build-aux/config.guess \ -- build-aux/config.rpath build-aux/config.sub build-aux/depcomp \ -- build-aux/install-sh build-aux/mdate-sh build-aux/missing \ -- build-aux/texinfo.tex build-aux/ylwrap -+ build-aux/config.rpath build-aux/config.sub \ -+ build-aux/install-sh build-aux/missing - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - distdir = $(PACKAGE)-$(VERSION) - top_distdir = $(distdir) -@@ -382,6 +387,7 @@ - FTPD_LIBPAM = @FTPD_LIBPAM@ - GETADDRINFO_LIB = @GETADDRINFO_LIB@ - GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ -+GETOPT_CDEFS_H = @GETOPT_CDEFS_H@ - GETOPT_H = @GETOPT_H@ - GLIBC21 = @GLIBC21@ - GLOB_H = @GLOB_H@ -@@ -398,6 +404,7 @@ - GNULIB_CLOSE = @GNULIB_CLOSE@ - GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ - GNULIB_CONNECT = @GNULIB_CONNECT@ -+GNULIB_CTIME = @GNULIB_CTIME@ - GNULIB_DIRFD = @GNULIB_DIRFD@ - GNULIB_DPRINTF = @GNULIB_DPRINTF@ - GNULIB_DUP = @GNULIB_DUP@ -@@ -476,6 +483,7 @@ - GNULIB_LINKAT = @GNULIB_LINKAT@ - GNULIB_LISTEN = @GNULIB_LISTEN@ - GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ -+GNULIB_LOCALTIME = @GNULIB_LOCALTIME@ - GNULIB_LSEEK = @GNULIB_LSEEK@ - GNULIB_LSTAT = @GNULIB_LSTAT@ - GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ -@@ -523,6 +531,8 @@ - GNULIB_OPENAT = @GNULIB_OPENAT@ - GNULIB_OPENDIR = @GNULIB_OPENDIR@ - GNULIB_OPENPTY = @GNULIB_OPENPTY@ -+GNULIB_OVERRIDES_STRUCT_STAT = @GNULIB_OVERRIDES_STRUCT_STAT@ -+GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@ - GNULIB_PCLOSE = @GNULIB_PCLOSE@ - GNULIB_PERROR = @GNULIB_PERROR@ - GNULIB_PIPE = @GNULIB_PIPE@ -@@ -589,6 +599,7 @@ - GNULIB_STRDUP = @GNULIB_STRDUP@ - GNULIB_STRERROR = @GNULIB_STRERROR@ - GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ -+GNULIB_STRFTIME = @GNULIB_STRFTIME@ - GNULIB_STRNCAT = @GNULIB_STRNCAT@ - GNULIB_STRNDUP = @GNULIB_STRNDUP@ - GNULIB_STRNLEN = @GNULIB_STRNLEN@ -@@ -608,9 +619,12 @@ - GNULIB_TCGETSID = @GNULIB_TCGETSID@ - GNULIB_TIMEGM = @GNULIB_TIMEGM@ - GNULIB_TIME_R = @GNULIB_TIME_R@ -+GNULIB_TIME_RZ = @GNULIB_TIME_RZ@ - GNULIB_TMPFILE = @GNULIB_TMPFILE@ - GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ -+GNULIB_TRUNCATE = @GNULIB_TRUNCATE@ - GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -+GNULIB_TZSET = @GNULIB_TZSET@ - GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ - GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ - GNULIB_UNLINK = @GNULIB_UNLINK@ -@@ -640,6 +654,7 @@ - GNULIB_WCSCPY = @GNULIB_WCSCPY@ - GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ - GNULIB_WCSDUP = @GNULIB_WCSDUP@ -+GNULIB_WCSFTIME = @GNULIB_WCSFTIME@ - GNULIB_WCSLEN = @GNULIB_WCSLEN@ - GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ - GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ -@@ -673,9 +688,11 @@ - HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ - HAVE_ATOLL = @HAVE_ATOLL@ - HAVE_BTOWC = @HAVE_BTOWC@ -+HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@ - HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ - HAVE_CHOWN = @HAVE_CHOWN@ - HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ -+HAVE_CRTDEFS_H = @HAVE_CRTDEFS_H@ - HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ - HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ - HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ -@@ -691,6 +708,7 @@ - HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ - HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ - HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ -+HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@ - HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ - HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ - HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ -@@ -809,6 +827,7 @@ - HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ - HAVE_PTY_H = @HAVE_PTY_H@ - HAVE_PWRITE = @HAVE_PWRITE@ -+HAVE_QSORT_R = @HAVE_QSORT_R@ - HAVE_RAISE = @HAVE_RAISE@ - HAVE_RANDOM = @HAVE_RANDOM@ - HAVE_RANDOM_H = @HAVE_RANDOM_H@ -@@ -870,7 +889,10 @@ - HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@ - HAVE_TERMIOS_H = @HAVE_TERMIOS_H@ - HAVE_TIMEGM = @HAVE_TIMEGM@ -+HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@ -+HAVE_TRUNCATE = @HAVE_TRUNCATE@ - HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ -+HAVE_TZSET = @HAVE_TZSET@ - HAVE_UNISTD_H = @HAVE_UNISTD_H@ - HAVE_UNLINKAT = @HAVE_UNLINKAT@ - HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ -@@ -893,6 +915,7 @@ - HAVE_WCSCPY = @HAVE_WCSCPY@ - HAVE_WCSCSPN = @HAVE_WCSCSPN@ - HAVE_WCSDUP = @HAVE_WCSDUP@ -+HAVE_WCSFTIME = @HAVE_WCSFTIME@ - HAVE_WCSLEN = @HAVE_WCSLEN@ - HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ - HAVE_WCSNCAT = @HAVE_WCSNCAT@ -@@ -960,8 +983,10 @@ - LIBTHREAD = @LIBTHREAD@ - LIBUTIL = @LIBUTIL@ - LIBWRAP = @LIBWRAP@ -+LIB_GETLOGIN = @LIB_GETLOGIN@ - LIB_POLL = @LIB_POLL@ - LIB_SELECT = @LIB_SELECT@ -+LIMITS_H = @LIMITS_H@ - LN_S = @LN_S@ - LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ - LOCALE_FR = @LOCALE_FR@ -@@ -988,6 +1013,7 @@ - NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ - NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ - NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ -+NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@ - NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ - NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ - NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ -@@ -1020,6 +1046,7 @@ - NEXT_FLOAT_H = @NEXT_FLOAT_H@ - NEXT_GETOPT_H = @NEXT_GETOPT_H@ - NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ -+NEXT_LIMITS_H = @NEXT_LIMITS_H@ - NEXT_LOCALE_H = @NEXT_LOCALE_H@ - NEXT_NETDB_H = @NEXT_NETDB_H@ - NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ -@@ -1067,6 +1094,7 @@ - REPLACE_CHOWN = @REPLACE_CHOWN@ - REPLACE_CLOSE = @REPLACE_CLOSE@ - REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ -+REPLACE_CTIME = @REPLACE_CTIME@ - REPLACE_DIRFD = @REPLACE_DIRFD@ - REPLACE_DPRINTF = @REPLACE_DPRINTF@ - REPLACE_DUP = @REPLACE_DUP@ -@@ -1178,6 +1206,7 @@ - REPLACE_STRDUP = @REPLACE_STRDUP@ - REPLACE_STRERROR = @REPLACE_STRERROR@ - REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ -+REPLACE_STRFTIME = @REPLACE_STRFTIME@ - REPLACE_STRNCAT = @REPLACE_STRNCAT@ - REPLACE_STRNDUP = @REPLACE_STRNDUP@ - REPLACE_STRNLEN = @REPLACE_STRNLEN@ -@@ -1192,7 +1221,9 @@ - REPLACE_TIMEGM = @REPLACE_TIMEGM@ - REPLACE_TMPFILE = @REPLACE_TMPFILE@ - REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ -+REPLACE_TRUNCATE = @REPLACE_TRUNCATE@ - REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ -+REPLACE_TZSET = @REPLACE_TZSET@ - REPLACE_UNLINK = @REPLACE_UNLINK@ - REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ - REPLACE_UNSETENV = @REPLACE_UNSETENV@ -@@ -1205,6 +1236,7 @@ - REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ - REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ - REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ -+REPLACE_WCSFTIME = @REPLACE_WCSFTIME@ - REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ - REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ - REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ -@@ -1241,6 +1273,8 @@ - WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ - WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ - WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ -+WINDOWS_STAT_INODES = @WINDOWS_STAT_INODES@ -+WINDOWS_STAT_TIMESPEC = @WINDOWS_STAT_TIMESPEC@ - WINT_T_SUFFIX = @WINT_T_SUFFIX@ - YACC = @YACC@ - YFLAGS = @YFLAGS@ -diff -durN inetutils-1.9.4.orig/man/Makefile.in inetutils-1.9.4/man/Makefile.in ---- inetutils-1.9.4.orig/man/Makefile.in 2015-06-09 15:48:10.000000000 +0800 -+++ inetutils-1.9.4/man/Makefile.in 2017-05-15 17:58:17.781250000 +0800 -@@ -133,10 +133,18 @@ - @ENABLE_whois_TRUE@am__append_26 = whois.1 - subdir = man - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 --am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ -+am__aclocal_m4_deps = $(top_srcdir)/am/check_macro.m4 \ -+ $(top_srcdir)/am/check_member.m4 \ -+ $(top_srcdir)/am/check_weak_refs.m4 \ -+ $(top_srcdir)/am/config_paths.m4 $(top_srcdir)/am/enable.m4 \ -+ $(top_srcdir)/am/flushleft.m4 $(top_srcdir)/am/krb5.m4 \ -+ $(top_srcdir)/am/libcurses.m4 $(top_srcdir)/am/libidn.m4 \ -+ $(top_srcdir)/am/readline.m4 $(top_srcdir)/am/result.m4 \ -+ $(top_srcdir)/m4/00gnulib.m4 \ - $(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \ - $(top_srcdir)/m4/argp.m4 $(top_srcdir)/m4/arpa_inet_h.m4 \ - $(top_srcdir)/m4/autobuild.m4 $(top_srcdir)/m4/btowc.m4 \ -+ $(top_srcdir)/m4/builtin-expect.m4 \ - $(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/close.m4 \ - $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/codeset.m4 \ - $(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/d-ino.m4 \ -@@ -151,51 +159,56 @@ - $(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl.m4 \ - $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopendir.m4 \ - $(top_srcdir)/m4/filemode.m4 $(top_srcdir)/m4/filenamecat.m4 \ -- $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fnmatch.m4 \ -- $(top_srcdir)/m4/fopen.m4 $(top_srcdir)/m4/fseek.m4 \ -- $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/fstat.m4 \ -- $(top_srcdir)/m4/fstatat.m4 $(top_srcdir)/m4/ftell.m4 \ -- $(top_srcdir)/m4/ftello.m4 $(top_srcdir)/m4/getaddrinfo.m4 \ -+ $(top_srcdir)/m4/flexmember.m4 $(top_srcdir)/m4/float_h.m4 \ -+ $(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fopen.m4 \ -+ $(top_srcdir)/m4/fseek.m4 $(top_srcdir)/m4/fseeko.m4 \ -+ $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/fstatat.m4 \ -+ $(top_srcdir)/m4/ftell.m4 $(top_srcdir)/m4/ftello.m4 \ -+ $(top_srcdir)/m4/getaddrinfo.m4 \ - $(top_srcdir)/m4/getcwd-abort-bug.m4 \ - $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \ - $(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getdomainname.m4 \ - $(top_srcdir)/m4/getdtablesize.m4 \ - $(top_srcdir)/m4/getgroups.m4 $(top_srcdir)/m4/gethostname.m4 \ -- $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getlogin_r.m4 \ -- $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpass.m4 \ -+ $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getlogin.m4 \ -+ $(top_srcdir)/m4/getlogin_r.m4 $(top_srcdir)/m4/getopt.m4 \ -+ $(top_srcdir)/m4/getpass.m4 $(top_srcdir)/m4/getprogname.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettimeofday.m4 \ - $(top_srcdir)/m4/getugroups.m4 \ - $(top_srcdir)/m4/getusershell.m4 $(top_srcdir)/m4/glibc21.m4 \ - $(top_srcdir)/m4/glob.m4 $(top_srcdir)/m4/gnulib-common.m4 \ -- $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/hostent.m4 \ -+ $(top_srcdir)/m4/gnulib-comp.m4 \ -+ $(top_srcdir)/m4/hard-locale.m4 $(top_srcdir)/m4/hostent.m4 \ - $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inet_ntop.m4 \ - $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttostr.m4 \ - $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/ioctl.m4 \ - $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ -- $(top_srcdir)/m4/lib-prefix.m4 \ -+ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/limits-h.m4 \ - $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \ - $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \ - $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localeconv.m4 \ -- $(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/longlong.m4 \ -- $(top_srcdir)/m4/lseek.m4 $(top_srcdir)/m4/lstat.m4 \ -- $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \ -- $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \ -- $(top_srcdir)/m4/mbsrtowcs.m4 $(top_srcdir)/m4/mbstate_t.m4 \ -- $(top_srcdir)/m4/mbtowc.m4 $(top_srcdir)/m4/memchr.m4 \ -- $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/memrchr.m4 \ -- $(top_srcdir)/m4/mgetgroups.m4 $(top_srcdir)/m4/minmax.m4 \ -- $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mmap-anon.m4 \ -- $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \ -+ $(top_srcdir)/m4/localtime-buffer.m4 $(top_srcdir)/m4/lock.m4 \ -+ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \ -+ $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/malloc.m4 \ -+ $(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/mbrtowc.m4 \ -+ $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbsrtowcs.m4 \ -+ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ -+ $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mempcpy.m4 \ -+ $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/mgetgroups.m4 \ -+ $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkstemp.m4 \ -+ $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/mode_t.m4 \ -+ $(top_srcdir)/m4/msvc-inval.m4 \ - $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \ - $(top_srcdir)/m4/netdb_h.m4 $(top_srcdir)/m4/netinet_in_h.m4 \ - $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nocrash.m4 \ - $(top_srcdir)/m4/obstack.m4 $(top_srcdir)/m4/off_t.m4 \ -- $(top_srcdir)/m4/onceonly.m4 $(top_srcdir)/m4/open.m4 \ -- $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/opendir.m4 \ -- $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \ -- $(top_srcdir)/m4/poll.m4 $(top_srcdir)/m4/poll_h.m4 \ -- $(top_srcdir)/m4/posix_openpt.m4 $(top_srcdir)/m4/printf.m4 \ -+ $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/openat.m4 \ -+ $(top_srcdir)/m4/opendir.m4 $(top_srcdir)/m4/pathmax.m4 \ -+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/poll.m4 \ -+ $(top_srcdir)/m4/poll_h.m4 $(top_srcdir)/m4/posix_openpt.m4 \ -+ $(top_srcdir)/m4/printf.m4 \ -+ $(top_srcdir)/m4/pthread_rwlock_rdlock.m4 \ - $(top_srcdir)/m4/pty.m4 $(top_srcdir)/m4/pty_h.m4 \ - $(top_srcdir)/m4/rawmemchr.m4 $(top_srcdir)/m4/read-file.m4 \ - $(top_srcdir)/m4/readdir.m4 $(top_srcdir)/m4/readutmp.m4 \ -@@ -232,14 +245,7 @@ - $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctype_h.m4 \ - $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \ - $(top_srcdir)/m4/xgetcwd.m4 $(top_srcdir)/m4/xsize.m4 \ -- $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/am/check_macro.m4 \ -- $(top_srcdir)/am/check_member.m4 \ -- $(top_srcdir)/am/check_weak_refs.m4 \ -- $(top_srcdir)/am/config_paths.m4 $(top_srcdir)/am/enable.m4 \ -- $(top_srcdir)/am/flushleft.m4 $(top_srcdir)/am/krb5.m4 \ -- $(top_srcdir)/am/libcurses.m4 $(top_srcdir)/am/libidn.m4 \ -- $(top_srcdir)/am/readline.m4 $(top_srcdir)/am/result.m4 \ -- $(top_srcdir)/configure.ac -+ $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/configure.ac - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) - DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -@@ -346,6 +352,7 @@ - FTPD_LIBPAM = @FTPD_LIBPAM@ - GETADDRINFO_LIB = @GETADDRINFO_LIB@ - GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ -+GETOPT_CDEFS_H = @GETOPT_CDEFS_H@ - GETOPT_H = @GETOPT_H@ - GLIBC21 = @GLIBC21@ - GLOB_H = @GLOB_H@ -@@ -362,6 +369,7 @@ - GNULIB_CLOSE = @GNULIB_CLOSE@ - GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ - GNULIB_CONNECT = @GNULIB_CONNECT@ -+GNULIB_CTIME = @GNULIB_CTIME@ - GNULIB_DIRFD = @GNULIB_DIRFD@ - GNULIB_DPRINTF = @GNULIB_DPRINTF@ - GNULIB_DUP = @GNULIB_DUP@ -@@ -440,6 +448,7 @@ - GNULIB_LINKAT = @GNULIB_LINKAT@ - GNULIB_LISTEN = @GNULIB_LISTEN@ - GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ -+GNULIB_LOCALTIME = @GNULIB_LOCALTIME@ - GNULIB_LSEEK = @GNULIB_LSEEK@ - GNULIB_LSTAT = @GNULIB_LSTAT@ - GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ -@@ -487,6 +496,8 @@ - GNULIB_OPENAT = @GNULIB_OPENAT@ - GNULIB_OPENDIR = @GNULIB_OPENDIR@ - GNULIB_OPENPTY = @GNULIB_OPENPTY@ -+GNULIB_OVERRIDES_STRUCT_STAT = @GNULIB_OVERRIDES_STRUCT_STAT@ -+GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@ - GNULIB_PCLOSE = @GNULIB_PCLOSE@ - GNULIB_PERROR = @GNULIB_PERROR@ - GNULIB_PIPE = @GNULIB_PIPE@ -@@ -553,6 +564,7 @@ - GNULIB_STRDUP = @GNULIB_STRDUP@ - GNULIB_STRERROR = @GNULIB_STRERROR@ - GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ -+GNULIB_STRFTIME = @GNULIB_STRFTIME@ - GNULIB_STRNCAT = @GNULIB_STRNCAT@ - GNULIB_STRNDUP = @GNULIB_STRNDUP@ - GNULIB_STRNLEN = @GNULIB_STRNLEN@ -@@ -572,9 +584,12 @@ - GNULIB_TCGETSID = @GNULIB_TCGETSID@ - GNULIB_TIMEGM = @GNULIB_TIMEGM@ - GNULIB_TIME_R = @GNULIB_TIME_R@ -+GNULIB_TIME_RZ = @GNULIB_TIME_RZ@ - GNULIB_TMPFILE = @GNULIB_TMPFILE@ - GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ -+GNULIB_TRUNCATE = @GNULIB_TRUNCATE@ - GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -+GNULIB_TZSET = @GNULIB_TZSET@ - GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ - GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ - GNULIB_UNLINK = @GNULIB_UNLINK@ -@@ -604,6 +619,7 @@ - GNULIB_WCSCPY = @GNULIB_WCSCPY@ - GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ - GNULIB_WCSDUP = @GNULIB_WCSDUP@ -+GNULIB_WCSFTIME = @GNULIB_WCSFTIME@ - GNULIB_WCSLEN = @GNULIB_WCSLEN@ - GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ - GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ -@@ -637,9 +653,11 @@ - HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ - HAVE_ATOLL = @HAVE_ATOLL@ - HAVE_BTOWC = @HAVE_BTOWC@ -+HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@ - HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ - HAVE_CHOWN = @HAVE_CHOWN@ - HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ -+HAVE_CRTDEFS_H = @HAVE_CRTDEFS_H@ - HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ - HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ - HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ -@@ -655,6 +673,7 @@ - HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ - HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ - HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ -+HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@ - HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ - HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ - HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ -@@ -773,6 +792,7 @@ - HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ - HAVE_PTY_H = @HAVE_PTY_H@ - HAVE_PWRITE = @HAVE_PWRITE@ -+HAVE_QSORT_R = @HAVE_QSORT_R@ - HAVE_RAISE = @HAVE_RAISE@ - HAVE_RANDOM = @HAVE_RANDOM@ - HAVE_RANDOM_H = @HAVE_RANDOM_H@ -@@ -834,7 +854,10 @@ - HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@ - HAVE_TERMIOS_H = @HAVE_TERMIOS_H@ - HAVE_TIMEGM = @HAVE_TIMEGM@ -+HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@ -+HAVE_TRUNCATE = @HAVE_TRUNCATE@ - HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ -+HAVE_TZSET = @HAVE_TZSET@ - HAVE_UNISTD_H = @HAVE_UNISTD_H@ - HAVE_UNLINKAT = @HAVE_UNLINKAT@ - HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ -@@ -857,6 +880,7 @@ - HAVE_WCSCPY = @HAVE_WCSCPY@ - HAVE_WCSCSPN = @HAVE_WCSCSPN@ - HAVE_WCSDUP = @HAVE_WCSDUP@ -+HAVE_WCSFTIME = @HAVE_WCSFTIME@ - HAVE_WCSLEN = @HAVE_WCSLEN@ - HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ - HAVE_WCSNCAT = @HAVE_WCSNCAT@ -@@ -924,8 +948,10 @@ - LIBTHREAD = @LIBTHREAD@ - LIBUTIL = @LIBUTIL@ - LIBWRAP = @LIBWRAP@ -+LIB_GETLOGIN = @LIB_GETLOGIN@ - LIB_POLL = @LIB_POLL@ - LIB_SELECT = @LIB_SELECT@ -+LIMITS_H = @LIMITS_H@ - LN_S = @LN_S@ - LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ - LOCALE_FR = @LOCALE_FR@ -@@ -952,6 +978,7 @@ - NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ - NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ - NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ -+NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@ - NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ - NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ - NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ -@@ -984,6 +1011,7 @@ - NEXT_FLOAT_H = @NEXT_FLOAT_H@ - NEXT_GETOPT_H = @NEXT_GETOPT_H@ - NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ -+NEXT_LIMITS_H = @NEXT_LIMITS_H@ - NEXT_LOCALE_H = @NEXT_LOCALE_H@ - NEXT_NETDB_H = @NEXT_NETDB_H@ - NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ -@@ -1031,6 +1059,7 @@ - REPLACE_CHOWN = @REPLACE_CHOWN@ - REPLACE_CLOSE = @REPLACE_CLOSE@ - REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ -+REPLACE_CTIME = @REPLACE_CTIME@ - REPLACE_DIRFD = @REPLACE_DIRFD@ - REPLACE_DPRINTF = @REPLACE_DPRINTF@ - REPLACE_DUP = @REPLACE_DUP@ -@@ -1142,6 +1171,7 @@ - REPLACE_STRDUP = @REPLACE_STRDUP@ - REPLACE_STRERROR = @REPLACE_STRERROR@ - REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ -+REPLACE_STRFTIME = @REPLACE_STRFTIME@ - REPLACE_STRNCAT = @REPLACE_STRNCAT@ - REPLACE_STRNDUP = @REPLACE_STRNDUP@ - REPLACE_STRNLEN = @REPLACE_STRNLEN@ -@@ -1156,7 +1186,9 @@ - REPLACE_TIMEGM = @REPLACE_TIMEGM@ - REPLACE_TMPFILE = @REPLACE_TMPFILE@ - REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ -+REPLACE_TRUNCATE = @REPLACE_TRUNCATE@ - REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ -+REPLACE_TZSET = @REPLACE_TZSET@ - REPLACE_UNLINK = @REPLACE_UNLINK@ - REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ - REPLACE_UNSETENV = @REPLACE_UNSETENV@ -@@ -1169,6 +1201,7 @@ - REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ - REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ - REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ -+REPLACE_WCSFTIME = @REPLACE_WCSFTIME@ - REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ - REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ - REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ -@@ -1205,6 +1238,8 @@ - WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ - WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ - WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ -+WINDOWS_STAT_INODES = @WINDOWS_STAT_INODES@ -+WINDOWS_STAT_TIMESPEC = @WINDOWS_STAT_TIMESPEC@ - WINT_T_SUFFIX = @WINT_T_SUFFIX@ - YACC = @YACC@ - YFLAGS = @YFLAGS@ -@@ -1754,7 +1789,7 @@ - --include=$(srcdir)/$(TOOL).h2m \ - --output=$(TOOL).$(SECTION) \ - --section $(SECTION) \ -- $(mapped_name) -+ $(mapped_name)$(EXEEXT) - - # 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 -durN inetutils-1.9.4.orig/ping/Makefile.in inetutils-1.9.4/ping/Makefile.in ---- inetutils-1.9.4.orig/ping/Makefile.in 2015-06-09 15:48:10.000000000 +0800 -+++ inetutils-1.9.4/ping/Makefile.in 2017-05-15 17:58:18.046875000 +0800 -@@ -110,10 +110,18 @@ - EXTRA_PROGRAMS = ping$(EXEEXT) ping6$(EXEEXT) - subdir = ping - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 --am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ -+am__aclocal_m4_deps = $(top_srcdir)/am/check_macro.m4 \ -+ $(top_srcdir)/am/check_member.m4 \ -+ $(top_srcdir)/am/check_weak_refs.m4 \ -+ $(top_srcdir)/am/config_paths.m4 $(top_srcdir)/am/enable.m4 \ -+ $(top_srcdir)/am/flushleft.m4 $(top_srcdir)/am/krb5.m4 \ -+ $(top_srcdir)/am/libcurses.m4 $(top_srcdir)/am/libidn.m4 \ -+ $(top_srcdir)/am/readline.m4 $(top_srcdir)/am/result.m4 \ -+ $(top_srcdir)/m4/00gnulib.m4 \ - $(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \ - $(top_srcdir)/m4/argp.m4 $(top_srcdir)/m4/arpa_inet_h.m4 \ - $(top_srcdir)/m4/autobuild.m4 $(top_srcdir)/m4/btowc.m4 \ -+ $(top_srcdir)/m4/builtin-expect.m4 \ - $(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/close.m4 \ - $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/codeset.m4 \ - $(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/d-ino.m4 \ -@@ -128,51 +136,56 @@ - $(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl.m4 \ - $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopendir.m4 \ - $(top_srcdir)/m4/filemode.m4 $(top_srcdir)/m4/filenamecat.m4 \ -- $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fnmatch.m4 \ -- $(top_srcdir)/m4/fopen.m4 $(top_srcdir)/m4/fseek.m4 \ -- $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/fstat.m4 \ -- $(top_srcdir)/m4/fstatat.m4 $(top_srcdir)/m4/ftell.m4 \ -- $(top_srcdir)/m4/ftello.m4 $(top_srcdir)/m4/getaddrinfo.m4 \ -+ $(top_srcdir)/m4/flexmember.m4 $(top_srcdir)/m4/float_h.m4 \ -+ $(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fopen.m4 \ -+ $(top_srcdir)/m4/fseek.m4 $(top_srcdir)/m4/fseeko.m4 \ -+ $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/fstatat.m4 \ -+ $(top_srcdir)/m4/ftell.m4 $(top_srcdir)/m4/ftello.m4 \ -+ $(top_srcdir)/m4/getaddrinfo.m4 \ - $(top_srcdir)/m4/getcwd-abort-bug.m4 \ - $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \ - $(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getdomainname.m4 \ - $(top_srcdir)/m4/getdtablesize.m4 \ - $(top_srcdir)/m4/getgroups.m4 $(top_srcdir)/m4/gethostname.m4 \ -- $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getlogin_r.m4 \ -- $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpass.m4 \ -+ $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getlogin.m4 \ -+ $(top_srcdir)/m4/getlogin_r.m4 $(top_srcdir)/m4/getopt.m4 \ -+ $(top_srcdir)/m4/getpass.m4 $(top_srcdir)/m4/getprogname.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettimeofday.m4 \ - $(top_srcdir)/m4/getugroups.m4 \ - $(top_srcdir)/m4/getusershell.m4 $(top_srcdir)/m4/glibc21.m4 \ - $(top_srcdir)/m4/glob.m4 $(top_srcdir)/m4/gnulib-common.m4 \ -- $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/hostent.m4 \ -+ $(top_srcdir)/m4/gnulib-comp.m4 \ -+ $(top_srcdir)/m4/hard-locale.m4 $(top_srcdir)/m4/hostent.m4 \ - $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inet_ntop.m4 \ - $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttostr.m4 \ - $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/ioctl.m4 \ - $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ -- $(top_srcdir)/m4/lib-prefix.m4 \ -+ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/limits-h.m4 \ - $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \ - $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \ - $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localeconv.m4 \ -- $(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/longlong.m4 \ -- $(top_srcdir)/m4/lseek.m4 $(top_srcdir)/m4/lstat.m4 \ -- $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \ -- $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \ -- $(top_srcdir)/m4/mbsrtowcs.m4 $(top_srcdir)/m4/mbstate_t.m4 \ -- $(top_srcdir)/m4/mbtowc.m4 $(top_srcdir)/m4/memchr.m4 \ -- $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/memrchr.m4 \ -- $(top_srcdir)/m4/mgetgroups.m4 $(top_srcdir)/m4/minmax.m4 \ -- $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mmap-anon.m4 \ -- $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \ -+ $(top_srcdir)/m4/localtime-buffer.m4 $(top_srcdir)/m4/lock.m4 \ -+ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \ -+ $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/malloc.m4 \ -+ $(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/mbrtowc.m4 \ -+ $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbsrtowcs.m4 \ -+ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ -+ $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mempcpy.m4 \ -+ $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/mgetgroups.m4 \ -+ $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkstemp.m4 \ -+ $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/mode_t.m4 \ -+ $(top_srcdir)/m4/msvc-inval.m4 \ - $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \ - $(top_srcdir)/m4/netdb_h.m4 $(top_srcdir)/m4/netinet_in_h.m4 \ - $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nocrash.m4 \ - $(top_srcdir)/m4/obstack.m4 $(top_srcdir)/m4/off_t.m4 \ -- $(top_srcdir)/m4/onceonly.m4 $(top_srcdir)/m4/open.m4 \ -- $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/opendir.m4 \ -- $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \ -- $(top_srcdir)/m4/poll.m4 $(top_srcdir)/m4/poll_h.m4 \ -- $(top_srcdir)/m4/posix_openpt.m4 $(top_srcdir)/m4/printf.m4 \ -+ $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/openat.m4 \ -+ $(top_srcdir)/m4/opendir.m4 $(top_srcdir)/m4/pathmax.m4 \ -+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/poll.m4 \ -+ $(top_srcdir)/m4/poll_h.m4 $(top_srcdir)/m4/posix_openpt.m4 \ -+ $(top_srcdir)/m4/printf.m4 \ -+ $(top_srcdir)/m4/pthread_rwlock_rdlock.m4 \ - $(top_srcdir)/m4/pty.m4 $(top_srcdir)/m4/pty_h.m4 \ - $(top_srcdir)/m4/rawmemchr.m4 $(top_srcdir)/m4/read-file.m4 \ - $(top_srcdir)/m4/readdir.m4 $(top_srcdir)/m4/readutmp.m4 \ -@@ -209,14 +222,7 @@ - $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctype_h.m4 \ - $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \ - $(top_srcdir)/m4/xgetcwd.m4 $(top_srcdir)/m4/xsize.m4 \ -- $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/am/check_macro.m4 \ -- $(top_srcdir)/am/check_member.m4 \ -- $(top_srcdir)/am/check_weak_refs.m4 \ -- $(top_srcdir)/am/config_paths.m4 $(top_srcdir)/am/enable.m4 \ -- $(top_srcdir)/am/flushleft.m4 $(top_srcdir)/am/krb5.m4 \ -- $(top_srcdir)/am/libcurses.m4 $(top_srcdir)/am/libidn.m4 \ -- $(top_srcdir)/am/readline.m4 $(top_srcdir)/am/result.m4 \ -- $(top_srcdir)/configure.ac -+ $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/configure.ac - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) - DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -@@ -341,6 +347,7 @@ - FTPD_LIBPAM = @FTPD_LIBPAM@ - GETADDRINFO_LIB = @GETADDRINFO_LIB@ - GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ -+GETOPT_CDEFS_H = @GETOPT_CDEFS_H@ - GETOPT_H = @GETOPT_H@ - GLIBC21 = @GLIBC21@ - GLOB_H = @GLOB_H@ -@@ -357,6 +364,7 @@ - GNULIB_CLOSE = @GNULIB_CLOSE@ - GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ - GNULIB_CONNECT = @GNULIB_CONNECT@ -+GNULIB_CTIME = @GNULIB_CTIME@ - GNULIB_DIRFD = @GNULIB_DIRFD@ - GNULIB_DPRINTF = @GNULIB_DPRINTF@ - GNULIB_DUP = @GNULIB_DUP@ -@@ -435,6 +443,7 @@ - GNULIB_LINKAT = @GNULIB_LINKAT@ - GNULIB_LISTEN = @GNULIB_LISTEN@ - GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ -+GNULIB_LOCALTIME = @GNULIB_LOCALTIME@ - GNULIB_LSEEK = @GNULIB_LSEEK@ - GNULIB_LSTAT = @GNULIB_LSTAT@ - GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ -@@ -482,6 +491,8 @@ - GNULIB_OPENAT = @GNULIB_OPENAT@ - GNULIB_OPENDIR = @GNULIB_OPENDIR@ - GNULIB_OPENPTY = @GNULIB_OPENPTY@ -+GNULIB_OVERRIDES_STRUCT_STAT = @GNULIB_OVERRIDES_STRUCT_STAT@ -+GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@ - GNULIB_PCLOSE = @GNULIB_PCLOSE@ - GNULIB_PERROR = @GNULIB_PERROR@ - GNULIB_PIPE = @GNULIB_PIPE@ -@@ -548,6 +559,7 @@ - GNULIB_STRDUP = @GNULIB_STRDUP@ - GNULIB_STRERROR = @GNULIB_STRERROR@ - GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ -+GNULIB_STRFTIME = @GNULIB_STRFTIME@ - GNULIB_STRNCAT = @GNULIB_STRNCAT@ - GNULIB_STRNDUP = @GNULIB_STRNDUP@ - GNULIB_STRNLEN = @GNULIB_STRNLEN@ -@@ -567,9 +579,12 @@ - GNULIB_TCGETSID = @GNULIB_TCGETSID@ - GNULIB_TIMEGM = @GNULIB_TIMEGM@ - GNULIB_TIME_R = @GNULIB_TIME_R@ -+GNULIB_TIME_RZ = @GNULIB_TIME_RZ@ - GNULIB_TMPFILE = @GNULIB_TMPFILE@ - GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ -+GNULIB_TRUNCATE = @GNULIB_TRUNCATE@ - GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -+GNULIB_TZSET = @GNULIB_TZSET@ - GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ - GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ - GNULIB_UNLINK = @GNULIB_UNLINK@ -@@ -599,6 +614,7 @@ - GNULIB_WCSCPY = @GNULIB_WCSCPY@ - GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ - GNULIB_WCSDUP = @GNULIB_WCSDUP@ -+GNULIB_WCSFTIME = @GNULIB_WCSFTIME@ - GNULIB_WCSLEN = @GNULIB_WCSLEN@ - GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ - GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ -@@ -632,9 +648,11 @@ - HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ - HAVE_ATOLL = @HAVE_ATOLL@ - HAVE_BTOWC = @HAVE_BTOWC@ -+HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@ - HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ - HAVE_CHOWN = @HAVE_CHOWN@ - HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ -+HAVE_CRTDEFS_H = @HAVE_CRTDEFS_H@ - HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ - HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ - HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ -@@ -650,6 +668,7 @@ - HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ - HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ - HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ -+HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@ - HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ - HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ - HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ -@@ -768,6 +787,7 @@ - HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ - HAVE_PTY_H = @HAVE_PTY_H@ - HAVE_PWRITE = @HAVE_PWRITE@ -+HAVE_QSORT_R = @HAVE_QSORT_R@ - HAVE_RAISE = @HAVE_RAISE@ - HAVE_RANDOM = @HAVE_RANDOM@ - HAVE_RANDOM_H = @HAVE_RANDOM_H@ -@@ -829,7 +849,10 @@ - HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@ - HAVE_TERMIOS_H = @HAVE_TERMIOS_H@ - HAVE_TIMEGM = @HAVE_TIMEGM@ -+HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@ -+HAVE_TRUNCATE = @HAVE_TRUNCATE@ - HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ -+HAVE_TZSET = @HAVE_TZSET@ - HAVE_UNISTD_H = @HAVE_UNISTD_H@ - HAVE_UNLINKAT = @HAVE_UNLINKAT@ - HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ -@@ -852,6 +875,7 @@ - HAVE_WCSCPY = @HAVE_WCSCPY@ - HAVE_WCSCSPN = @HAVE_WCSCSPN@ - HAVE_WCSDUP = @HAVE_WCSDUP@ -+HAVE_WCSFTIME = @HAVE_WCSFTIME@ - HAVE_WCSLEN = @HAVE_WCSLEN@ - HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ - HAVE_WCSNCAT = @HAVE_WCSNCAT@ -@@ -919,8 +943,10 @@ - LIBTHREAD = @LIBTHREAD@ - LIBUTIL = @LIBUTIL@ - LIBWRAP = @LIBWRAP@ -+LIB_GETLOGIN = @LIB_GETLOGIN@ - LIB_POLL = @LIB_POLL@ - LIB_SELECT = @LIB_SELECT@ -+LIMITS_H = @LIMITS_H@ - LN_S = @LN_S@ - LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ - LOCALE_FR = @LOCALE_FR@ -@@ -947,6 +973,7 @@ - NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ - NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ - NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ -+NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@ - NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ - NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ - NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ -@@ -979,6 +1006,7 @@ - NEXT_FLOAT_H = @NEXT_FLOAT_H@ - NEXT_GETOPT_H = @NEXT_GETOPT_H@ - NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ -+NEXT_LIMITS_H = @NEXT_LIMITS_H@ - NEXT_LOCALE_H = @NEXT_LOCALE_H@ - NEXT_NETDB_H = @NEXT_NETDB_H@ - NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ -@@ -1026,6 +1054,7 @@ - REPLACE_CHOWN = @REPLACE_CHOWN@ - REPLACE_CLOSE = @REPLACE_CLOSE@ - REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ -+REPLACE_CTIME = @REPLACE_CTIME@ - REPLACE_DIRFD = @REPLACE_DIRFD@ - REPLACE_DPRINTF = @REPLACE_DPRINTF@ - REPLACE_DUP = @REPLACE_DUP@ -@@ -1137,6 +1166,7 @@ - REPLACE_STRDUP = @REPLACE_STRDUP@ - REPLACE_STRERROR = @REPLACE_STRERROR@ - REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ -+REPLACE_STRFTIME = @REPLACE_STRFTIME@ - REPLACE_STRNCAT = @REPLACE_STRNCAT@ - REPLACE_STRNDUP = @REPLACE_STRNDUP@ - REPLACE_STRNLEN = @REPLACE_STRNLEN@ -@@ -1151,7 +1181,9 @@ - REPLACE_TIMEGM = @REPLACE_TIMEGM@ - REPLACE_TMPFILE = @REPLACE_TMPFILE@ - REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ -+REPLACE_TRUNCATE = @REPLACE_TRUNCATE@ - REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ -+REPLACE_TZSET = @REPLACE_TZSET@ - REPLACE_UNLINK = @REPLACE_UNLINK@ - REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ - REPLACE_UNSETENV = @REPLACE_UNSETENV@ -@@ -1164,6 +1196,7 @@ - REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ - REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ - REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ -+REPLACE_WCSFTIME = @REPLACE_WCSFTIME@ - REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ - REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ - REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ -@@ -1200,6 +1233,8 @@ - WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ - WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ - WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ -+WINDOWS_STAT_INODES = @WINDOWS_STAT_INODES@ -+WINDOWS_STAT_TIMESPEC = @WINDOWS_STAT_TIMESPEC@ - WINT_T_SUFFIX = @WINT_T_SUFFIX@ - YACC = @YACC@ - YFLAGS = @YFLAGS@ -diff -durN inetutils-1.9.4.orig/src/Makefile.in inetutils-1.9.4/src/Makefile.in ---- inetutils-1.9.4.orig/src/Makefile.in 2015-06-09 15:48:10.000000000 +0800 -+++ inetutils-1.9.4/src/Makefile.in 2017-05-15 17:58:18.359375000 +0800 -@@ -114,10 +114,18 @@ - syslogd$(EXEEXT) tftpd$(EXEEXT) uucpd$(EXEEXT) - subdir = src - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 --am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ -+am__aclocal_m4_deps = $(top_srcdir)/am/check_macro.m4 \ -+ $(top_srcdir)/am/check_member.m4 \ -+ $(top_srcdir)/am/check_weak_refs.m4 \ -+ $(top_srcdir)/am/config_paths.m4 $(top_srcdir)/am/enable.m4 \ -+ $(top_srcdir)/am/flushleft.m4 $(top_srcdir)/am/krb5.m4 \ -+ $(top_srcdir)/am/libcurses.m4 $(top_srcdir)/am/libidn.m4 \ -+ $(top_srcdir)/am/readline.m4 $(top_srcdir)/am/result.m4 \ -+ $(top_srcdir)/m4/00gnulib.m4 \ - $(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \ - $(top_srcdir)/m4/argp.m4 $(top_srcdir)/m4/arpa_inet_h.m4 \ - $(top_srcdir)/m4/autobuild.m4 $(top_srcdir)/m4/btowc.m4 \ -+ $(top_srcdir)/m4/builtin-expect.m4 \ - $(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/close.m4 \ - $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/codeset.m4 \ - $(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/d-ino.m4 \ -@@ -132,51 +140,56 @@ - $(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl.m4 \ - $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopendir.m4 \ - $(top_srcdir)/m4/filemode.m4 $(top_srcdir)/m4/filenamecat.m4 \ -- $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fnmatch.m4 \ -- $(top_srcdir)/m4/fopen.m4 $(top_srcdir)/m4/fseek.m4 \ -- $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/fstat.m4 \ -- $(top_srcdir)/m4/fstatat.m4 $(top_srcdir)/m4/ftell.m4 \ -- $(top_srcdir)/m4/ftello.m4 $(top_srcdir)/m4/getaddrinfo.m4 \ -+ $(top_srcdir)/m4/flexmember.m4 $(top_srcdir)/m4/float_h.m4 \ -+ $(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fopen.m4 \ -+ $(top_srcdir)/m4/fseek.m4 $(top_srcdir)/m4/fseeko.m4 \ -+ $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/fstatat.m4 \ -+ $(top_srcdir)/m4/ftell.m4 $(top_srcdir)/m4/ftello.m4 \ -+ $(top_srcdir)/m4/getaddrinfo.m4 \ - $(top_srcdir)/m4/getcwd-abort-bug.m4 \ - $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \ - $(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getdomainname.m4 \ - $(top_srcdir)/m4/getdtablesize.m4 \ - $(top_srcdir)/m4/getgroups.m4 $(top_srcdir)/m4/gethostname.m4 \ -- $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getlogin_r.m4 \ -- $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpass.m4 \ -+ $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getlogin.m4 \ -+ $(top_srcdir)/m4/getlogin_r.m4 $(top_srcdir)/m4/getopt.m4 \ -+ $(top_srcdir)/m4/getpass.m4 $(top_srcdir)/m4/getprogname.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettimeofday.m4 \ - $(top_srcdir)/m4/getugroups.m4 \ - $(top_srcdir)/m4/getusershell.m4 $(top_srcdir)/m4/glibc21.m4 \ - $(top_srcdir)/m4/glob.m4 $(top_srcdir)/m4/gnulib-common.m4 \ -- $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/hostent.m4 \ -+ $(top_srcdir)/m4/gnulib-comp.m4 \ -+ $(top_srcdir)/m4/hard-locale.m4 $(top_srcdir)/m4/hostent.m4 \ - $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inet_ntop.m4 \ - $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttostr.m4 \ - $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/ioctl.m4 \ - $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ -- $(top_srcdir)/m4/lib-prefix.m4 \ -+ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/limits-h.m4 \ - $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \ - $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \ - $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localeconv.m4 \ -- $(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/longlong.m4 \ -- $(top_srcdir)/m4/lseek.m4 $(top_srcdir)/m4/lstat.m4 \ -- $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \ -- $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \ -- $(top_srcdir)/m4/mbsrtowcs.m4 $(top_srcdir)/m4/mbstate_t.m4 \ -- $(top_srcdir)/m4/mbtowc.m4 $(top_srcdir)/m4/memchr.m4 \ -- $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/memrchr.m4 \ -- $(top_srcdir)/m4/mgetgroups.m4 $(top_srcdir)/m4/minmax.m4 \ -- $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mmap-anon.m4 \ -- $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \ -+ $(top_srcdir)/m4/localtime-buffer.m4 $(top_srcdir)/m4/lock.m4 \ -+ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \ -+ $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/malloc.m4 \ -+ $(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/mbrtowc.m4 \ -+ $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbsrtowcs.m4 \ -+ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ -+ $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mempcpy.m4 \ -+ $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/mgetgroups.m4 \ -+ $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkstemp.m4 \ -+ $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/mode_t.m4 \ -+ $(top_srcdir)/m4/msvc-inval.m4 \ - $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \ - $(top_srcdir)/m4/netdb_h.m4 $(top_srcdir)/m4/netinet_in_h.m4 \ - $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nocrash.m4 \ - $(top_srcdir)/m4/obstack.m4 $(top_srcdir)/m4/off_t.m4 \ -- $(top_srcdir)/m4/onceonly.m4 $(top_srcdir)/m4/open.m4 \ -- $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/opendir.m4 \ -- $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \ -- $(top_srcdir)/m4/poll.m4 $(top_srcdir)/m4/poll_h.m4 \ -- $(top_srcdir)/m4/posix_openpt.m4 $(top_srcdir)/m4/printf.m4 \ -+ $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/openat.m4 \ -+ $(top_srcdir)/m4/opendir.m4 $(top_srcdir)/m4/pathmax.m4 \ -+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/poll.m4 \ -+ $(top_srcdir)/m4/poll_h.m4 $(top_srcdir)/m4/posix_openpt.m4 \ -+ $(top_srcdir)/m4/printf.m4 \ -+ $(top_srcdir)/m4/pthread_rwlock_rdlock.m4 \ - $(top_srcdir)/m4/pty.m4 $(top_srcdir)/m4/pty_h.m4 \ - $(top_srcdir)/m4/rawmemchr.m4 $(top_srcdir)/m4/read-file.m4 \ - $(top_srcdir)/m4/readdir.m4 $(top_srcdir)/m4/readutmp.m4 \ -@@ -213,14 +226,7 @@ - $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctype_h.m4 \ - $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \ - $(top_srcdir)/m4/xgetcwd.m4 $(top_srcdir)/m4/xsize.m4 \ -- $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/am/check_macro.m4 \ -- $(top_srcdir)/am/check_member.m4 \ -- $(top_srcdir)/am/check_weak_refs.m4 \ -- $(top_srcdir)/am/config_paths.m4 $(top_srcdir)/am/enable.m4 \ -- $(top_srcdir)/am/flushleft.m4 $(top_srcdir)/am/krb5.m4 \ -- $(top_srcdir)/am/libcurses.m4 $(top_srcdir)/am/libidn.m4 \ -- $(top_srcdir)/am/readline.m4 $(top_srcdir)/am/result.m4 \ -- $(top_srcdir)/configure.ac -+ $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/configure.ac - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) - DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -@@ -404,6 +410,7 @@ - FTPD_LIBPAM = @FTPD_LIBPAM@ - GETADDRINFO_LIB = @GETADDRINFO_LIB@ - GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ -+GETOPT_CDEFS_H = @GETOPT_CDEFS_H@ - GETOPT_H = @GETOPT_H@ - GLIBC21 = @GLIBC21@ - GLOB_H = @GLOB_H@ -@@ -420,6 +427,7 @@ - GNULIB_CLOSE = @GNULIB_CLOSE@ - GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ - GNULIB_CONNECT = @GNULIB_CONNECT@ -+GNULIB_CTIME = @GNULIB_CTIME@ - GNULIB_DIRFD = @GNULIB_DIRFD@ - GNULIB_DPRINTF = @GNULIB_DPRINTF@ - GNULIB_DUP = @GNULIB_DUP@ -@@ -498,6 +506,7 @@ - GNULIB_LINKAT = @GNULIB_LINKAT@ - GNULIB_LISTEN = @GNULIB_LISTEN@ - GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ -+GNULIB_LOCALTIME = @GNULIB_LOCALTIME@ - GNULIB_LSEEK = @GNULIB_LSEEK@ - GNULIB_LSTAT = @GNULIB_LSTAT@ - GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ -@@ -545,6 +554,8 @@ - GNULIB_OPENAT = @GNULIB_OPENAT@ - GNULIB_OPENDIR = @GNULIB_OPENDIR@ - GNULIB_OPENPTY = @GNULIB_OPENPTY@ -+GNULIB_OVERRIDES_STRUCT_STAT = @GNULIB_OVERRIDES_STRUCT_STAT@ -+GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@ - GNULIB_PCLOSE = @GNULIB_PCLOSE@ - GNULIB_PERROR = @GNULIB_PERROR@ - GNULIB_PIPE = @GNULIB_PIPE@ -@@ -611,6 +622,7 @@ - GNULIB_STRDUP = @GNULIB_STRDUP@ - GNULIB_STRERROR = @GNULIB_STRERROR@ - GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ -+GNULIB_STRFTIME = @GNULIB_STRFTIME@ - GNULIB_STRNCAT = @GNULIB_STRNCAT@ - GNULIB_STRNDUP = @GNULIB_STRNDUP@ - GNULIB_STRNLEN = @GNULIB_STRNLEN@ -@@ -630,9 +642,12 @@ - GNULIB_TCGETSID = @GNULIB_TCGETSID@ - GNULIB_TIMEGM = @GNULIB_TIMEGM@ - GNULIB_TIME_R = @GNULIB_TIME_R@ -+GNULIB_TIME_RZ = @GNULIB_TIME_RZ@ - GNULIB_TMPFILE = @GNULIB_TMPFILE@ - GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ -+GNULIB_TRUNCATE = @GNULIB_TRUNCATE@ - GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -+GNULIB_TZSET = @GNULIB_TZSET@ - GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ - GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ - GNULIB_UNLINK = @GNULIB_UNLINK@ -@@ -662,6 +677,7 @@ - GNULIB_WCSCPY = @GNULIB_WCSCPY@ - GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ - GNULIB_WCSDUP = @GNULIB_WCSDUP@ -+GNULIB_WCSFTIME = @GNULIB_WCSFTIME@ - GNULIB_WCSLEN = @GNULIB_WCSLEN@ - GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ - GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ -@@ -695,9 +711,11 @@ - HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ - HAVE_ATOLL = @HAVE_ATOLL@ - HAVE_BTOWC = @HAVE_BTOWC@ -+HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@ - HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ - HAVE_CHOWN = @HAVE_CHOWN@ - HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ -+HAVE_CRTDEFS_H = @HAVE_CRTDEFS_H@ - HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ - HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ - HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ -@@ -713,6 +731,7 @@ - HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ - HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ - HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ -+HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@ - HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ - HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ - HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ -@@ -831,6 +850,7 @@ - HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ - HAVE_PTY_H = @HAVE_PTY_H@ - HAVE_PWRITE = @HAVE_PWRITE@ -+HAVE_QSORT_R = @HAVE_QSORT_R@ - HAVE_RAISE = @HAVE_RAISE@ - HAVE_RANDOM = @HAVE_RANDOM@ - HAVE_RANDOM_H = @HAVE_RANDOM_H@ -@@ -892,7 +912,10 @@ - HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@ - HAVE_TERMIOS_H = @HAVE_TERMIOS_H@ - HAVE_TIMEGM = @HAVE_TIMEGM@ -+HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@ -+HAVE_TRUNCATE = @HAVE_TRUNCATE@ - HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ -+HAVE_TZSET = @HAVE_TZSET@ - HAVE_UNISTD_H = @HAVE_UNISTD_H@ - HAVE_UNLINKAT = @HAVE_UNLINKAT@ - HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ -@@ -915,6 +938,7 @@ - HAVE_WCSCPY = @HAVE_WCSCPY@ - HAVE_WCSCSPN = @HAVE_WCSCSPN@ - HAVE_WCSDUP = @HAVE_WCSDUP@ -+HAVE_WCSFTIME = @HAVE_WCSFTIME@ - HAVE_WCSLEN = @HAVE_WCSLEN@ - HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ - HAVE_WCSNCAT = @HAVE_WCSNCAT@ -@@ -982,8 +1006,10 @@ - LIBTHREAD = @LIBTHREAD@ - LIBUTIL = @LIBUTIL@ - LIBWRAP = @LIBWRAP@ -+LIB_GETLOGIN = @LIB_GETLOGIN@ - LIB_POLL = @LIB_POLL@ - LIB_SELECT = @LIB_SELECT@ -+LIMITS_H = @LIMITS_H@ - LN_S = @LN_S@ - LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ - LOCALE_FR = @LOCALE_FR@ -@@ -1010,6 +1036,7 @@ - NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ - NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ - NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ -+NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@ - NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ - NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ - NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ -@@ -1042,6 +1069,7 @@ - NEXT_FLOAT_H = @NEXT_FLOAT_H@ - NEXT_GETOPT_H = @NEXT_GETOPT_H@ - NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ -+NEXT_LIMITS_H = @NEXT_LIMITS_H@ - NEXT_LOCALE_H = @NEXT_LOCALE_H@ - NEXT_NETDB_H = @NEXT_NETDB_H@ - NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ -@@ -1089,6 +1117,7 @@ - REPLACE_CHOWN = @REPLACE_CHOWN@ - REPLACE_CLOSE = @REPLACE_CLOSE@ - REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ -+REPLACE_CTIME = @REPLACE_CTIME@ - REPLACE_DIRFD = @REPLACE_DIRFD@ - REPLACE_DPRINTF = @REPLACE_DPRINTF@ - REPLACE_DUP = @REPLACE_DUP@ -@@ -1200,6 +1229,7 @@ - REPLACE_STRDUP = @REPLACE_STRDUP@ - REPLACE_STRERROR = @REPLACE_STRERROR@ - REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ -+REPLACE_STRFTIME = @REPLACE_STRFTIME@ - REPLACE_STRNCAT = @REPLACE_STRNCAT@ - REPLACE_STRNDUP = @REPLACE_STRNDUP@ - REPLACE_STRNLEN = @REPLACE_STRNLEN@ -@@ -1214,7 +1244,9 @@ - REPLACE_TIMEGM = @REPLACE_TIMEGM@ - REPLACE_TMPFILE = @REPLACE_TMPFILE@ - REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ -+REPLACE_TRUNCATE = @REPLACE_TRUNCATE@ - REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ -+REPLACE_TZSET = @REPLACE_TZSET@ - REPLACE_UNLINK = @REPLACE_UNLINK@ - REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ - REPLACE_UNSETENV = @REPLACE_UNSETENV@ -@@ -1227,6 +1259,7 @@ - REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ - REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ - REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ -+REPLACE_WCSFTIME = @REPLACE_WCSFTIME@ - REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ - REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ - REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ -@@ -1263,6 +1296,8 @@ - WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ - WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ - WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ -+WINDOWS_STAT_INODES = @WINDOWS_STAT_INODES@ -+WINDOWS_STAT_TIMESPEC = @WINDOWS_STAT_TIMESPEC@ - WINT_T_SUFFIX = @WINT_T_SUFFIX@ - YACC = @YACC@ - YFLAGS = @YFLAGS@ -diff -durN inetutils-1.9.4.orig/talk/Makefile.in inetutils-1.9.4/talk/Makefile.in ---- inetutils-1.9.4.orig/talk/Makefile.in 2015-06-09 15:48:10.000000000 +0800 -+++ inetutils-1.9.4/talk/Makefile.in 2017-05-15 17:58:18.640625000 +0800 -@@ -111,10 +111,18 @@ - EXTRA_PROGRAMS = talk$(EXEEXT) - subdir = talk - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 --am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ -+am__aclocal_m4_deps = $(top_srcdir)/am/check_macro.m4 \ -+ $(top_srcdir)/am/check_member.m4 \ -+ $(top_srcdir)/am/check_weak_refs.m4 \ -+ $(top_srcdir)/am/config_paths.m4 $(top_srcdir)/am/enable.m4 \ -+ $(top_srcdir)/am/flushleft.m4 $(top_srcdir)/am/krb5.m4 \ -+ $(top_srcdir)/am/libcurses.m4 $(top_srcdir)/am/libidn.m4 \ -+ $(top_srcdir)/am/readline.m4 $(top_srcdir)/am/result.m4 \ -+ $(top_srcdir)/m4/00gnulib.m4 \ - $(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \ - $(top_srcdir)/m4/argp.m4 $(top_srcdir)/m4/arpa_inet_h.m4 \ - $(top_srcdir)/m4/autobuild.m4 $(top_srcdir)/m4/btowc.m4 \ -+ $(top_srcdir)/m4/builtin-expect.m4 \ - $(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/close.m4 \ - $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/codeset.m4 \ - $(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/d-ino.m4 \ -@@ -129,51 +137,56 @@ - $(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl.m4 \ - $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopendir.m4 \ - $(top_srcdir)/m4/filemode.m4 $(top_srcdir)/m4/filenamecat.m4 \ -- $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fnmatch.m4 \ -- $(top_srcdir)/m4/fopen.m4 $(top_srcdir)/m4/fseek.m4 \ -- $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/fstat.m4 \ -- $(top_srcdir)/m4/fstatat.m4 $(top_srcdir)/m4/ftell.m4 \ -- $(top_srcdir)/m4/ftello.m4 $(top_srcdir)/m4/getaddrinfo.m4 \ -+ $(top_srcdir)/m4/flexmember.m4 $(top_srcdir)/m4/float_h.m4 \ -+ $(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fopen.m4 \ -+ $(top_srcdir)/m4/fseek.m4 $(top_srcdir)/m4/fseeko.m4 \ -+ $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/fstatat.m4 \ -+ $(top_srcdir)/m4/ftell.m4 $(top_srcdir)/m4/ftello.m4 \ -+ $(top_srcdir)/m4/getaddrinfo.m4 \ - $(top_srcdir)/m4/getcwd-abort-bug.m4 \ - $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \ - $(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getdomainname.m4 \ - $(top_srcdir)/m4/getdtablesize.m4 \ - $(top_srcdir)/m4/getgroups.m4 $(top_srcdir)/m4/gethostname.m4 \ -- $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getlogin_r.m4 \ -- $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpass.m4 \ -+ $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getlogin.m4 \ -+ $(top_srcdir)/m4/getlogin_r.m4 $(top_srcdir)/m4/getopt.m4 \ -+ $(top_srcdir)/m4/getpass.m4 $(top_srcdir)/m4/getprogname.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettimeofday.m4 \ - $(top_srcdir)/m4/getugroups.m4 \ - $(top_srcdir)/m4/getusershell.m4 $(top_srcdir)/m4/glibc21.m4 \ - $(top_srcdir)/m4/glob.m4 $(top_srcdir)/m4/gnulib-common.m4 \ -- $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/hostent.m4 \ -+ $(top_srcdir)/m4/gnulib-comp.m4 \ -+ $(top_srcdir)/m4/hard-locale.m4 $(top_srcdir)/m4/hostent.m4 \ - $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inet_ntop.m4 \ - $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttostr.m4 \ - $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/ioctl.m4 \ - $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ -- $(top_srcdir)/m4/lib-prefix.m4 \ -+ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/limits-h.m4 \ - $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \ - $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \ - $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localeconv.m4 \ -- $(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/longlong.m4 \ -- $(top_srcdir)/m4/lseek.m4 $(top_srcdir)/m4/lstat.m4 \ -- $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \ -- $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \ -- $(top_srcdir)/m4/mbsrtowcs.m4 $(top_srcdir)/m4/mbstate_t.m4 \ -- $(top_srcdir)/m4/mbtowc.m4 $(top_srcdir)/m4/memchr.m4 \ -- $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/memrchr.m4 \ -- $(top_srcdir)/m4/mgetgroups.m4 $(top_srcdir)/m4/minmax.m4 \ -- $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mmap-anon.m4 \ -- $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \ -+ $(top_srcdir)/m4/localtime-buffer.m4 $(top_srcdir)/m4/lock.m4 \ -+ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \ -+ $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/malloc.m4 \ -+ $(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/mbrtowc.m4 \ -+ $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbsrtowcs.m4 \ -+ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ -+ $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mempcpy.m4 \ -+ $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/mgetgroups.m4 \ -+ $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkstemp.m4 \ -+ $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/mode_t.m4 \ -+ $(top_srcdir)/m4/msvc-inval.m4 \ - $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \ - $(top_srcdir)/m4/netdb_h.m4 $(top_srcdir)/m4/netinet_in_h.m4 \ - $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nocrash.m4 \ - $(top_srcdir)/m4/obstack.m4 $(top_srcdir)/m4/off_t.m4 \ -- $(top_srcdir)/m4/onceonly.m4 $(top_srcdir)/m4/open.m4 \ -- $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/opendir.m4 \ -- $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \ -- $(top_srcdir)/m4/poll.m4 $(top_srcdir)/m4/poll_h.m4 \ -- $(top_srcdir)/m4/posix_openpt.m4 $(top_srcdir)/m4/printf.m4 \ -+ $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/openat.m4 \ -+ $(top_srcdir)/m4/opendir.m4 $(top_srcdir)/m4/pathmax.m4 \ -+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/poll.m4 \ -+ $(top_srcdir)/m4/poll_h.m4 $(top_srcdir)/m4/posix_openpt.m4 \ -+ $(top_srcdir)/m4/printf.m4 \ -+ $(top_srcdir)/m4/pthread_rwlock_rdlock.m4 \ - $(top_srcdir)/m4/pty.m4 $(top_srcdir)/m4/pty_h.m4 \ - $(top_srcdir)/m4/rawmemchr.m4 $(top_srcdir)/m4/read-file.m4 \ - $(top_srcdir)/m4/readdir.m4 $(top_srcdir)/m4/readutmp.m4 \ -@@ -210,14 +223,7 @@ - $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctype_h.m4 \ - $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \ - $(top_srcdir)/m4/xgetcwd.m4 $(top_srcdir)/m4/xsize.m4 \ -- $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/am/check_macro.m4 \ -- $(top_srcdir)/am/check_member.m4 \ -- $(top_srcdir)/am/check_weak_refs.m4 \ -- $(top_srcdir)/am/config_paths.m4 $(top_srcdir)/am/enable.m4 \ -- $(top_srcdir)/am/flushleft.m4 $(top_srcdir)/am/krb5.m4 \ -- $(top_srcdir)/am/libcurses.m4 $(top_srcdir)/am/libidn.m4 \ -- $(top_srcdir)/am/readline.m4 $(top_srcdir)/am/result.m4 \ -- $(top_srcdir)/configure.ac -+ $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/configure.ac - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) - DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ -@@ -340,6 +346,7 @@ - FTPD_LIBPAM = @FTPD_LIBPAM@ - GETADDRINFO_LIB = @GETADDRINFO_LIB@ - GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ -+GETOPT_CDEFS_H = @GETOPT_CDEFS_H@ - GETOPT_H = @GETOPT_H@ - GLIBC21 = @GLIBC21@ - GLOB_H = @GLOB_H@ -@@ -356,6 +363,7 @@ - GNULIB_CLOSE = @GNULIB_CLOSE@ - GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ - GNULIB_CONNECT = @GNULIB_CONNECT@ -+GNULIB_CTIME = @GNULIB_CTIME@ - GNULIB_DIRFD = @GNULIB_DIRFD@ - GNULIB_DPRINTF = @GNULIB_DPRINTF@ - GNULIB_DUP = @GNULIB_DUP@ -@@ -434,6 +442,7 @@ - GNULIB_LINKAT = @GNULIB_LINKAT@ - GNULIB_LISTEN = @GNULIB_LISTEN@ - GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ -+GNULIB_LOCALTIME = @GNULIB_LOCALTIME@ - GNULIB_LSEEK = @GNULIB_LSEEK@ - GNULIB_LSTAT = @GNULIB_LSTAT@ - GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ -@@ -481,6 +490,8 @@ - GNULIB_OPENAT = @GNULIB_OPENAT@ - GNULIB_OPENDIR = @GNULIB_OPENDIR@ - GNULIB_OPENPTY = @GNULIB_OPENPTY@ -+GNULIB_OVERRIDES_STRUCT_STAT = @GNULIB_OVERRIDES_STRUCT_STAT@ -+GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@ - GNULIB_PCLOSE = @GNULIB_PCLOSE@ - GNULIB_PERROR = @GNULIB_PERROR@ - GNULIB_PIPE = @GNULIB_PIPE@ -@@ -547,6 +558,7 @@ - GNULIB_STRDUP = @GNULIB_STRDUP@ - GNULIB_STRERROR = @GNULIB_STRERROR@ - GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ -+GNULIB_STRFTIME = @GNULIB_STRFTIME@ - GNULIB_STRNCAT = @GNULIB_STRNCAT@ - GNULIB_STRNDUP = @GNULIB_STRNDUP@ - GNULIB_STRNLEN = @GNULIB_STRNLEN@ -@@ -566,9 +578,12 @@ - GNULIB_TCGETSID = @GNULIB_TCGETSID@ - GNULIB_TIMEGM = @GNULIB_TIMEGM@ - GNULIB_TIME_R = @GNULIB_TIME_R@ -+GNULIB_TIME_RZ = @GNULIB_TIME_RZ@ - GNULIB_TMPFILE = @GNULIB_TMPFILE@ - GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ -+GNULIB_TRUNCATE = @GNULIB_TRUNCATE@ - GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -+GNULIB_TZSET = @GNULIB_TZSET@ - GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ - GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ - GNULIB_UNLINK = @GNULIB_UNLINK@ -@@ -598,6 +613,7 @@ - GNULIB_WCSCPY = @GNULIB_WCSCPY@ - GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ - GNULIB_WCSDUP = @GNULIB_WCSDUP@ -+GNULIB_WCSFTIME = @GNULIB_WCSFTIME@ - GNULIB_WCSLEN = @GNULIB_WCSLEN@ - GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ - GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ -@@ -631,9 +647,11 @@ - HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ - HAVE_ATOLL = @HAVE_ATOLL@ - HAVE_BTOWC = @HAVE_BTOWC@ -+HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@ - HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ - HAVE_CHOWN = @HAVE_CHOWN@ - HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ -+HAVE_CRTDEFS_H = @HAVE_CRTDEFS_H@ - HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ - HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ - HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ -@@ -649,6 +667,7 @@ - HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ - HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ - HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ -+HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@ - HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ - HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ - HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ -@@ -767,6 +786,7 @@ - HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ - HAVE_PTY_H = @HAVE_PTY_H@ - HAVE_PWRITE = @HAVE_PWRITE@ -+HAVE_QSORT_R = @HAVE_QSORT_R@ - HAVE_RAISE = @HAVE_RAISE@ - HAVE_RANDOM = @HAVE_RANDOM@ - HAVE_RANDOM_H = @HAVE_RANDOM_H@ -@@ -828,7 +848,10 @@ - HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@ - HAVE_TERMIOS_H = @HAVE_TERMIOS_H@ - HAVE_TIMEGM = @HAVE_TIMEGM@ -+HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@ -+HAVE_TRUNCATE = @HAVE_TRUNCATE@ - HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ -+HAVE_TZSET = @HAVE_TZSET@ - HAVE_UNISTD_H = @HAVE_UNISTD_H@ - HAVE_UNLINKAT = @HAVE_UNLINKAT@ - HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ -@@ -851,6 +874,7 @@ - HAVE_WCSCPY = @HAVE_WCSCPY@ - HAVE_WCSCSPN = @HAVE_WCSCSPN@ - HAVE_WCSDUP = @HAVE_WCSDUP@ -+HAVE_WCSFTIME = @HAVE_WCSFTIME@ - HAVE_WCSLEN = @HAVE_WCSLEN@ - HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ - HAVE_WCSNCAT = @HAVE_WCSNCAT@ -@@ -918,8 +942,10 @@ - LIBTHREAD = @LIBTHREAD@ - LIBUTIL = @LIBUTIL@ - LIBWRAP = @LIBWRAP@ -+LIB_GETLOGIN = @LIB_GETLOGIN@ - LIB_POLL = @LIB_POLL@ - LIB_SELECT = @LIB_SELECT@ -+LIMITS_H = @LIMITS_H@ - LN_S = @LN_S@ - LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ - LOCALE_FR = @LOCALE_FR@ -@@ -946,6 +972,7 @@ - NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ - NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ - NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ -+NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@ - NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ - NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ - NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ -@@ -978,6 +1005,7 @@ - NEXT_FLOAT_H = @NEXT_FLOAT_H@ - NEXT_GETOPT_H = @NEXT_GETOPT_H@ - NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ -+NEXT_LIMITS_H = @NEXT_LIMITS_H@ - NEXT_LOCALE_H = @NEXT_LOCALE_H@ - NEXT_NETDB_H = @NEXT_NETDB_H@ - NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ -@@ -1025,6 +1053,7 @@ - REPLACE_CHOWN = @REPLACE_CHOWN@ - REPLACE_CLOSE = @REPLACE_CLOSE@ - REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ -+REPLACE_CTIME = @REPLACE_CTIME@ - REPLACE_DIRFD = @REPLACE_DIRFD@ - REPLACE_DPRINTF = @REPLACE_DPRINTF@ - REPLACE_DUP = @REPLACE_DUP@ -@@ -1136,6 +1165,7 @@ - REPLACE_STRDUP = @REPLACE_STRDUP@ - REPLACE_STRERROR = @REPLACE_STRERROR@ - REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ -+REPLACE_STRFTIME = @REPLACE_STRFTIME@ - REPLACE_STRNCAT = @REPLACE_STRNCAT@ - REPLACE_STRNDUP = @REPLACE_STRNDUP@ - REPLACE_STRNLEN = @REPLACE_STRNLEN@ -@@ -1150,7 +1180,9 @@ - REPLACE_TIMEGM = @REPLACE_TIMEGM@ - REPLACE_TMPFILE = @REPLACE_TMPFILE@ - REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ -+REPLACE_TRUNCATE = @REPLACE_TRUNCATE@ - REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ -+REPLACE_TZSET = @REPLACE_TZSET@ - REPLACE_UNLINK = @REPLACE_UNLINK@ - REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ - REPLACE_UNSETENV = @REPLACE_UNSETENV@ -@@ -1163,6 +1195,7 @@ - REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ - REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ - REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ -+REPLACE_WCSFTIME = @REPLACE_WCSFTIME@ - REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ - REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ - REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ -@@ -1199,6 +1232,8 @@ - WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ - WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ - WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ -+WINDOWS_STAT_INODES = @WINDOWS_STAT_INODES@ -+WINDOWS_STAT_TIMESPEC = @WINDOWS_STAT_TIMESPEC@ - WINT_T_SUFFIX = @WINT_T_SUFFIX@ - YACC = @YACC@ - YFLAGS = @YFLAGS@ -@@ -1370,6 +1405,7 @@ - whois_INSTALL_HOOK = @whois_INSTALL_HOOK@ - whois_PROPS = @whois_PROPS@ - AM_CPPFLAGS = \ -+ -I$(top_srcdir)/headers \ - $(iu_INCLUDES) \ - $(NCURSES_INCLUDE) $(INCIDN) - -diff -durN inetutils-1.9.4.orig/talkd/Makefile.in inetutils-1.9.4/talkd/Makefile.in ---- inetutils-1.9.4.orig/talkd/Makefile.in 2015-06-09 15:48:10.000000000 +0800 -+++ inetutils-1.9.4/talkd/Makefile.in 2017-05-15 17:58:18.906250000 +0800 -@@ -110,10 +110,18 @@ - EXTRA_PROGRAMS = talkd$(EXEEXT) - subdir = talkd - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 --am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ -+am__aclocal_m4_deps = $(top_srcdir)/am/check_macro.m4 \ -+ $(top_srcdir)/am/check_member.m4 \ -+ $(top_srcdir)/am/check_weak_refs.m4 \ -+ $(top_srcdir)/am/config_paths.m4 $(top_srcdir)/am/enable.m4 \ -+ $(top_srcdir)/am/flushleft.m4 $(top_srcdir)/am/krb5.m4 \ -+ $(top_srcdir)/am/libcurses.m4 $(top_srcdir)/am/libidn.m4 \ -+ $(top_srcdir)/am/readline.m4 $(top_srcdir)/am/result.m4 \ -+ $(top_srcdir)/m4/00gnulib.m4 \ - $(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \ - $(top_srcdir)/m4/argp.m4 $(top_srcdir)/m4/arpa_inet_h.m4 \ - $(top_srcdir)/m4/autobuild.m4 $(top_srcdir)/m4/btowc.m4 \ -+ $(top_srcdir)/m4/builtin-expect.m4 \ - $(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/close.m4 \ - $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/codeset.m4 \ - $(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/d-ino.m4 \ -@@ -128,51 +136,56 @@ - $(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl.m4 \ - $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopendir.m4 \ - $(top_srcdir)/m4/filemode.m4 $(top_srcdir)/m4/filenamecat.m4 \ -- $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fnmatch.m4 \ -- $(top_srcdir)/m4/fopen.m4 $(top_srcdir)/m4/fseek.m4 \ -- $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/fstat.m4 \ -- $(top_srcdir)/m4/fstatat.m4 $(top_srcdir)/m4/ftell.m4 \ -- $(top_srcdir)/m4/ftello.m4 $(top_srcdir)/m4/getaddrinfo.m4 \ -+ $(top_srcdir)/m4/flexmember.m4 $(top_srcdir)/m4/float_h.m4 \ -+ $(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fopen.m4 \ -+ $(top_srcdir)/m4/fseek.m4 $(top_srcdir)/m4/fseeko.m4 \ -+ $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/fstatat.m4 \ -+ $(top_srcdir)/m4/ftell.m4 $(top_srcdir)/m4/ftello.m4 \ -+ $(top_srcdir)/m4/getaddrinfo.m4 \ - $(top_srcdir)/m4/getcwd-abort-bug.m4 \ - $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \ - $(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getdomainname.m4 \ - $(top_srcdir)/m4/getdtablesize.m4 \ - $(top_srcdir)/m4/getgroups.m4 $(top_srcdir)/m4/gethostname.m4 \ -- $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getlogin_r.m4 \ -- $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpass.m4 \ -+ $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getlogin.m4 \ -+ $(top_srcdir)/m4/getlogin_r.m4 $(top_srcdir)/m4/getopt.m4 \ -+ $(top_srcdir)/m4/getpass.m4 $(top_srcdir)/m4/getprogname.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettimeofday.m4 \ - $(top_srcdir)/m4/getugroups.m4 \ - $(top_srcdir)/m4/getusershell.m4 $(top_srcdir)/m4/glibc21.m4 \ - $(top_srcdir)/m4/glob.m4 $(top_srcdir)/m4/gnulib-common.m4 \ -- $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/hostent.m4 \ -+ $(top_srcdir)/m4/gnulib-comp.m4 \ -+ $(top_srcdir)/m4/hard-locale.m4 $(top_srcdir)/m4/hostent.m4 \ - $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inet_ntop.m4 \ - $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttostr.m4 \ - $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/ioctl.m4 \ - $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ -- $(top_srcdir)/m4/lib-prefix.m4 \ -+ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/limits-h.m4 \ - $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \ - $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \ - $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localeconv.m4 \ -- $(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/longlong.m4 \ -- $(top_srcdir)/m4/lseek.m4 $(top_srcdir)/m4/lstat.m4 \ -- $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \ -- $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \ -- $(top_srcdir)/m4/mbsrtowcs.m4 $(top_srcdir)/m4/mbstate_t.m4 \ -- $(top_srcdir)/m4/mbtowc.m4 $(top_srcdir)/m4/memchr.m4 \ -- $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/memrchr.m4 \ -- $(top_srcdir)/m4/mgetgroups.m4 $(top_srcdir)/m4/minmax.m4 \ -- $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mmap-anon.m4 \ -- $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \ -+ $(top_srcdir)/m4/localtime-buffer.m4 $(top_srcdir)/m4/lock.m4 \ -+ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \ -+ $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/malloc.m4 \ -+ $(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/mbrtowc.m4 \ -+ $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbsrtowcs.m4 \ -+ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ -+ $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mempcpy.m4 \ -+ $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/mgetgroups.m4 \ -+ $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkstemp.m4 \ -+ $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/mode_t.m4 \ -+ $(top_srcdir)/m4/msvc-inval.m4 \ - $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \ - $(top_srcdir)/m4/netdb_h.m4 $(top_srcdir)/m4/netinet_in_h.m4 \ - $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nocrash.m4 \ - $(top_srcdir)/m4/obstack.m4 $(top_srcdir)/m4/off_t.m4 \ -- $(top_srcdir)/m4/onceonly.m4 $(top_srcdir)/m4/open.m4 \ -- $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/opendir.m4 \ -- $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \ -- $(top_srcdir)/m4/poll.m4 $(top_srcdir)/m4/poll_h.m4 \ -- $(top_srcdir)/m4/posix_openpt.m4 $(top_srcdir)/m4/printf.m4 \ -+ $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/openat.m4 \ -+ $(top_srcdir)/m4/opendir.m4 $(top_srcdir)/m4/pathmax.m4 \ -+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/poll.m4 \ -+ $(top_srcdir)/m4/poll_h.m4 $(top_srcdir)/m4/posix_openpt.m4 \ -+ $(top_srcdir)/m4/printf.m4 \ -+ $(top_srcdir)/m4/pthread_rwlock_rdlock.m4 \ - $(top_srcdir)/m4/pty.m4 $(top_srcdir)/m4/pty_h.m4 \ - $(top_srcdir)/m4/rawmemchr.m4 $(top_srcdir)/m4/read-file.m4 \ - $(top_srcdir)/m4/readdir.m4 $(top_srcdir)/m4/readutmp.m4 \ -@@ -209,14 +222,7 @@ - $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctype_h.m4 \ - $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \ - $(top_srcdir)/m4/xgetcwd.m4 $(top_srcdir)/m4/xsize.m4 \ -- $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/am/check_macro.m4 \ -- $(top_srcdir)/am/check_member.m4 \ -- $(top_srcdir)/am/check_weak_refs.m4 \ -- $(top_srcdir)/am/config_paths.m4 $(top_srcdir)/am/enable.m4 \ -- $(top_srcdir)/am/flushleft.m4 $(top_srcdir)/am/krb5.m4 \ -- $(top_srcdir)/am/libcurses.m4 $(top_srcdir)/am/libidn.m4 \ -- $(top_srcdir)/am/readline.m4 $(top_srcdir)/am/result.m4 \ -- $(top_srcdir)/configure.ac -+ $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/configure.ac - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) - DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -@@ -334,6 +340,7 @@ - FTPD_LIBPAM = @FTPD_LIBPAM@ - GETADDRINFO_LIB = @GETADDRINFO_LIB@ - GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ -+GETOPT_CDEFS_H = @GETOPT_CDEFS_H@ - GETOPT_H = @GETOPT_H@ - GLIBC21 = @GLIBC21@ - GLOB_H = @GLOB_H@ -@@ -350,6 +357,7 @@ - GNULIB_CLOSE = @GNULIB_CLOSE@ - GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ - GNULIB_CONNECT = @GNULIB_CONNECT@ -+GNULIB_CTIME = @GNULIB_CTIME@ - GNULIB_DIRFD = @GNULIB_DIRFD@ - GNULIB_DPRINTF = @GNULIB_DPRINTF@ - GNULIB_DUP = @GNULIB_DUP@ -@@ -428,6 +436,7 @@ - GNULIB_LINKAT = @GNULIB_LINKAT@ - GNULIB_LISTEN = @GNULIB_LISTEN@ - GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ -+GNULIB_LOCALTIME = @GNULIB_LOCALTIME@ - GNULIB_LSEEK = @GNULIB_LSEEK@ - GNULIB_LSTAT = @GNULIB_LSTAT@ - GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ -@@ -475,6 +484,8 @@ - GNULIB_OPENAT = @GNULIB_OPENAT@ - GNULIB_OPENDIR = @GNULIB_OPENDIR@ - GNULIB_OPENPTY = @GNULIB_OPENPTY@ -+GNULIB_OVERRIDES_STRUCT_STAT = @GNULIB_OVERRIDES_STRUCT_STAT@ -+GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@ - GNULIB_PCLOSE = @GNULIB_PCLOSE@ - GNULIB_PERROR = @GNULIB_PERROR@ - GNULIB_PIPE = @GNULIB_PIPE@ -@@ -541,6 +552,7 @@ - GNULIB_STRDUP = @GNULIB_STRDUP@ - GNULIB_STRERROR = @GNULIB_STRERROR@ - GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ -+GNULIB_STRFTIME = @GNULIB_STRFTIME@ - GNULIB_STRNCAT = @GNULIB_STRNCAT@ - GNULIB_STRNDUP = @GNULIB_STRNDUP@ - GNULIB_STRNLEN = @GNULIB_STRNLEN@ -@@ -560,9 +572,12 @@ - GNULIB_TCGETSID = @GNULIB_TCGETSID@ - GNULIB_TIMEGM = @GNULIB_TIMEGM@ - GNULIB_TIME_R = @GNULIB_TIME_R@ -+GNULIB_TIME_RZ = @GNULIB_TIME_RZ@ - GNULIB_TMPFILE = @GNULIB_TMPFILE@ - GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ -+GNULIB_TRUNCATE = @GNULIB_TRUNCATE@ - GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -+GNULIB_TZSET = @GNULIB_TZSET@ - GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ - GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ - GNULIB_UNLINK = @GNULIB_UNLINK@ -@@ -592,6 +607,7 @@ - GNULIB_WCSCPY = @GNULIB_WCSCPY@ - GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ - GNULIB_WCSDUP = @GNULIB_WCSDUP@ -+GNULIB_WCSFTIME = @GNULIB_WCSFTIME@ - GNULIB_WCSLEN = @GNULIB_WCSLEN@ - GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ - GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ -@@ -625,9 +641,11 @@ - HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ - HAVE_ATOLL = @HAVE_ATOLL@ - HAVE_BTOWC = @HAVE_BTOWC@ -+HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@ - HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ - HAVE_CHOWN = @HAVE_CHOWN@ - HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ -+HAVE_CRTDEFS_H = @HAVE_CRTDEFS_H@ - HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ - HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ - HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ -@@ -643,6 +661,7 @@ - HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ - HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ - HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ -+HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@ - HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ - HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ - HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ -@@ -761,6 +780,7 @@ - HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ - HAVE_PTY_H = @HAVE_PTY_H@ - HAVE_PWRITE = @HAVE_PWRITE@ -+HAVE_QSORT_R = @HAVE_QSORT_R@ - HAVE_RAISE = @HAVE_RAISE@ - HAVE_RANDOM = @HAVE_RANDOM@ - HAVE_RANDOM_H = @HAVE_RANDOM_H@ -@@ -822,7 +842,10 @@ - HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@ - HAVE_TERMIOS_H = @HAVE_TERMIOS_H@ - HAVE_TIMEGM = @HAVE_TIMEGM@ -+HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@ -+HAVE_TRUNCATE = @HAVE_TRUNCATE@ - HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ -+HAVE_TZSET = @HAVE_TZSET@ - HAVE_UNISTD_H = @HAVE_UNISTD_H@ - HAVE_UNLINKAT = @HAVE_UNLINKAT@ - HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ -@@ -845,6 +868,7 @@ - HAVE_WCSCPY = @HAVE_WCSCPY@ - HAVE_WCSCSPN = @HAVE_WCSCSPN@ - HAVE_WCSDUP = @HAVE_WCSDUP@ -+HAVE_WCSFTIME = @HAVE_WCSFTIME@ - HAVE_WCSLEN = @HAVE_WCSLEN@ - HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ - HAVE_WCSNCAT = @HAVE_WCSNCAT@ -@@ -912,8 +936,10 @@ - LIBTHREAD = @LIBTHREAD@ - LIBUTIL = @LIBUTIL@ - LIBWRAP = @LIBWRAP@ -+LIB_GETLOGIN = @LIB_GETLOGIN@ - LIB_POLL = @LIB_POLL@ - LIB_SELECT = @LIB_SELECT@ -+LIMITS_H = @LIMITS_H@ - LN_S = @LN_S@ - LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ - LOCALE_FR = @LOCALE_FR@ -@@ -940,6 +966,7 @@ - NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ - NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ - NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ -+NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@ - NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ - NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ - NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ -@@ -972,6 +999,7 @@ - NEXT_FLOAT_H = @NEXT_FLOAT_H@ - NEXT_GETOPT_H = @NEXT_GETOPT_H@ - NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ -+NEXT_LIMITS_H = @NEXT_LIMITS_H@ - NEXT_LOCALE_H = @NEXT_LOCALE_H@ - NEXT_NETDB_H = @NEXT_NETDB_H@ - NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ -@@ -1019,6 +1047,7 @@ - REPLACE_CHOWN = @REPLACE_CHOWN@ - REPLACE_CLOSE = @REPLACE_CLOSE@ - REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ -+REPLACE_CTIME = @REPLACE_CTIME@ - REPLACE_DIRFD = @REPLACE_DIRFD@ - REPLACE_DPRINTF = @REPLACE_DPRINTF@ - REPLACE_DUP = @REPLACE_DUP@ -@@ -1130,6 +1159,7 @@ - REPLACE_STRDUP = @REPLACE_STRDUP@ - REPLACE_STRERROR = @REPLACE_STRERROR@ - REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ -+REPLACE_STRFTIME = @REPLACE_STRFTIME@ - REPLACE_STRNCAT = @REPLACE_STRNCAT@ - REPLACE_STRNDUP = @REPLACE_STRNDUP@ - REPLACE_STRNLEN = @REPLACE_STRNLEN@ -@@ -1144,7 +1174,9 @@ - REPLACE_TIMEGM = @REPLACE_TIMEGM@ - REPLACE_TMPFILE = @REPLACE_TMPFILE@ - REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ -+REPLACE_TRUNCATE = @REPLACE_TRUNCATE@ - REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ -+REPLACE_TZSET = @REPLACE_TZSET@ - REPLACE_UNLINK = @REPLACE_UNLINK@ - REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ - REPLACE_UNSETENV = @REPLACE_UNSETENV@ -@@ -1157,6 +1189,7 @@ - REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ - REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ - REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ -+REPLACE_WCSFTIME = @REPLACE_WCSFTIME@ - REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ - REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ - REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ -@@ -1193,6 +1226,8 @@ - WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ - WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ - WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ -+WINDOWS_STAT_INODES = @WINDOWS_STAT_INODES@ -+WINDOWS_STAT_TIMESPEC = @WINDOWS_STAT_TIMESPEC@ - WINT_T_SUFFIX = @WINT_T_SUFFIX@ - YACC = @YACC@ - YFLAGS = @YFLAGS@ -@@ -1364,6 +1399,7 @@ - whois_INSTALL_HOOK = @whois_INSTALL_HOOK@ - whois_PROPS = @whois_PROPS@ - AM_CPPFLAGS = \ -+ -I$(top_srcdir)/headers \ - $(iu_INCLUDES) \ - $(PATHDEF_DEV) \ - $(PATHDEF_TTY_PFX) $(PATHDEF_UTMP) $(PATHDEF_UTMPX) -diff -durN inetutils-1.9.4.orig/telnet/Makefile.in inetutils-1.9.4/telnet/Makefile.in ---- inetutils-1.9.4.orig/telnet/Makefile.in 2015-06-09 15:48:11.000000000 +0800 -+++ inetutils-1.9.4/telnet/Makefile.in 2017-05-15 17:58:19.187500000 +0800 -@@ -111,10 +111,18 @@ - EXTRA_PROGRAMS = telnet$(EXEEXT) - subdir = telnet - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 --am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ -+am__aclocal_m4_deps = $(top_srcdir)/am/check_macro.m4 \ -+ $(top_srcdir)/am/check_member.m4 \ -+ $(top_srcdir)/am/check_weak_refs.m4 \ -+ $(top_srcdir)/am/config_paths.m4 $(top_srcdir)/am/enable.m4 \ -+ $(top_srcdir)/am/flushleft.m4 $(top_srcdir)/am/krb5.m4 \ -+ $(top_srcdir)/am/libcurses.m4 $(top_srcdir)/am/libidn.m4 \ -+ $(top_srcdir)/am/readline.m4 $(top_srcdir)/am/result.m4 \ -+ $(top_srcdir)/m4/00gnulib.m4 \ - $(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \ - $(top_srcdir)/m4/argp.m4 $(top_srcdir)/m4/arpa_inet_h.m4 \ - $(top_srcdir)/m4/autobuild.m4 $(top_srcdir)/m4/btowc.m4 \ -+ $(top_srcdir)/m4/builtin-expect.m4 \ - $(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/close.m4 \ - $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/codeset.m4 \ - $(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/d-ino.m4 \ -@@ -129,51 +137,56 @@ - $(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl.m4 \ - $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopendir.m4 \ - $(top_srcdir)/m4/filemode.m4 $(top_srcdir)/m4/filenamecat.m4 \ -- $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fnmatch.m4 \ -- $(top_srcdir)/m4/fopen.m4 $(top_srcdir)/m4/fseek.m4 \ -- $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/fstat.m4 \ -- $(top_srcdir)/m4/fstatat.m4 $(top_srcdir)/m4/ftell.m4 \ -- $(top_srcdir)/m4/ftello.m4 $(top_srcdir)/m4/getaddrinfo.m4 \ -+ $(top_srcdir)/m4/flexmember.m4 $(top_srcdir)/m4/float_h.m4 \ -+ $(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fopen.m4 \ -+ $(top_srcdir)/m4/fseek.m4 $(top_srcdir)/m4/fseeko.m4 \ -+ $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/fstatat.m4 \ -+ $(top_srcdir)/m4/ftell.m4 $(top_srcdir)/m4/ftello.m4 \ -+ $(top_srcdir)/m4/getaddrinfo.m4 \ - $(top_srcdir)/m4/getcwd-abort-bug.m4 \ - $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \ - $(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getdomainname.m4 \ - $(top_srcdir)/m4/getdtablesize.m4 \ - $(top_srcdir)/m4/getgroups.m4 $(top_srcdir)/m4/gethostname.m4 \ -- $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getlogin_r.m4 \ -- $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpass.m4 \ -+ $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getlogin.m4 \ -+ $(top_srcdir)/m4/getlogin_r.m4 $(top_srcdir)/m4/getopt.m4 \ -+ $(top_srcdir)/m4/getpass.m4 $(top_srcdir)/m4/getprogname.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettimeofday.m4 \ - $(top_srcdir)/m4/getugroups.m4 \ - $(top_srcdir)/m4/getusershell.m4 $(top_srcdir)/m4/glibc21.m4 \ - $(top_srcdir)/m4/glob.m4 $(top_srcdir)/m4/gnulib-common.m4 \ -- $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/hostent.m4 \ -+ $(top_srcdir)/m4/gnulib-comp.m4 \ -+ $(top_srcdir)/m4/hard-locale.m4 $(top_srcdir)/m4/hostent.m4 \ - $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inet_ntop.m4 \ - $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttostr.m4 \ - $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/ioctl.m4 \ - $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ -- $(top_srcdir)/m4/lib-prefix.m4 \ -+ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/limits-h.m4 \ - $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \ - $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \ - $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localeconv.m4 \ -- $(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/longlong.m4 \ -- $(top_srcdir)/m4/lseek.m4 $(top_srcdir)/m4/lstat.m4 \ -- $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \ -- $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \ -- $(top_srcdir)/m4/mbsrtowcs.m4 $(top_srcdir)/m4/mbstate_t.m4 \ -- $(top_srcdir)/m4/mbtowc.m4 $(top_srcdir)/m4/memchr.m4 \ -- $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/memrchr.m4 \ -- $(top_srcdir)/m4/mgetgroups.m4 $(top_srcdir)/m4/minmax.m4 \ -- $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mmap-anon.m4 \ -- $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \ -+ $(top_srcdir)/m4/localtime-buffer.m4 $(top_srcdir)/m4/lock.m4 \ -+ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \ -+ $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/malloc.m4 \ -+ $(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/mbrtowc.m4 \ -+ $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbsrtowcs.m4 \ -+ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ -+ $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mempcpy.m4 \ -+ $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/mgetgroups.m4 \ -+ $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkstemp.m4 \ -+ $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/mode_t.m4 \ -+ $(top_srcdir)/m4/msvc-inval.m4 \ - $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \ - $(top_srcdir)/m4/netdb_h.m4 $(top_srcdir)/m4/netinet_in_h.m4 \ - $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nocrash.m4 \ - $(top_srcdir)/m4/obstack.m4 $(top_srcdir)/m4/off_t.m4 \ -- $(top_srcdir)/m4/onceonly.m4 $(top_srcdir)/m4/open.m4 \ -- $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/opendir.m4 \ -- $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \ -- $(top_srcdir)/m4/poll.m4 $(top_srcdir)/m4/poll_h.m4 \ -- $(top_srcdir)/m4/posix_openpt.m4 $(top_srcdir)/m4/printf.m4 \ -+ $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/openat.m4 \ -+ $(top_srcdir)/m4/opendir.m4 $(top_srcdir)/m4/pathmax.m4 \ -+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/poll.m4 \ -+ $(top_srcdir)/m4/poll_h.m4 $(top_srcdir)/m4/posix_openpt.m4 \ -+ $(top_srcdir)/m4/printf.m4 \ -+ $(top_srcdir)/m4/pthread_rwlock_rdlock.m4 \ - $(top_srcdir)/m4/pty.m4 $(top_srcdir)/m4/pty_h.m4 \ - $(top_srcdir)/m4/rawmemchr.m4 $(top_srcdir)/m4/read-file.m4 \ - $(top_srcdir)/m4/readdir.m4 $(top_srcdir)/m4/readutmp.m4 \ -@@ -210,14 +223,7 @@ - $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctype_h.m4 \ - $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \ - $(top_srcdir)/m4/xgetcwd.m4 $(top_srcdir)/m4/xsize.m4 \ -- $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/am/check_macro.m4 \ -- $(top_srcdir)/am/check_member.m4 \ -- $(top_srcdir)/am/check_weak_refs.m4 \ -- $(top_srcdir)/am/config_paths.m4 $(top_srcdir)/am/enable.m4 \ -- $(top_srcdir)/am/flushleft.m4 $(top_srcdir)/am/krb5.m4 \ -- $(top_srcdir)/am/libcurses.m4 $(top_srcdir)/am/libidn.m4 \ -- $(top_srcdir)/am/readline.m4 $(top_srcdir)/am/result.m4 \ -- $(top_srcdir)/configure.ac -+ $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/configure.ac - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) - DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ -@@ -342,6 +348,7 @@ - FTPD_LIBPAM = @FTPD_LIBPAM@ - GETADDRINFO_LIB = @GETADDRINFO_LIB@ - GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ -+GETOPT_CDEFS_H = @GETOPT_CDEFS_H@ - GETOPT_H = @GETOPT_H@ - GLIBC21 = @GLIBC21@ - GLOB_H = @GLOB_H@ -@@ -358,6 +365,7 @@ - GNULIB_CLOSE = @GNULIB_CLOSE@ - GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ - GNULIB_CONNECT = @GNULIB_CONNECT@ -+GNULIB_CTIME = @GNULIB_CTIME@ - GNULIB_DIRFD = @GNULIB_DIRFD@ - GNULIB_DPRINTF = @GNULIB_DPRINTF@ - GNULIB_DUP = @GNULIB_DUP@ -@@ -436,6 +444,7 @@ - GNULIB_LINKAT = @GNULIB_LINKAT@ - GNULIB_LISTEN = @GNULIB_LISTEN@ - GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ -+GNULIB_LOCALTIME = @GNULIB_LOCALTIME@ - GNULIB_LSEEK = @GNULIB_LSEEK@ - GNULIB_LSTAT = @GNULIB_LSTAT@ - GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ -@@ -483,6 +492,8 @@ - GNULIB_OPENAT = @GNULIB_OPENAT@ - GNULIB_OPENDIR = @GNULIB_OPENDIR@ - GNULIB_OPENPTY = @GNULIB_OPENPTY@ -+GNULIB_OVERRIDES_STRUCT_STAT = @GNULIB_OVERRIDES_STRUCT_STAT@ -+GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@ - GNULIB_PCLOSE = @GNULIB_PCLOSE@ - GNULIB_PERROR = @GNULIB_PERROR@ - GNULIB_PIPE = @GNULIB_PIPE@ -@@ -549,6 +560,7 @@ - GNULIB_STRDUP = @GNULIB_STRDUP@ - GNULIB_STRERROR = @GNULIB_STRERROR@ - GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ -+GNULIB_STRFTIME = @GNULIB_STRFTIME@ - GNULIB_STRNCAT = @GNULIB_STRNCAT@ - GNULIB_STRNDUP = @GNULIB_STRNDUP@ - GNULIB_STRNLEN = @GNULIB_STRNLEN@ -@@ -568,9 +580,12 @@ - GNULIB_TCGETSID = @GNULIB_TCGETSID@ - GNULIB_TIMEGM = @GNULIB_TIMEGM@ - GNULIB_TIME_R = @GNULIB_TIME_R@ -+GNULIB_TIME_RZ = @GNULIB_TIME_RZ@ - GNULIB_TMPFILE = @GNULIB_TMPFILE@ - GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ -+GNULIB_TRUNCATE = @GNULIB_TRUNCATE@ - GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -+GNULIB_TZSET = @GNULIB_TZSET@ - GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ - GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ - GNULIB_UNLINK = @GNULIB_UNLINK@ -@@ -600,6 +615,7 @@ - GNULIB_WCSCPY = @GNULIB_WCSCPY@ - GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ - GNULIB_WCSDUP = @GNULIB_WCSDUP@ -+GNULIB_WCSFTIME = @GNULIB_WCSFTIME@ - GNULIB_WCSLEN = @GNULIB_WCSLEN@ - GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ - GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ -@@ -633,9 +649,11 @@ - HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ - HAVE_ATOLL = @HAVE_ATOLL@ - HAVE_BTOWC = @HAVE_BTOWC@ -+HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@ - HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ - HAVE_CHOWN = @HAVE_CHOWN@ - HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ -+HAVE_CRTDEFS_H = @HAVE_CRTDEFS_H@ - HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ - HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ - HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ -@@ -651,6 +669,7 @@ - HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ - HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ - HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ -+HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@ - HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ - HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ - HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ -@@ -769,6 +788,7 @@ - HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ - HAVE_PTY_H = @HAVE_PTY_H@ - HAVE_PWRITE = @HAVE_PWRITE@ -+HAVE_QSORT_R = @HAVE_QSORT_R@ - HAVE_RAISE = @HAVE_RAISE@ - HAVE_RANDOM = @HAVE_RANDOM@ - HAVE_RANDOM_H = @HAVE_RANDOM_H@ -@@ -830,7 +850,10 @@ - HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@ - HAVE_TERMIOS_H = @HAVE_TERMIOS_H@ - HAVE_TIMEGM = @HAVE_TIMEGM@ -+HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@ -+HAVE_TRUNCATE = @HAVE_TRUNCATE@ - HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ -+HAVE_TZSET = @HAVE_TZSET@ - HAVE_UNISTD_H = @HAVE_UNISTD_H@ - HAVE_UNLINKAT = @HAVE_UNLINKAT@ - HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ -@@ -853,6 +876,7 @@ - HAVE_WCSCPY = @HAVE_WCSCPY@ - HAVE_WCSCSPN = @HAVE_WCSCSPN@ - HAVE_WCSDUP = @HAVE_WCSDUP@ -+HAVE_WCSFTIME = @HAVE_WCSFTIME@ - HAVE_WCSLEN = @HAVE_WCSLEN@ - HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ - HAVE_WCSNCAT = @HAVE_WCSNCAT@ -@@ -920,8 +944,10 @@ - LIBTHREAD = @LIBTHREAD@ - LIBUTIL = @LIBUTIL@ - LIBWRAP = @LIBWRAP@ -+LIB_GETLOGIN = @LIB_GETLOGIN@ - LIB_POLL = @LIB_POLL@ - LIB_SELECT = @LIB_SELECT@ -+LIMITS_H = @LIMITS_H@ - LN_S = @LN_S@ - LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ - LOCALE_FR = @LOCALE_FR@ -@@ -948,6 +974,7 @@ - NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ - NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ - NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ -+NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@ - NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ - NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ - NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ -@@ -980,6 +1007,7 @@ - NEXT_FLOAT_H = @NEXT_FLOAT_H@ - NEXT_GETOPT_H = @NEXT_GETOPT_H@ - NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ -+NEXT_LIMITS_H = @NEXT_LIMITS_H@ - NEXT_LOCALE_H = @NEXT_LOCALE_H@ - NEXT_NETDB_H = @NEXT_NETDB_H@ - NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ -@@ -1027,6 +1055,7 @@ - REPLACE_CHOWN = @REPLACE_CHOWN@ - REPLACE_CLOSE = @REPLACE_CLOSE@ - REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ -+REPLACE_CTIME = @REPLACE_CTIME@ - REPLACE_DIRFD = @REPLACE_DIRFD@ - REPLACE_DPRINTF = @REPLACE_DPRINTF@ - REPLACE_DUP = @REPLACE_DUP@ -@@ -1138,6 +1167,7 @@ - REPLACE_STRDUP = @REPLACE_STRDUP@ - REPLACE_STRERROR = @REPLACE_STRERROR@ - REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ -+REPLACE_STRFTIME = @REPLACE_STRFTIME@ - REPLACE_STRNCAT = @REPLACE_STRNCAT@ - REPLACE_STRNDUP = @REPLACE_STRNDUP@ - REPLACE_STRNLEN = @REPLACE_STRNLEN@ -@@ -1152,7 +1182,9 @@ - REPLACE_TIMEGM = @REPLACE_TIMEGM@ - REPLACE_TMPFILE = @REPLACE_TMPFILE@ - REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ -+REPLACE_TRUNCATE = @REPLACE_TRUNCATE@ - REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ -+REPLACE_TZSET = @REPLACE_TZSET@ - REPLACE_UNLINK = @REPLACE_UNLINK@ - REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ - REPLACE_UNSETENV = @REPLACE_UNSETENV@ -@@ -1165,6 +1197,7 @@ - REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ - REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ - REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ -+REPLACE_WCSFTIME = @REPLACE_WCSFTIME@ - REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ - REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ - REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ -@@ -1201,6 +1234,8 @@ - WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ - WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ - WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ -+WINDOWS_STAT_INODES = @WINDOWS_STAT_INODES@ -+WINDOWS_STAT_TIMESPEC = @WINDOWS_STAT_TIMESPEC@ - WINT_T_SUFFIX = @WINT_T_SUFFIX@ - YACC = @YACC@ - YFLAGS = @YFLAGS@ -diff -durN inetutils-1.9.4.orig/telnetd/Makefile.in inetutils-1.9.4/telnetd/Makefile.in ---- inetutils-1.9.4.orig/telnetd/Makefile.in 2015-06-09 15:48:11.000000000 +0800 -+++ inetutils-1.9.4/telnetd/Makefile.in 2017-05-15 17:58:19.468750000 +0800 -@@ -112,10 +112,18 @@ - EXTRA_PROGRAMS = telnetd$(EXEEXT) - subdir = telnetd - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 --am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ -+am__aclocal_m4_deps = $(top_srcdir)/am/check_macro.m4 \ -+ $(top_srcdir)/am/check_member.m4 \ -+ $(top_srcdir)/am/check_weak_refs.m4 \ -+ $(top_srcdir)/am/config_paths.m4 $(top_srcdir)/am/enable.m4 \ -+ $(top_srcdir)/am/flushleft.m4 $(top_srcdir)/am/krb5.m4 \ -+ $(top_srcdir)/am/libcurses.m4 $(top_srcdir)/am/libidn.m4 \ -+ $(top_srcdir)/am/readline.m4 $(top_srcdir)/am/result.m4 \ -+ $(top_srcdir)/m4/00gnulib.m4 \ - $(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \ - $(top_srcdir)/m4/argp.m4 $(top_srcdir)/m4/arpa_inet_h.m4 \ - $(top_srcdir)/m4/autobuild.m4 $(top_srcdir)/m4/btowc.m4 \ -+ $(top_srcdir)/m4/builtin-expect.m4 \ - $(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/close.m4 \ - $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/codeset.m4 \ - $(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/d-ino.m4 \ -@@ -130,51 +138,56 @@ - $(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl.m4 \ - $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopendir.m4 \ - $(top_srcdir)/m4/filemode.m4 $(top_srcdir)/m4/filenamecat.m4 \ -- $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fnmatch.m4 \ -- $(top_srcdir)/m4/fopen.m4 $(top_srcdir)/m4/fseek.m4 \ -- $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/fstat.m4 \ -- $(top_srcdir)/m4/fstatat.m4 $(top_srcdir)/m4/ftell.m4 \ -- $(top_srcdir)/m4/ftello.m4 $(top_srcdir)/m4/getaddrinfo.m4 \ -+ $(top_srcdir)/m4/flexmember.m4 $(top_srcdir)/m4/float_h.m4 \ -+ $(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fopen.m4 \ -+ $(top_srcdir)/m4/fseek.m4 $(top_srcdir)/m4/fseeko.m4 \ -+ $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/fstatat.m4 \ -+ $(top_srcdir)/m4/ftell.m4 $(top_srcdir)/m4/ftello.m4 \ -+ $(top_srcdir)/m4/getaddrinfo.m4 \ - $(top_srcdir)/m4/getcwd-abort-bug.m4 \ - $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \ - $(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getdomainname.m4 \ - $(top_srcdir)/m4/getdtablesize.m4 \ - $(top_srcdir)/m4/getgroups.m4 $(top_srcdir)/m4/gethostname.m4 \ -- $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getlogin_r.m4 \ -- $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpass.m4 \ -+ $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getlogin.m4 \ -+ $(top_srcdir)/m4/getlogin_r.m4 $(top_srcdir)/m4/getopt.m4 \ -+ $(top_srcdir)/m4/getpass.m4 $(top_srcdir)/m4/getprogname.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettimeofday.m4 \ - $(top_srcdir)/m4/getugroups.m4 \ - $(top_srcdir)/m4/getusershell.m4 $(top_srcdir)/m4/glibc21.m4 \ - $(top_srcdir)/m4/glob.m4 $(top_srcdir)/m4/gnulib-common.m4 \ -- $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/hostent.m4 \ -+ $(top_srcdir)/m4/gnulib-comp.m4 \ -+ $(top_srcdir)/m4/hard-locale.m4 $(top_srcdir)/m4/hostent.m4 \ - $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inet_ntop.m4 \ - $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttostr.m4 \ - $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/ioctl.m4 \ - $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ -- $(top_srcdir)/m4/lib-prefix.m4 \ -+ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/limits-h.m4 \ - $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \ - $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \ - $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localeconv.m4 \ -- $(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/longlong.m4 \ -- $(top_srcdir)/m4/lseek.m4 $(top_srcdir)/m4/lstat.m4 \ -- $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \ -- $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \ -- $(top_srcdir)/m4/mbsrtowcs.m4 $(top_srcdir)/m4/mbstate_t.m4 \ -- $(top_srcdir)/m4/mbtowc.m4 $(top_srcdir)/m4/memchr.m4 \ -- $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/memrchr.m4 \ -- $(top_srcdir)/m4/mgetgroups.m4 $(top_srcdir)/m4/minmax.m4 \ -- $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mmap-anon.m4 \ -- $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \ -+ $(top_srcdir)/m4/localtime-buffer.m4 $(top_srcdir)/m4/lock.m4 \ -+ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \ -+ $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/malloc.m4 \ -+ $(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/mbrtowc.m4 \ -+ $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbsrtowcs.m4 \ -+ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ -+ $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mempcpy.m4 \ -+ $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/mgetgroups.m4 \ -+ $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkstemp.m4 \ -+ $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/mode_t.m4 \ -+ $(top_srcdir)/m4/msvc-inval.m4 \ - $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \ - $(top_srcdir)/m4/netdb_h.m4 $(top_srcdir)/m4/netinet_in_h.m4 \ - $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nocrash.m4 \ - $(top_srcdir)/m4/obstack.m4 $(top_srcdir)/m4/off_t.m4 \ -- $(top_srcdir)/m4/onceonly.m4 $(top_srcdir)/m4/open.m4 \ -- $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/opendir.m4 \ -- $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \ -- $(top_srcdir)/m4/poll.m4 $(top_srcdir)/m4/poll_h.m4 \ -- $(top_srcdir)/m4/posix_openpt.m4 $(top_srcdir)/m4/printf.m4 \ -+ $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/openat.m4 \ -+ $(top_srcdir)/m4/opendir.m4 $(top_srcdir)/m4/pathmax.m4 \ -+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/poll.m4 \ -+ $(top_srcdir)/m4/poll_h.m4 $(top_srcdir)/m4/posix_openpt.m4 \ -+ $(top_srcdir)/m4/printf.m4 \ -+ $(top_srcdir)/m4/pthread_rwlock_rdlock.m4 \ - $(top_srcdir)/m4/pty.m4 $(top_srcdir)/m4/pty_h.m4 \ - $(top_srcdir)/m4/rawmemchr.m4 $(top_srcdir)/m4/read-file.m4 \ - $(top_srcdir)/m4/readdir.m4 $(top_srcdir)/m4/readutmp.m4 \ -@@ -211,14 +224,7 @@ - $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctype_h.m4 \ - $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \ - $(top_srcdir)/m4/xgetcwd.m4 $(top_srcdir)/m4/xsize.m4 \ -- $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/am/check_macro.m4 \ -- $(top_srcdir)/am/check_member.m4 \ -- $(top_srcdir)/am/check_weak_refs.m4 \ -- $(top_srcdir)/am/config_paths.m4 $(top_srcdir)/am/enable.m4 \ -- $(top_srcdir)/am/flushleft.m4 $(top_srcdir)/am/krb5.m4 \ -- $(top_srcdir)/am/libcurses.m4 $(top_srcdir)/am/libidn.m4 \ -- $(top_srcdir)/am/readline.m4 $(top_srcdir)/am/result.m4 \ -- $(top_srcdir)/configure.ac -+ $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/configure.ac - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) - DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ -@@ -343,6 +349,7 @@ - FTPD_LIBPAM = @FTPD_LIBPAM@ - GETADDRINFO_LIB = @GETADDRINFO_LIB@ - GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ -+GETOPT_CDEFS_H = @GETOPT_CDEFS_H@ - GETOPT_H = @GETOPT_H@ - GLIBC21 = @GLIBC21@ - GLOB_H = @GLOB_H@ -@@ -359,6 +366,7 @@ - GNULIB_CLOSE = @GNULIB_CLOSE@ - GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ - GNULIB_CONNECT = @GNULIB_CONNECT@ -+GNULIB_CTIME = @GNULIB_CTIME@ - GNULIB_DIRFD = @GNULIB_DIRFD@ - GNULIB_DPRINTF = @GNULIB_DPRINTF@ - GNULIB_DUP = @GNULIB_DUP@ -@@ -437,6 +445,7 @@ - GNULIB_LINKAT = @GNULIB_LINKAT@ - GNULIB_LISTEN = @GNULIB_LISTEN@ - GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ -+GNULIB_LOCALTIME = @GNULIB_LOCALTIME@ - GNULIB_LSEEK = @GNULIB_LSEEK@ - GNULIB_LSTAT = @GNULIB_LSTAT@ - GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ -@@ -484,6 +493,8 @@ - GNULIB_OPENAT = @GNULIB_OPENAT@ - GNULIB_OPENDIR = @GNULIB_OPENDIR@ - GNULIB_OPENPTY = @GNULIB_OPENPTY@ -+GNULIB_OVERRIDES_STRUCT_STAT = @GNULIB_OVERRIDES_STRUCT_STAT@ -+GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@ - GNULIB_PCLOSE = @GNULIB_PCLOSE@ - GNULIB_PERROR = @GNULIB_PERROR@ - GNULIB_PIPE = @GNULIB_PIPE@ -@@ -550,6 +561,7 @@ - GNULIB_STRDUP = @GNULIB_STRDUP@ - GNULIB_STRERROR = @GNULIB_STRERROR@ - GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ -+GNULIB_STRFTIME = @GNULIB_STRFTIME@ - GNULIB_STRNCAT = @GNULIB_STRNCAT@ - GNULIB_STRNDUP = @GNULIB_STRNDUP@ - GNULIB_STRNLEN = @GNULIB_STRNLEN@ -@@ -569,9 +581,12 @@ - GNULIB_TCGETSID = @GNULIB_TCGETSID@ - GNULIB_TIMEGM = @GNULIB_TIMEGM@ - GNULIB_TIME_R = @GNULIB_TIME_R@ -+GNULIB_TIME_RZ = @GNULIB_TIME_RZ@ - GNULIB_TMPFILE = @GNULIB_TMPFILE@ - GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ -+GNULIB_TRUNCATE = @GNULIB_TRUNCATE@ - GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -+GNULIB_TZSET = @GNULIB_TZSET@ - GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ - GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ - GNULIB_UNLINK = @GNULIB_UNLINK@ -@@ -601,6 +616,7 @@ - GNULIB_WCSCPY = @GNULIB_WCSCPY@ - GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ - GNULIB_WCSDUP = @GNULIB_WCSDUP@ -+GNULIB_WCSFTIME = @GNULIB_WCSFTIME@ - GNULIB_WCSLEN = @GNULIB_WCSLEN@ - GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ - GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ -@@ -634,9 +650,11 @@ - HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ - HAVE_ATOLL = @HAVE_ATOLL@ - HAVE_BTOWC = @HAVE_BTOWC@ -+HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@ - HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ - HAVE_CHOWN = @HAVE_CHOWN@ - HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ -+HAVE_CRTDEFS_H = @HAVE_CRTDEFS_H@ - HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ - HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ - HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ -@@ -652,6 +670,7 @@ - HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ - HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ - HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ -+HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@ - HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ - HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ - HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ -@@ -770,6 +789,7 @@ - HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ - HAVE_PTY_H = @HAVE_PTY_H@ - HAVE_PWRITE = @HAVE_PWRITE@ -+HAVE_QSORT_R = @HAVE_QSORT_R@ - HAVE_RAISE = @HAVE_RAISE@ - HAVE_RANDOM = @HAVE_RANDOM@ - HAVE_RANDOM_H = @HAVE_RANDOM_H@ -@@ -831,7 +851,10 @@ - HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@ - HAVE_TERMIOS_H = @HAVE_TERMIOS_H@ - HAVE_TIMEGM = @HAVE_TIMEGM@ -+HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@ -+HAVE_TRUNCATE = @HAVE_TRUNCATE@ - HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ -+HAVE_TZSET = @HAVE_TZSET@ - HAVE_UNISTD_H = @HAVE_UNISTD_H@ - HAVE_UNLINKAT = @HAVE_UNLINKAT@ - HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ -@@ -854,6 +877,7 @@ - HAVE_WCSCPY = @HAVE_WCSCPY@ - HAVE_WCSCSPN = @HAVE_WCSCSPN@ - HAVE_WCSDUP = @HAVE_WCSDUP@ -+HAVE_WCSFTIME = @HAVE_WCSFTIME@ - HAVE_WCSLEN = @HAVE_WCSLEN@ - HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ - HAVE_WCSNCAT = @HAVE_WCSNCAT@ -@@ -921,8 +945,10 @@ - LIBTHREAD = @LIBTHREAD@ - LIBUTIL = @LIBUTIL@ - LIBWRAP = @LIBWRAP@ -+LIB_GETLOGIN = @LIB_GETLOGIN@ - LIB_POLL = @LIB_POLL@ - LIB_SELECT = @LIB_SELECT@ -+LIMITS_H = @LIMITS_H@ - LN_S = @LN_S@ - LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ - LOCALE_FR = @LOCALE_FR@ -@@ -949,6 +975,7 @@ - NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ - NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ - NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ -+NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@ - NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ - NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ - NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ -@@ -981,6 +1008,7 @@ - NEXT_FLOAT_H = @NEXT_FLOAT_H@ - NEXT_GETOPT_H = @NEXT_GETOPT_H@ - NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ -+NEXT_LIMITS_H = @NEXT_LIMITS_H@ - NEXT_LOCALE_H = @NEXT_LOCALE_H@ - NEXT_NETDB_H = @NEXT_NETDB_H@ - NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ -@@ -1028,6 +1056,7 @@ - REPLACE_CHOWN = @REPLACE_CHOWN@ - REPLACE_CLOSE = @REPLACE_CLOSE@ - REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ -+REPLACE_CTIME = @REPLACE_CTIME@ - REPLACE_DIRFD = @REPLACE_DIRFD@ - REPLACE_DPRINTF = @REPLACE_DPRINTF@ - REPLACE_DUP = @REPLACE_DUP@ -@@ -1139,6 +1168,7 @@ - REPLACE_STRDUP = @REPLACE_STRDUP@ - REPLACE_STRERROR = @REPLACE_STRERROR@ - REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ -+REPLACE_STRFTIME = @REPLACE_STRFTIME@ - REPLACE_STRNCAT = @REPLACE_STRNCAT@ - REPLACE_STRNDUP = @REPLACE_STRNDUP@ - REPLACE_STRNLEN = @REPLACE_STRNLEN@ -@@ -1153,7 +1183,9 @@ - REPLACE_TIMEGM = @REPLACE_TIMEGM@ - REPLACE_TMPFILE = @REPLACE_TMPFILE@ - REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ -+REPLACE_TRUNCATE = @REPLACE_TRUNCATE@ - REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ -+REPLACE_TZSET = @REPLACE_TZSET@ - REPLACE_UNLINK = @REPLACE_UNLINK@ - REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ - REPLACE_UNSETENV = @REPLACE_UNSETENV@ -@@ -1166,6 +1198,7 @@ - REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ - REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ - REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ -+REPLACE_WCSFTIME = @REPLACE_WCSFTIME@ - REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ - REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ - REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ -@@ -1202,6 +1235,8 @@ - WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ - WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ - WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ -+WINDOWS_STAT_INODES = @WINDOWS_STAT_INODES@ -+WINDOWS_STAT_TIMESPEC = @WINDOWS_STAT_TIMESPEC@ - WINT_T_SUFFIX = @WINT_T_SUFFIX@ - YACC = @YACC@ - YFLAGS = @YFLAGS@ -diff -durN inetutils-1.9.4.orig/tests/Makefile.in inetutils-1.9.4/tests/Makefile.in ---- inetutils-1.9.4.orig/tests/Makefile.in 2015-06-09 15:48:11.000000000 +0800 -+++ inetutils-1.9.4/tests/Makefile.in 2017-05-15 17:58:19.875000000 +0800 -@@ -125,10 +125,18 @@ - TESTS = localhost$(EXEEXT) waitdaemon$(EXEEXT) $(dist_check_SCRIPTS) - subdir = tests - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 --am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ -+am__aclocal_m4_deps = $(top_srcdir)/am/check_macro.m4 \ -+ $(top_srcdir)/am/check_member.m4 \ -+ $(top_srcdir)/am/check_weak_refs.m4 \ -+ $(top_srcdir)/am/config_paths.m4 $(top_srcdir)/am/enable.m4 \ -+ $(top_srcdir)/am/flushleft.m4 $(top_srcdir)/am/krb5.m4 \ -+ $(top_srcdir)/am/libcurses.m4 $(top_srcdir)/am/libidn.m4 \ -+ $(top_srcdir)/am/readline.m4 $(top_srcdir)/am/result.m4 \ -+ $(top_srcdir)/m4/00gnulib.m4 \ - $(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \ - $(top_srcdir)/m4/argp.m4 $(top_srcdir)/m4/arpa_inet_h.m4 \ - $(top_srcdir)/m4/autobuild.m4 $(top_srcdir)/m4/btowc.m4 \ -+ $(top_srcdir)/m4/builtin-expect.m4 \ - $(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/close.m4 \ - $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/codeset.m4 \ - $(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/d-ino.m4 \ -@@ -143,51 +151,56 @@ - $(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl.m4 \ - $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopendir.m4 \ - $(top_srcdir)/m4/filemode.m4 $(top_srcdir)/m4/filenamecat.m4 \ -- $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fnmatch.m4 \ -- $(top_srcdir)/m4/fopen.m4 $(top_srcdir)/m4/fseek.m4 \ -- $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/fstat.m4 \ -- $(top_srcdir)/m4/fstatat.m4 $(top_srcdir)/m4/ftell.m4 \ -- $(top_srcdir)/m4/ftello.m4 $(top_srcdir)/m4/getaddrinfo.m4 \ -+ $(top_srcdir)/m4/flexmember.m4 $(top_srcdir)/m4/float_h.m4 \ -+ $(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fopen.m4 \ -+ $(top_srcdir)/m4/fseek.m4 $(top_srcdir)/m4/fseeko.m4 \ -+ $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/fstatat.m4 \ -+ $(top_srcdir)/m4/ftell.m4 $(top_srcdir)/m4/ftello.m4 \ -+ $(top_srcdir)/m4/getaddrinfo.m4 \ - $(top_srcdir)/m4/getcwd-abort-bug.m4 \ - $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \ - $(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getdomainname.m4 \ - $(top_srcdir)/m4/getdtablesize.m4 \ - $(top_srcdir)/m4/getgroups.m4 $(top_srcdir)/m4/gethostname.m4 \ -- $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getlogin_r.m4 \ -- $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpass.m4 \ -+ $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getlogin.m4 \ -+ $(top_srcdir)/m4/getlogin_r.m4 $(top_srcdir)/m4/getopt.m4 \ -+ $(top_srcdir)/m4/getpass.m4 $(top_srcdir)/m4/getprogname.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettimeofday.m4 \ - $(top_srcdir)/m4/getugroups.m4 \ - $(top_srcdir)/m4/getusershell.m4 $(top_srcdir)/m4/glibc21.m4 \ - $(top_srcdir)/m4/glob.m4 $(top_srcdir)/m4/gnulib-common.m4 \ -- $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/hostent.m4 \ -+ $(top_srcdir)/m4/gnulib-comp.m4 \ -+ $(top_srcdir)/m4/hard-locale.m4 $(top_srcdir)/m4/hostent.m4 \ - $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inet_ntop.m4 \ - $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttostr.m4 \ - $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/ioctl.m4 \ - $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ -- $(top_srcdir)/m4/lib-prefix.m4 \ -+ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/limits-h.m4 \ - $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \ - $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \ - $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localeconv.m4 \ -- $(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/longlong.m4 \ -- $(top_srcdir)/m4/lseek.m4 $(top_srcdir)/m4/lstat.m4 \ -- $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \ -- $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \ -- $(top_srcdir)/m4/mbsrtowcs.m4 $(top_srcdir)/m4/mbstate_t.m4 \ -- $(top_srcdir)/m4/mbtowc.m4 $(top_srcdir)/m4/memchr.m4 \ -- $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/memrchr.m4 \ -- $(top_srcdir)/m4/mgetgroups.m4 $(top_srcdir)/m4/minmax.m4 \ -- $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mmap-anon.m4 \ -- $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \ -+ $(top_srcdir)/m4/localtime-buffer.m4 $(top_srcdir)/m4/lock.m4 \ -+ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \ -+ $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/malloc.m4 \ -+ $(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/mbrtowc.m4 \ -+ $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbsrtowcs.m4 \ -+ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ -+ $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mempcpy.m4 \ -+ $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/mgetgroups.m4 \ -+ $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkstemp.m4 \ -+ $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/mode_t.m4 \ -+ $(top_srcdir)/m4/msvc-inval.m4 \ - $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \ - $(top_srcdir)/m4/netdb_h.m4 $(top_srcdir)/m4/netinet_in_h.m4 \ - $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nocrash.m4 \ - $(top_srcdir)/m4/obstack.m4 $(top_srcdir)/m4/off_t.m4 \ -- $(top_srcdir)/m4/onceonly.m4 $(top_srcdir)/m4/open.m4 \ -- $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/opendir.m4 \ -- $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \ -- $(top_srcdir)/m4/poll.m4 $(top_srcdir)/m4/poll_h.m4 \ -- $(top_srcdir)/m4/posix_openpt.m4 $(top_srcdir)/m4/printf.m4 \ -+ $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/openat.m4 \ -+ $(top_srcdir)/m4/opendir.m4 $(top_srcdir)/m4/pathmax.m4 \ -+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/poll.m4 \ -+ $(top_srcdir)/m4/poll_h.m4 $(top_srcdir)/m4/posix_openpt.m4 \ -+ $(top_srcdir)/m4/printf.m4 \ -+ $(top_srcdir)/m4/pthread_rwlock_rdlock.m4 \ - $(top_srcdir)/m4/pty.m4 $(top_srcdir)/m4/pty_h.m4 \ - $(top_srcdir)/m4/rawmemchr.m4 $(top_srcdir)/m4/read-file.m4 \ - $(top_srcdir)/m4/readdir.m4 $(top_srcdir)/m4/readutmp.m4 \ -@@ -224,14 +237,7 @@ - $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctype_h.m4 \ - $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \ - $(top_srcdir)/m4/xgetcwd.m4 $(top_srcdir)/m4/xsize.m4 \ -- $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/am/check_macro.m4 \ -- $(top_srcdir)/am/check_member.m4 \ -- $(top_srcdir)/am/check_weak_refs.m4 \ -- $(top_srcdir)/am/config_paths.m4 $(top_srcdir)/am/enable.m4 \ -- $(top_srcdir)/am/flushleft.m4 $(top_srcdir)/am/krb5.m4 \ -- $(top_srcdir)/am/libcurses.m4 $(top_srcdir)/am/libidn.m4 \ -- $(top_srcdir)/am/readline.m4 $(top_srcdir)/am/result.m4 \ -- $(top_srcdir)/configure.ac -+ $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/configure.ac - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) - DIST_COMMON = $(srcdir)/Makefile.am $(am__dist_check_SCRIPTS_DIST) \ -@@ -584,6 +590,7 @@ - FTPD_LIBPAM = @FTPD_LIBPAM@ - GETADDRINFO_LIB = @GETADDRINFO_LIB@ - GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ -+GETOPT_CDEFS_H = @GETOPT_CDEFS_H@ - GETOPT_H = @GETOPT_H@ - GLIBC21 = @GLIBC21@ - GLOB_H = @GLOB_H@ -@@ -600,6 +607,7 @@ - GNULIB_CLOSE = @GNULIB_CLOSE@ - GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ - GNULIB_CONNECT = @GNULIB_CONNECT@ -+GNULIB_CTIME = @GNULIB_CTIME@ - GNULIB_DIRFD = @GNULIB_DIRFD@ - GNULIB_DPRINTF = @GNULIB_DPRINTF@ - GNULIB_DUP = @GNULIB_DUP@ -@@ -678,6 +686,7 @@ - GNULIB_LINKAT = @GNULIB_LINKAT@ - GNULIB_LISTEN = @GNULIB_LISTEN@ - GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ -+GNULIB_LOCALTIME = @GNULIB_LOCALTIME@ - GNULIB_LSEEK = @GNULIB_LSEEK@ - GNULIB_LSTAT = @GNULIB_LSTAT@ - GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ -@@ -725,6 +734,8 @@ - GNULIB_OPENAT = @GNULIB_OPENAT@ - GNULIB_OPENDIR = @GNULIB_OPENDIR@ - GNULIB_OPENPTY = @GNULIB_OPENPTY@ -+GNULIB_OVERRIDES_STRUCT_STAT = @GNULIB_OVERRIDES_STRUCT_STAT@ -+GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@ - GNULIB_PCLOSE = @GNULIB_PCLOSE@ - GNULIB_PERROR = @GNULIB_PERROR@ - GNULIB_PIPE = @GNULIB_PIPE@ -@@ -791,6 +802,7 @@ - GNULIB_STRDUP = @GNULIB_STRDUP@ - GNULIB_STRERROR = @GNULIB_STRERROR@ - GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ -+GNULIB_STRFTIME = @GNULIB_STRFTIME@ - GNULIB_STRNCAT = @GNULIB_STRNCAT@ - GNULIB_STRNDUP = @GNULIB_STRNDUP@ - GNULIB_STRNLEN = @GNULIB_STRNLEN@ -@@ -810,9 +822,12 @@ - GNULIB_TCGETSID = @GNULIB_TCGETSID@ - GNULIB_TIMEGM = @GNULIB_TIMEGM@ - GNULIB_TIME_R = @GNULIB_TIME_R@ -+GNULIB_TIME_RZ = @GNULIB_TIME_RZ@ - GNULIB_TMPFILE = @GNULIB_TMPFILE@ - GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ -+GNULIB_TRUNCATE = @GNULIB_TRUNCATE@ - GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -+GNULIB_TZSET = @GNULIB_TZSET@ - GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ - GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ - GNULIB_UNLINK = @GNULIB_UNLINK@ -@@ -842,6 +857,7 @@ - GNULIB_WCSCPY = @GNULIB_WCSCPY@ - GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ - GNULIB_WCSDUP = @GNULIB_WCSDUP@ -+GNULIB_WCSFTIME = @GNULIB_WCSFTIME@ - GNULIB_WCSLEN = @GNULIB_WCSLEN@ - GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ - GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ -@@ -875,9 +891,11 @@ - HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ - HAVE_ATOLL = @HAVE_ATOLL@ - HAVE_BTOWC = @HAVE_BTOWC@ -+HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@ - HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ - HAVE_CHOWN = @HAVE_CHOWN@ - HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ -+HAVE_CRTDEFS_H = @HAVE_CRTDEFS_H@ - HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ - HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ - HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ -@@ -893,6 +911,7 @@ - HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ - HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ - HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ -+HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@ - HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ - HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ - HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ -@@ -1011,6 +1030,7 @@ - HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ - HAVE_PTY_H = @HAVE_PTY_H@ - HAVE_PWRITE = @HAVE_PWRITE@ -+HAVE_QSORT_R = @HAVE_QSORT_R@ - HAVE_RAISE = @HAVE_RAISE@ - HAVE_RANDOM = @HAVE_RANDOM@ - HAVE_RANDOM_H = @HAVE_RANDOM_H@ -@@ -1072,7 +1092,10 @@ - HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@ - HAVE_TERMIOS_H = @HAVE_TERMIOS_H@ - HAVE_TIMEGM = @HAVE_TIMEGM@ -+HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@ -+HAVE_TRUNCATE = @HAVE_TRUNCATE@ - HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ -+HAVE_TZSET = @HAVE_TZSET@ - HAVE_UNISTD_H = @HAVE_UNISTD_H@ - HAVE_UNLINKAT = @HAVE_UNLINKAT@ - HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ -@@ -1095,6 +1118,7 @@ - HAVE_WCSCPY = @HAVE_WCSCPY@ - HAVE_WCSCSPN = @HAVE_WCSCSPN@ - HAVE_WCSDUP = @HAVE_WCSDUP@ -+HAVE_WCSFTIME = @HAVE_WCSFTIME@ - HAVE_WCSLEN = @HAVE_WCSLEN@ - HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ - HAVE_WCSNCAT = @HAVE_WCSNCAT@ -@@ -1162,8 +1186,10 @@ - LIBTHREAD = @LIBTHREAD@ - LIBUTIL = @LIBUTIL@ - LIBWRAP = @LIBWRAP@ -+LIB_GETLOGIN = @LIB_GETLOGIN@ - LIB_POLL = @LIB_POLL@ - LIB_SELECT = @LIB_SELECT@ -+LIMITS_H = @LIMITS_H@ - LN_S = @LN_S@ - LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ - LOCALE_FR = @LOCALE_FR@ -@@ -1190,6 +1216,7 @@ - NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ - NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ - NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ -+NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@ - NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ - NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ - NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ -@@ -1222,6 +1249,7 @@ - NEXT_FLOAT_H = @NEXT_FLOAT_H@ - NEXT_GETOPT_H = @NEXT_GETOPT_H@ - NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ -+NEXT_LIMITS_H = @NEXT_LIMITS_H@ - NEXT_LOCALE_H = @NEXT_LOCALE_H@ - NEXT_NETDB_H = @NEXT_NETDB_H@ - NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ -@@ -1269,6 +1297,7 @@ - REPLACE_CHOWN = @REPLACE_CHOWN@ - REPLACE_CLOSE = @REPLACE_CLOSE@ - REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ -+REPLACE_CTIME = @REPLACE_CTIME@ - REPLACE_DIRFD = @REPLACE_DIRFD@ - REPLACE_DPRINTF = @REPLACE_DPRINTF@ - REPLACE_DUP = @REPLACE_DUP@ -@@ -1380,6 +1409,7 @@ - REPLACE_STRDUP = @REPLACE_STRDUP@ - REPLACE_STRERROR = @REPLACE_STRERROR@ - REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ -+REPLACE_STRFTIME = @REPLACE_STRFTIME@ - REPLACE_STRNCAT = @REPLACE_STRNCAT@ - REPLACE_STRNDUP = @REPLACE_STRNDUP@ - REPLACE_STRNLEN = @REPLACE_STRNLEN@ -@@ -1394,7 +1424,9 @@ - REPLACE_TIMEGM = @REPLACE_TIMEGM@ - REPLACE_TMPFILE = @REPLACE_TMPFILE@ - REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ -+REPLACE_TRUNCATE = @REPLACE_TRUNCATE@ - REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ -+REPLACE_TZSET = @REPLACE_TZSET@ - REPLACE_UNLINK = @REPLACE_UNLINK@ - REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ - REPLACE_UNSETENV = @REPLACE_UNSETENV@ -@@ -1407,6 +1439,7 @@ - REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ - REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ - REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ -+REPLACE_WCSFTIME = @REPLACE_WCSFTIME@ - REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ - REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ - REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ -@@ -1443,6 +1476,8 @@ - WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ - WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ - WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ -+WINDOWS_STAT_INODES = @WINDOWS_STAT_INODES@ -+WINDOWS_STAT_TIMESPEC = @WINDOWS_STAT_TIMESPEC@ - WINT_T_SUFFIX = @WINT_T_SUFFIX@ - YACC = @YACC@ - YFLAGS = @YFLAGS@ -diff -durN inetutils-1.9.4.orig/whois/Makefile.in inetutils-1.9.4/whois/Makefile.in ---- inetutils-1.9.4.orig/whois/Makefile.in 2015-06-09 15:48:11.000000000 +0800 -+++ inetutils-1.9.4/whois/Makefile.in 2017-05-15 17:58:20.156250000 +0800 -@@ -111,10 +111,18 @@ - EXTRA_PROGRAMS = whois$(EXEEXT) - subdir = whois - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 --am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ -+am__aclocal_m4_deps = $(top_srcdir)/am/check_macro.m4 \ -+ $(top_srcdir)/am/check_member.m4 \ -+ $(top_srcdir)/am/check_weak_refs.m4 \ -+ $(top_srcdir)/am/config_paths.m4 $(top_srcdir)/am/enable.m4 \ -+ $(top_srcdir)/am/flushleft.m4 $(top_srcdir)/am/krb5.m4 \ -+ $(top_srcdir)/am/libcurses.m4 $(top_srcdir)/am/libidn.m4 \ -+ $(top_srcdir)/am/readline.m4 $(top_srcdir)/am/result.m4 \ -+ $(top_srcdir)/m4/00gnulib.m4 \ - $(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \ - $(top_srcdir)/m4/argp.m4 $(top_srcdir)/m4/arpa_inet_h.m4 \ - $(top_srcdir)/m4/autobuild.m4 $(top_srcdir)/m4/btowc.m4 \ -+ $(top_srcdir)/m4/builtin-expect.m4 \ - $(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/close.m4 \ - $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/codeset.m4 \ - $(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/d-ino.m4 \ -@@ -129,51 +137,56 @@ - $(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl.m4 \ - $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopendir.m4 \ - $(top_srcdir)/m4/filemode.m4 $(top_srcdir)/m4/filenamecat.m4 \ -- $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fnmatch.m4 \ -- $(top_srcdir)/m4/fopen.m4 $(top_srcdir)/m4/fseek.m4 \ -- $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/fstat.m4 \ -- $(top_srcdir)/m4/fstatat.m4 $(top_srcdir)/m4/ftell.m4 \ -- $(top_srcdir)/m4/ftello.m4 $(top_srcdir)/m4/getaddrinfo.m4 \ -+ $(top_srcdir)/m4/flexmember.m4 $(top_srcdir)/m4/float_h.m4 \ -+ $(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fopen.m4 \ -+ $(top_srcdir)/m4/fseek.m4 $(top_srcdir)/m4/fseeko.m4 \ -+ $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/fstatat.m4 \ -+ $(top_srcdir)/m4/ftell.m4 $(top_srcdir)/m4/ftello.m4 \ -+ $(top_srcdir)/m4/getaddrinfo.m4 \ - $(top_srcdir)/m4/getcwd-abort-bug.m4 \ - $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \ - $(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getdomainname.m4 \ - $(top_srcdir)/m4/getdtablesize.m4 \ - $(top_srcdir)/m4/getgroups.m4 $(top_srcdir)/m4/gethostname.m4 \ -- $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getlogin_r.m4 \ -- $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpass.m4 \ -+ $(top_srcdir)/m4/getline.m4 $(top_srcdir)/m4/getlogin.m4 \ -+ $(top_srcdir)/m4/getlogin_r.m4 $(top_srcdir)/m4/getopt.m4 \ -+ $(top_srcdir)/m4/getpass.m4 $(top_srcdir)/m4/getprogname.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettimeofday.m4 \ - $(top_srcdir)/m4/getugroups.m4 \ - $(top_srcdir)/m4/getusershell.m4 $(top_srcdir)/m4/glibc21.m4 \ - $(top_srcdir)/m4/glob.m4 $(top_srcdir)/m4/gnulib-common.m4 \ -- $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/hostent.m4 \ -+ $(top_srcdir)/m4/gnulib-comp.m4 \ -+ $(top_srcdir)/m4/hard-locale.m4 $(top_srcdir)/m4/hostent.m4 \ - $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inet_ntop.m4 \ - $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttostr.m4 \ - $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/ioctl.m4 \ - $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ -- $(top_srcdir)/m4/lib-prefix.m4 \ -+ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/limits-h.m4 \ - $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \ - $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \ - $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localeconv.m4 \ -- $(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/longlong.m4 \ -- $(top_srcdir)/m4/lseek.m4 $(top_srcdir)/m4/lstat.m4 \ -- $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \ -- $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \ -- $(top_srcdir)/m4/mbsrtowcs.m4 $(top_srcdir)/m4/mbstate_t.m4 \ -- $(top_srcdir)/m4/mbtowc.m4 $(top_srcdir)/m4/memchr.m4 \ -- $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/memrchr.m4 \ -- $(top_srcdir)/m4/mgetgroups.m4 $(top_srcdir)/m4/minmax.m4 \ -- $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mmap-anon.m4 \ -- $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \ -+ $(top_srcdir)/m4/localtime-buffer.m4 $(top_srcdir)/m4/lock.m4 \ -+ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \ -+ $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/malloc.m4 \ -+ $(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/mbrtowc.m4 \ -+ $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbsrtowcs.m4 \ -+ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \ -+ $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mempcpy.m4 \ -+ $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/mgetgroups.m4 \ -+ $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkstemp.m4 \ -+ $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/mode_t.m4 \ -+ $(top_srcdir)/m4/msvc-inval.m4 \ - $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \ - $(top_srcdir)/m4/netdb_h.m4 $(top_srcdir)/m4/netinet_in_h.m4 \ - $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nocrash.m4 \ - $(top_srcdir)/m4/obstack.m4 $(top_srcdir)/m4/off_t.m4 \ -- $(top_srcdir)/m4/onceonly.m4 $(top_srcdir)/m4/open.m4 \ -- $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/opendir.m4 \ -- $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \ -- $(top_srcdir)/m4/poll.m4 $(top_srcdir)/m4/poll_h.m4 \ -- $(top_srcdir)/m4/posix_openpt.m4 $(top_srcdir)/m4/printf.m4 \ -+ $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/openat.m4 \ -+ $(top_srcdir)/m4/opendir.m4 $(top_srcdir)/m4/pathmax.m4 \ -+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/poll.m4 \ -+ $(top_srcdir)/m4/poll_h.m4 $(top_srcdir)/m4/posix_openpt.m4 \ -+ $(top_srcdir)/m4/printf.m4 \ -+ $(top_srcdir)/m4/pthread_rwlock_rdlock.m4 \ - $(top_srcdir)/m4/pty.m4 $(top_srcdir)/m4/pty_h.m4 \ - $(top_srcdir)/m4/rawmemchr.m4 $(top_srcdir)/m4/read-file.m4 \ - $(top_srcdir)/m4/readdir.m4 $(top_srcdir)/m4/readutmp.m4 \ -@@ -210,14 +223,7 @@ - $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctype_h.m4 \ - $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \ - $(top_srcdir)/m4/xgetcwd.m4 $(top_srcdir)/m4/xsize.m4 \ -- $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/am/check_macro.m4 \ -- $(top_srcdir)/am/check_member.m4 \ -- $(top_srcdir)/am/check_weak_refs.m4 \ -- $(top_srcdir)/am/config_paths.m4 $(top_srcdir)/am/enable.m4 \ -- $(top_srcdir)/am/flushleft.m4 $(top_srcdir)/am/krb5.m4 \ -- $(top_srcdir)/am/libcurses.m4 $(top_srcdir)/am/libidn.m4 \ -- $(top_srcdir)/am/readline.m4 $(top_srcdir)/am/result.m4 \ -- $(top_srcdir)/configure.ac -+ $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/configure.ac - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) - DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ -@@ -336,6 +342,7 @@ - FTPD_LIBPAM = @FTPD_LIBPAM@ - GETADDRINFO_LIB = @GETADDRINFO_LIB@ - GETHOSTNAME_LIB = @GETHOSTNAME_LIB@ -+GETOPT_CDEFS_H = @GETOPT_CDEFS_H@ - GETOPT_H = @GETOPT_H@ - GLIBC21 = @GLIBC21@ - GLOB_H = @GLOB_H@ -@@ -352,6 +359,7 @@ - GNULIB_CLOSE = @GNULIB_CLOSE@ - GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@ - GNULIB_CONNECT = @GNULIB_CONNECT@ -+GNULIB_CTIME = @GNULIB_CTIME@ - GNULIB_DIRFD = @GNULIB_DIRFD@ - GNULIB_DPRINTF = @GNULIB_DPRINTF@ - GNULIB_DUP = @GNULIB_DUP@ -@@ -430,6 +438,7 @@ - GNULIB_LINKAT = @GNULIB_LINKAT@ - GNULIB_LISTEN = @GNULIB_LISTEN@ - GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ -+GNULIB_LOCALTIME = @GNULIB_LOCALTIME@ - GNULIB_LSEEK = @GNULIB_LSEEK@ - GNULIB_LSTAT = @GNULIB_LSTAT@ - GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ -@@ -477,6 +486,8 @@ - GNULIB_OPENAT = @GNULIB_OPENAT@ - GNULIB_OPENDIR = @GNULIB_OPENDIR@ - GNULIB_OPENPTY = @GNULIB_OPENPTY@ -+GNULIB_OVERRIDES_STRUCT_STAT = @GNULIB_OVERRIDES_STRUCT_STAT@ -+GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@ - GNULIB_PCLOSE = @GNULIB_PCLOSE@ - GNULIB_PERROR = @GNULIB_PERROR@ - GNULIB_PIPE = @GNULIB_PIPE@ -@@ -543,6 +554,7 @@ - GNULIB_STRDUP = @GNULIB_STRDUP@ - GNULIB_STRERROR = @GNULIB_STRERROR@ - GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ -+GNULIB_STRFTIME = @GNULIB_STRFTIME@ - GNULIB_STRNCAT = @GNULIB_STRNCAT@ - GNULIB_STRNDUP = @GNULIB_STRNDUP@ - GNULIB_STRNLEN = @GNULIB_STRNLEN@ -@@ -562,9 +574,12 @@ - GNULIB_TCGETSID = @GNULIB_TCGETSID@ - GNULIB_TIMEGM = @GNULIB_TIMEGM@ - GNULIB_TIME_R = @GNULIB_TIME_R@ -+GNULIB_TIME_RZ = @GNULIB_TIME_RZ@ - GNULIB_TMPFILE = @GNULIB_TMPFILE@ - GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ -+GNULIB_TRUNCATE = @GNULIB_TRUNCATE@ - GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -+GNULIB_TZSET = @GNULIB_TZSET@ - GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ - GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ - GNULIB_UNLINK = @GNULIB_UNLINK@ -@@ -594,6 +609,7 @@ - GNULIB_WCSCPY = @GNULIB_WCSCPY@ - GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ - GNULIB_WCSDUP = @GNULIB_WCSDUP@ -+GNULIB_WCSFTIME = @GNULIB_WCSFTIME@ - GNULIB_WCSLEN = @GNULIB_WCSLEN@ - GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ - GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ -@@ -627,9 +643,11 @@ - HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@ - HAVE_ATOLL = @HAVE_ATOLL@ - HAVE_BTOWC = @HAVE_BTOWC@ -+HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@ - HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ - HAVE_CHOWN = @HAVE_CHOWN@ - HAVE_CLOSEDIR = @HAVE_CLOSEDIR@ -+HAVE_CRTDEFS_H = @HAVE_CRTDEFS_H@ - HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ - HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ - HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ -@@ -645,6 +663,7 @@ - HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ - HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ - HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ -+HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@ - HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ - HAVE_DECL_GETNAMEINFO = @HAVE_DECL_GETNAMEINFO@ - HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ -@@ -763,6 +782,7 @@ - HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ - HAVE_PTY_H = @HAVE_PTY_H@ - HAVE_PWRITE = @HAVE_PWRITE@ -+HAVE_QSORT_R = @HAVE_QSORT_R@ - HAVE_RAISE = @HAVE_RAISE@ - HAVE_RANDOM = @HAVE_RANDOM@ - HAVE_RANDOM_H = @HAVE_RANDOM_H@ -@@ -824,7 +844,10 @@ - HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@ - HAVE_TERMIOS_H = @HAVE_TERMIOS_H@ - HAVE_TIMEGM = @HAVE_TIMEGM@ -+HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@ -+HAVE_TRUNCATE = @HAVE_TRUNCATE@ - HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ -+HAVE_TZSET = @HAVE_TZSET@ - HAVE_UNISTD_H = @HAVE_UNISTD_H@ - HAVE_UNLINKAT = @HAVE_UNLINKAT@ - HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ -@@ -847,6 +870,7 @@ - HAVE_WCSCPY = @HAVE_WCSCPY@ - HAVE_WCSCSPN = @HAVE_WCSCSPN@ - HAVE_WCSDUP = @HAVE_WCSDUP@ -+HAVE_WCSFTIME = @HAVE_WCSFTIME@ - HAVE_WCSLEN = @HAVE_WCSLEN@ - HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ - HAVE_WCSNCAT = @HAVE_WCSNCAT@ -@@ -914,8 +938,10 @@ - LIBTHREAD = @LIBTHREAD@ - LIBUTIL = @LIBUTIL@ - LIBWRAP = @LIBWRAP@ -+LIB_GETLOGIN = @LIB_GETLOGIN@ - LIB_POLL = @LIB_POLL@ - LIB_SELECT = @LIB_SELECT@ -+LIMITS_H = @LIMITS_H@ - LN_S = @LN_S@ - LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ - LOCALE_FR = @LOCALE_FR@ -@@ -942,6 +968,7 @@ - NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ - NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ - NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ -+NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@ - NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ - NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@ - NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@ -@@ -974,6 +1001,7 @@ - NEXT_FLOAT_H = @NEXT_FLOAT_H@ - NEXT_GETOPT_H = @NEXT_GETOPT_H@ - NEXT_LANGINFO_H = @NEXT_LANGINFO_H@ -+NEXT_LIMITS_H = @NEXT_LIMITS_H@ - NEXT_LOCALE_H = @NEXT_LOCALE_H@ - NEXT_NETDB_H = @NEXT_NETDB_H@ - NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@ -@@ -1021,6 +1049,7 @@ - REPLACE_CHOWN = @REPLACE_CHOWN@ - REPLACE_CLOSE = @REPLACE_CLOSE@ - REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ -+REPLACE_CTIME = @REPLACE_CTIME@ - REPLACE_DIRFD = @REPLACE_DIRFD@ - REPLACE_DPRINTF = @REPLACE_DPRINTF@ - REPLACE_DUP = @REPLACE_DUP@ -@@ -1132,6 +1161,7 @@ - REPLACE_STRDUP = @REPLACE_STRDUP@ - REPLACE_STRERROR = @REPLACE_STRERROR@ - REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ -+REPLACE_STRFTIME = @REPLACE_STRFTIME@ - REPLACE_STRNCAT = @REPLACE_STRNCAT@ - REPLACE_STRNDUP = @REPLACE_STRNDUP@ - REPLACE_STRNLEN = @REPLACE_STRNLEN@ -@@ -1146,7 +1176,9 @@ - REPLACE_TIMEGM = @REPLACE_TIMEGM@ - REPLACE_TMPFILE = @REPLACE_TMPFILE@ - REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ -+REPLACE_TRUNCATE = @REPLACE_TRUNCATE@ - REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ -+REPLACE_TZSET = @REPLACE_TZSET@ - REPLACE_UNLINK = @REPLACE_UNLINK@ - REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ - REPLACE_UNSETENV = @REPLACE_UNSETENV@ -@@ -1159,6 +1191,7 @@ - REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ - REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ - REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ -+REPLACE_WCSFTIME = @REPLACE_WCSFTIME@ - REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ - REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ - REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ -@@ -1195,6 +1228,8 @@ - WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ - WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ - WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ -+WINDOWS_STAT_INODES = @WINDOWS_STAT_INODES@ -+WINDOWS_STAT_TIMESPEC = @WINDOWS_STAT_TIMESPEC@ - WINT_T_SUFFIX = @WINT_T_SUFFIX@ - YACC = @YACC@ - YFLAGS = @YFLAGS@ diff --git a/inetutils/inetutils-2.4-1.src.patch b/inetutils/inetutils-2.4-1.src.patch new file mode 100644 index 00000000..228cd962 --- /dev/null +++ b/inetutils/inetutils-2.4-1.src.patch @@ -0,0 +1,7023 @@ +--- origsrc/inetutils-2.4/config.hin 2022-10-26 06:16:23.000000000 +0900 ++++ src/inetutils-2.4/config.hin 2022-10-28 05:03:02.098584300 +0900 +@@ -500,8 +500,7 @@ + may be supplied by this distribution. */ + #undef HAVE_ALLOCA + +-/* Define to 1 if you have and it should be used (not on Ultrix). +- */ ++/* Define to 1 if works. */ + #undef HAVE_ALLOCA_H + + /* Define to 1 if you have the header file. */ +@@ -1493,6 +1492,9 @@ + /* Define to 1 if you have the header file. */ + #undef HAVE_STDIO_EXT_H + ++/* Define to 1 if you have the header file. */ ++#undef HAVE_STDIO_H ++ + /* Define to 1 if you have the header file. */ + #undef HAVE_STDLIB_H + +@@ -1508,7 +1510,7 @@ + /* Define to 1 for a system using streams for ptys */ + #undef HAVE_STREAMSPTY + +-/* Define to 1 if you have the `strerror_r' function. */ ++/* Define if you have `strerror_r'. */ + #undef HAVE_STRERROR_R + + /* Define to 1 if you have the header file. */ +@@ -2321,15 +2323,17 @@ + /* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at runtime. +- STACK_DIRECTION > 0 => grows toward higher addresses +- STACK_DIRECTION < 0 => grows toward lower addresses +- STACK_DIRECTION = 0 => direction of growth unknown */ ++ STACK_DIRECTION > 0 => grows toward higher addresses ++ STACK_DIRECTION < 0 => grows toward lower addresses ++ STACK_DIRECTION = 0 => direction of growth unknown */ + #undef STACK_DIRECTION + + /* Define to 1 if the `S_IS*' macros in do not work properly. */ + #undef STAT_MACROS_BROKEN + +-/* Define to 1 if you have the ANSI C header files. */ ++/* Define to 1 if all of the C90 standard headers exist (not just the ones ++ required in a freestanding environment). This macro is provided for ++ backward compatibility; new code need not use it. */ + #undef STDC_HEADERS + + /* Define to 2 if missing */ +--- origsrc/inetutils-2.4/configure.ac 2022-06-19 03:34:05.000000000 +0900 ++++ src/inetutils-2.4/configure.ac 2022-10-28 05:02:21.702314000 +0900 +@@ -215,7 +215,8 @@ AM_CONDITIONAL([ENABLE_libls], [test "$e + # At least OpenSolaris is missing . + AC_CHECK_HEADER(protocols/talkd.h, , , + [IU_FLUSHLEFT([#include +- #include ])]) ++ #include ++ #include ])]) + + if test "$ac_cv_header_protocols_talkd_h" = no; then + AC_MSG_WARN([protocols/talkd.h is not available, not building talk, nor talkd]) +--- origsrc/inetutils-2.4/doc/inetutils.texi 2022-10-15 03:36:45.000000000 +0900 ++++ src/inetutils-2.4/doc/inetutils.texi 2022-10-28 05:02:21.719300100 +0900 +@@ -27,32 +27,32 @@ + + @dircategory Individual utilities + @direntry +-* dnsdomainname: (inetutils)dnsdomainname invocation. Show DNS domain name. ++@c * dnsdomainname: (inetutils)dnsdomainname invocation. Show DNS domain name. + * ftp: (inetutils)ftp invocation. FTP client. + * ftpd: (inetutils)ftpd invocation. FTP Daemon. +-* hostname: (inetutils)hostname invocation. Show or set system host name. ++@c * hostname: (inetutils)hostname invocation. Show or set system host name. + * ifconfig: (inetutils)ifconfig invocation. Configure network interfaces. + * inetd: (inetutils)inetd invocation. Internet super-server. +-* logger: (inetutils)logger invocation. Send messages to the system log. +-* ping6: (inetutils)ping6 invocation. Packets to IPv6 network hosts. +-* ping: (inetutils)ping invocation. Packets to network hosts. +-* rcp: (inetutils)rcp invocation. Remote copy +-* rexec: (inetutils)rexec invocation. Remote execution client. +-* rexecd: (inetutils)rexecd invocation. Remote execution server. +-* rlogin: (inetutils)rlogin invocation. Remote login. +-* rlogind: (inetutils)rlogind invocation. Remote login server. +-* rsh: (inetutils)rsh invocation. Remote shell. +-* rshd: (inetutils)rshd invocation. Remote shell server. ++@c * logger: (inetutils)logger invocation. Send messages to the system log. ++@c * ping6: (inetutils)ping6 invocation. Packets to IPv6 network hosts. ++@c * ping: (inetutils)ping invocation. Packets to network hosts. ++@c * rcp: (inetutils)rcp invocation. Remote copy ++@c * rexec: (inetutils)rexec invocation. Remote execution client. ++@c * rexecd: (inetutils)rexecd invocation. Remote execution server. ++@c * rlogin: (inetutils)rlogin invocation. Remote login. ++@c * rlogind: (inetutils)rlogind invocation. Remote login server. ++@c * rsh: (inetutils)rsh invocation. Remote shell. ++@c * rshd: (inetutils)rshd invocation. Remote shell server. + * syslogd: (inetutils)syslogd invocation. Syslog server. + * talk: (inetutils)talk invocation. Talk client. + * talkd: (inetutils)talkd invocation. Talk server. + * telnet: (inetutils)telnet invocation. User interface to TELNET. + * telnetd: (inetutils)telnetd invocation. Telnet server. +-* tftp: (inetutils)tftp invocation. TFTP client. +-* tftpd: (inetutils)tftpd invocation. TFTP server. +-* traceroute: (inetutils)traceroute invocation. Trace the route to a host. ++@c * tftp: (inetutils)tftp invocation. TFTP client. ++@c * tftpd: (inetutils)tftpd invocation. TFTP server. ++@c * traceroute: (inetutils)traceroute invocation. Trace the route to a host. + * uucpd: (inetutils)uucpd invocation. Unix to Unix Copy. +-* whois: (inetutils)whois invocation. Whois user interface. ++@c * whois: (inetutils)whois invocation. Whois user interface. + @end direntry + + @copying +@@ -95,39 +95,39 @@ Documentation License''. + * Introduction:: Caveats, overview, and authors. + * Common options:: Common options. + +-Diagnostic programs +- +-* dnsdomainname invocation:: Show DNS domain name. +-* hostname invocation:: Show or set system host name. +-* ifconfig invocation:: Configure network interfaces. +-* logger invocation:: Send messages to system log. +-* ping invocation:: Packets to network hosts. +-* ping6 invocation:: Packets to IPv6 network hosts. +-* traceroute invocation:: Trace the route to a host. +-* whois invocation:: Whois user interface. +- ++@c Diagnostic programs ++@c ++@c * dnsdomainname invocation:: Show DNS domain name. ++@c * hostname invocation:: Show or set system host name. ++@c * ifconfig invocation:: Configure network interfaces. ++@c * logger invocation:: Send messages to system log. ++@c * ping invocation:: Packets to network hosts. ++@c * ping6 invocation:: Packets to IPv6 network hosts. ++@c * traceroute invocation:: Trace the route to a host. ++@c * whois invocation:: Whois user interface. ++@c + Clients + + * ftp invocation:: FTP client. +-* rcp invocation:: Remote copy +-* rexec invocation:: Remote execution client. +-* rlogin invocation:: Remote login. +-* rsh invocation:: Remote shell. ++@c * rcp invocation:: Remote copy ++@c * rexec invocation:: Remote execution client. ++@c * rlogin invocation:: Remote login. ++@c * rsh invocation:: Remote shell. + * talk invocation:: Talk client. + * telnet invocation:: User interface to TELNET. +-* tftp invocation:: TFTP client. ++@c * tftp invocation:: TFTP client. + + Daemons + + * inetd invocation:: Internet super-server. + * syslogd invocation:: Syslog server. + * ftpd invocation:: FTP Daemon. +-* rexecd invocation:: Remote execution server. +-* rlogind invocation:: Remote login server. +-* rshd invocation:: Remote shell server. ++@c * rexecd invocation:: Remote execution server. ++@c * rlogind invocation:: Remote login server. ++@c * rshd invocation:: Remote shell server. + * talkd invocation:: Talk server. + * telnetd invocation:: Telnet server. +-* tftpd invocation:: TFTP server. ++@c * tftpd invocation:: TFTP server. + * uucpd invocation:: Unix to Unix Copy. + + Appendix +@@ -228,1288 +228,1288 @@ Failure is indicated by a nonzero value + it may differ on unusual platforms, as POSIX requires only that it be + nonzero. + +-@node dnsdomainname invocation +-@chapter @command{dnsdomainname}: Show DNS domain name +-@pindex dnsdomainname +- +-@command{dnsdomainname} is a program to show the domain part of the +-system's fully qualified domain name. For example, if the FQDN of the +-system is @code{name.example.org} the command will show +-@code{example.org}. +-The output is not necessarily related to the NIS/YP domain name. +- +-The tool uses gethostname to get the host name of the system and +-then getaddrinfo to resolve it into a canonical name. +-The domain part of the canonical name is shown, i.e., the part +-after the first period@tie{}(@code{.}) of the official name. +- +-@noindent +-Synopsis: +- +-@example +-dnsdomainname [@var{option}@dots{}] +-@end example +- +-@noindent +-There is no command specific option. +- +-@node hostname invocation +-@chapter @command{hostname}: Show or set system host name. +-@pindex hostname +- +-@command{hostname} is a program to show or to set the name of a +-host system. +- +-@noindent +-Synopsis: +- +-@example +-hostname [@var{option}@dots{}] +-hostname @var{name} +-@end example +- +-@noindent +-where @var{name} is the name to be used by the running host. +- +-@section Command line options +-@anchor{hostname options} +- +-@table @option +-@item -a +-@itemx --aliases +-@opindex -a +-@opindex --aliases +-Get alias names. +- +-@item -d +-@itemx --domain +-@opindex -d +-@opindex --domain +-Get DNS domain name. +- +-@item -f +-@itemx --fqdn +-@itemx --long +-@opindex -f +-@opindex --fqdn +-@opindex --long +-Get DNS host name or Fully Qualified Domain Name. +- +-@item -F @var{file} +-@itemx --file=@var{file} +-@opindex -F +-@opindex --file +-Set host name or NIS domain name from FILE. +- +-@item -i +-@itemx --ip-addresses +-@opindex -i +-@opindex --ip-addresses +-Get addresses for the host name. +- +-@item -s +-@itemx --short +-@opindex -s +-@opindex --short +-Get short host name. +- +-@item -y +-@itemx --yp +-@itemx --nis +-@opindex -y +-@opindex --yp +-@opindex --nis +-Get NIS/YP domain name. +-@end table +- +-@node ifconfig invocation +-@chapter @command{ifconfig}: Configure network interfaces +-@pindex ifconfig +- +-@command{ifconfig} is a program to retrieve and to set selected +-properties of network interfaces. It is best viewed as a tool to +-get information, rather than for changing the behaviour of adapters, +-since it is hard to support property setting in a portable manner. +- +-@noindent +-Synopsis: +- +-@example +-ifconfig @var{iface} [@var{arg}@dots{}] +-ifconfig -i @var{iface} [@var{option}@dots{}] [-i @var{iface2} [@var{option}@dots{}]] +-@end example +- +-@section Command line options +-@anchor{ifconfig options} +- +-@table @option +-@item -a +-@itemx --all +-@opindex -a +-@opindex --all +-Display all available interfaces, including those that not are +-marked as `up', i.e., also the inactive interfaces. +- +-@item -A @var{addr} +-@itemx --address=@var{addr} +-@opindex -A +-@opindex --address +-Set address of selected interface to @var{addr}. +- +-@item -b @var{addr} +-@itemx -B @var{addr} +-@itemx --brdaddr=@var{addr} +-@itemx --broadcast=@var{addr} +-@opindex -b +-@opindex -B +-@opindex --brdaddr +-@opindex --broadcast +-Set broadcast address of selected interface to @var{addr}. +- +-@item -d @var{addr} +-@itemx -p @var{addr} +-@itemx --dstaddr=@var{addr} +-@itemx --peer=@var{addr} +-@opindex -d +-@opindex -p +-@opindex --dstaddr +-@opindex --peer +-Set destination (peer) address of selected interface. +- +-@item --down +-@opindex --down +-Deactivate the selected interface. +- +-@item -F @var{list} +-@itemx --flags=@var{list} +-@opindex -F +-@opindex --flags +-Change those interface flags mentioned in @var{list}. +-The argument is a comma separated list of one ore more +-flag names to be set, or in case the name is prepended +-with @samp{no}, the corresponding flag is cleared. +-The output of @command{ifconfig} with the option @option{--help} +-contains a list of available flag names. +- +-@item --format=@var{format} +-@opindex --format +-Select output format; the value @samp{help} prints a list +-of all available formats. +- +-@item -i @var{name} +-@itemx --interface=@var{name} +-@opindex -i +-@opindex --interface +-Select the named interface for any following action. +- +-@item -l +-@itemx --list +-@opindex -l +-@opindex --list +-List, with name only, all available interfaces, or only those +-selected should at least one option @option{-i} have specified. +- +-@item -m @var{mask} +-@itemx --netmask=@var{mask} +-@opindex -m +-@opindex --netmask +-Set netmask of selected interface to @var{mask}. +- +-@item --metric=@var{n} +-@opindex --metric +-Set the metric of selected interface to the number @var{n}. +- +-@item -M @var{n} +-@itemx --mtu=@var{n} +-@opindex -M +-@opindex --mtu +-Set MTU of selected interface to the number @var{n}. +- +-@item -s +-@itemx --short +-@opindex -s +-@opindex --short +-Use short output format. This is identical to specifying +-@samp{--format=netstat}. +- +-@item --up +-@opindex --up +-Activate the selected interface. +- +-@item -v +-@itemx --verbose +-@opindex -v +-@opindex --verbose +-Print informational messages when configuring an interface. +-@end table +- +-Observe that the use of program options is the only manner +-in which @command{ifconfig} is able to handle multiple +-interfaces in one invocation. Once a particular interface +-has been selected using @option{-i}, it is affected by any +-following option until replaced by another interface selector. +-This is also the main cause, that @command{ifconfig} is +-unable to treat options independently of their order, as is +-mostly the case in other GNU software. +- +-@section Formatted status output +-@anchor{ifconfig formats} +- +-The status of one or more interfaces can be presented in a number +-of different formats. A list of them is printed by the option +-@option{--format=help}. In the following table the valid formats +-are given, each is used in the form @option{--format=@var{name}}. +- +-@table @asis +-@item check +-@itemx check-existence +-@itemx ? +-Place holders for the ability to check whether the interfaces +-selected by one or more options @option{-i} are determining +-existing interfaces in the running system. No output in case +-of success, an error message in case of a failure. +- +-@item gnu +-@itemx default +-Standard GNU output format. +- +-@item gnu-one-entry +-Like the previous format, but with intermediary newlines removed. +- +-@item help +-Display a list of valid formats, together with a short description +-for each choice. +- +-@item net-tools +-Imitation of presentation used by the implementation in @samp{net-tools}. +-Default format for GNU/Linux. +- +-@item netstat +-Terse output with statistics, similar to that of @code{netstat -i}. +- +-@item osf +-Format variant of @samp{unix} preferred by OSF's implementation. +- +-@item unix +-Traditional UNIX type format. Default for BSD, HPUX and Solaris. +-@end table +- +-@section Legacy syntax +-@anchor{ifconfig legacy syntax} +- +-The traditional mode of invoking @command{ifconfig} is via +-a parsed command line, without all use of program switches +-and options, relying fully on argument parsing. This mode +-of use is supported also in the present implementation, +-but keep in mind that only one interface can be manipulated +-using this legacy syntax. +- +-@example +-ifconfig NAME [ADDR [DSTADDR]] [broadcast BRDADDR] [netmask MASK] +- [metric N] [mtu N] [up|down] +-@end example +- +-As is conventional, only the primary address and possibly the +-peer destination address are stated as bare arguments, without +-a specifying keyword. +-Some slight variation on this syntax will depend on the target +-system for which the program is being built, as not all platforms +-support identical abilities. +-The best information is found via the usage massage +-@samp{ifconfig --usage}. +- +-@node logger invocation +-@chapter @command{logger}: Send messages to system log +-@pindex logger +- +-@command{logger} is a program to send entries to system log. It +-provides a shell command interface similar to the system log module. +-For background information, +-@pxref{Syslog, , Syslog, libc, The GNU C Library Reference Manual}. +- +-@noindent +-Synopsis: +- +-@example +-logger [@var{option}@dots{}] [@var{message}] +-@end example +- +-@section Command line options +-@anchor{logger options} +- +-@table @option +-@item -4 +-@itemx --ipv4 +-@opindex -4 +-@opindex --ipv4 +-Use IPv4 as transport when logging to a host. The default behaviour +-is to use whatever IP version that matches the host. +- +-@item -6 +-@itemx --ipv6 +-@opindex -6 +-@opindex --ipv6 +-Use IPv6 as transport when logging to a host. The option is present +-also on systems without support for IPv6, but will then issue a warning +-and then fall back to IPv4 when delivering the message. +- +-Both options are most influencial when the target host is named using +-a symbolic name, but numerical addresses for host or source must also +-match if either of @option{--ipv4} or @option{--ipv6} is stated. +- +-@item -f @var{file} +-@itemx --file=@var{file} +-@opindex -f +-@opindex --file +-Log the content of the specified file. If @var{file} is @samp{-} then +-standard input is assumed. +- +-@item -h @var{host} +-@itemx --host=@var{host} +-@opindex -h +-@opindex --host +-Send messages to the given host or socket. The @var{host} argument +-can be either a local UNIX socket name (containing a slash @samp{/}), +-or be of the form +- +-@example +-@var{host}[:@var{port}] +-@end example +- +-@noindent +-where @var{host} is the remote host name or IP address, and the +-optional @var{port} is a decimal port number or symbolic service +-name from @file{/etc/services}. If @var{port} is not specified, +-the port number corresponding to the @samp{syslog} service is used. +-If a numerical IPv6 address is given without a port specification, +-then the address must be enclosed within brackets (like [::1]). +- +-@item -i[@var{pid}] +-@itemx --id=[@var{pid}] +-@opindex -i +-@opindex --id +-Add process ID to each message. If @var{pid} is not supplied, use the +-process ID of the logger process with each line. Notice, that +-@var{pid} is an optional argument. When supplied to the @option{-i} +-option, it must follow the @samp{i} letter immediately, without any +-separating whitespace. When supplied to the @option{--id} form, it +-must be separated from it by exactly one equals sign. +- +-@item -p @var{priority} +-@itemx --priority=@var{priority} +-@opindex -p +-@opindex --priority +-Enter the message with the specified priority. The priority may be +-specified numerically or as a @samp{facility.level} pair. For +-example, @option{-p local3.info} logs the message at the informational +-level in the @samp{local3} facility. The default is +-@samp{user.notice}. +- +-The actual list of supported facilities and levels is system specific. +- +-@item -s +-@itemx --stderr +-@opindex -s +-@opindex --stderr +-Log the message to standard error, as well as to the system log. +- +-@item -S @var{addr} +-@itemx --source=@var{addr} +-@opindex -S +-@opindex --source +-Supply the source IP address for INET connections. This option is +-useful in conjunction with @option{--host} (see above). The kind of +-address specified here (IPv4 or IPv6) will propagate to influence +-the resolution of the host address, if it is a symbolic name. +- +-@item -t @var{tag} +-@itemx --tag=@var{tag} +-@opindex -t +-@opindex --tag +-Mark every line in the log with the specified tag. +- +-@item -u @var{socket} +-@itemx --unix=@var{socket} +-@opindex -h +-@opindex --host +-Send messages to the given local UNIX socket. The @var{socket} argument +-can be either an absolute path (starting with a slash @samp{/}), or a relative +-path understood relative to the current working directory. +-@end table +- +-The options are followed by the message which should be written to the +-log. If not specified, and the @option{-f} flag is not provided, +-standard input is logged. +- +-@section Examples +-@anchor{logger examples} +- +-The following examples illustrate the usage of the @command{logger} +-command: +- +-@enumerate 1 +-@item Log the message @samp{System rebooted} to the local syslog. +-Use default facility and priority: +- +-@example +-logger System rebooted +-@end example +- +-@item Run command and send its error output to the channel +-@samp{local0.err}. Mark each message with tag @samp{cmd}: +- +-@example +-command 2>&1 | logger -p local0.err -t cmd +-@end example +- +-@item Log each line from file @file{warnings} to channel +-@samp{daemon.warn} on host @samp{logger.runasimi.org}, +-using the source IP @samp{10.10.10.1}: +- +-@example +-logger -p daemon.warn -h logger.runasimi.org -S 10.10.10.1 \ +-@verb{| |}--file warnings +-@end example +-@end enumerate +- +-@node ping invocation +-@chapter @command{ping}: Packets to network hosts +-@pindex ping +- +-@c FIXME: The text is far to detailed about the actual implementation +-@c of ping. A user doesn't need to know that we are using TIMEVAL, or +-@c how things are padded. +- +-@command{ping} uses ICMP datagrams to provoke a response +-from the chosen destination host, mainly intending to probe +-whether it is alive. +- +-The used datagram, of type @code{ECHO_REQUEST}, contains some header +-information and some additional payload, usually a time stamp. +-By a suitable choice of payload, different host or router properties +-are detectable, as the emitted datagram travels to its destination. +- +-@ignore %* Too detailed for end user. +-@command{ping} uses the ICMP protocol's mandatory +-@code{ECHO_REQUEST} datagram to elicit an ICMP type @code{ECHO_REPLY} +-packet from a host or gateway. +-@code{ECHO_REQUEST} datagrams (@dfn{pings}) have an IP and +-an ICMP header, followed by a @dfn{struct timeval} and then +-an arbitrary number of @dfn{padding} bytes used to fill out the packet. +-@end ignore +- +-@noindent +-Synopsis: +- +-@example +-ping [@var{option}@dots{}] @var{host} +-@end example +- +-@noindent +-Sending echo requests is the standard use of @command{ping}, +-but by far not the only use case. +- +-@menu +-* Ping options:: +-* Fault isolation:: +-* Duplicate and damaged packets:: +-* Data patterns:: +-* TTL details:: +-* Further remarks:: +-@end menu +- +-@node Ping options +-@section Command line options +-@anchor{ping options} +- +-@c Options controlling ICMP request types: +-@c --address Send ICMP_ADDRESS packets (root only) +-@c --echo Send ICMP_ECHO packets (default) +-@c --mask Same as --address +-@c --timestamp Send ICMP_TIMESTAMP packets +-@c -t, --type=TYPE Send TYPE packets +- +-Selection of packet type is handled by these first options: +- +-@table @option +-@item --address +-@opindex --address +-Send ICMP_ADDRESS packets, thus requesting the address netmask +-in use by the targetted host. +- +-@item --echo +-@opindex --echo +-Send ICMP_ECHO requests. +-This is the default action. +- +-@item --mask +-@opindex --mask +-Identical to @option{--address}. +- +-@item --timestamp +-@opindex --timestamp +-Send ICMP_TIMESTAMP packets, thereby requesting a timed response +-from the targetted host. +- +-In successful cases three time values are returned. +-All are expected to state the number of milliseconds since +-midnight@tie{}UTC. +-The first of these, @samp{icmp_otime}, contains the original +-time of sending the request. +-Then comes @samp{icmp_rtime}, the time of reception by the target, +-and finally, @samp{icmp_ttime}, the time of transmitting an answer +-back to the originator. +- +-@item -t @var{type} +-@itemx --type=@var{type} +-@opindex --type +-@opindex -t +-Send @var{type} packets. Accepted values are @samp{address}, +-@samp{echo}, @samp{mask}, and @samp{timestamp}. +-@end table +- +-@c Options valid for all request types: +-@c -c, --count=NUMBER Stop after sending NUMBER packets +-@c -d, --debug Set the SO_DEBUG option +-@c -i, --interval=NUMBER Wait NUMBER seconds between sending each packet +-@c -n, --numeric Do not resolve host addresses +-@c -r, --ignore-routing Send directly to a host on an attached network +-@c -T, --tos=NUM Set type-of-service to NUM +-@c --ttl=NUMBER Set specified time-to-live on packet +- +-@noindent +-The following options are available for all packet types: +- +-@table @option +-@item -c @var{n} +-@itemx --count=@var{n} +-@opindex -c +-@opindex --count +-Stop after sending and receiving answers to a total of +-@var{n} packets. +- +-@item -d +-@itemx --debug +-@opindex -d +-@opindex --debug +-Set the SO_DEBUG option on the socket being used. +- +-@item -i @var{n} +-@itemx --interval=@var{n} +-@opindex -i +-@opindex --interval +-Wait @var{n} seconds until sending next packet. +-The default is to wait for one second between packets. +-This option is incompatible with the option @option{-f}. +- +-@item -n +-@itemx --numeric +-@opindex -n +-@opindex --numeric +-Numeric output only. No attempt will be made to resolve +-symbolic names for host addresses. +- +-@item -r +-@itemx --ignore-routing +-@opindex -r +-@opindex --ignore-routing-log +-Bypass the normal routing tables and send directly to a host on an +-attached network. If the host is not on a directly attached network, +-an error is returned. This option can be used to ping a local host +-through an interface that has no route through it (e.g., after the +-interface was dropped by @command{routed}). +- +-@item -T @var{num} +-@itemx --tos=@var{num} +-@opindex -T +-@opindex --tos +-Set type-of-service, TOS field, to @var{num} on +-transmitted packets. +- +-@item --ttl=@var{n} +-@opindex --ttl +-Set the specified number @var{n} as value of time-to-live when +-transmitting packets. Acceptable values are 1 to 255, inclusive. +- +-@item -v +-@itemx --verbose +-@opindex -v +-@opindex --verbose +-Produce more verbose output, giving more statistics. +- +-@item -w @var{n} +-@itemx --timeout=@var{n} +-@opindex -w +-@opindex --timeout +-Stop after @var{n} seconds. +- +-@item -W @var{n} +-@itemx --linger=@var{n} +-@opindex -W +-@opindex --linger +-Maximum number of seconds @var{n} to wait for a response. +-@end table +- +-@c Options valid for --echo requests: +-@c -f, --flood Flood ping (root only) +-@c --ip-timestamp=FLAG Timestamp IP option of types tsonly, +-@c tsaddr, or (not yet implemented) prespec. +-@c -l, --preload=NUMBER Send NUMBER packets as fast as possible before +-@c falling into normal mode of behavior (root only) +-@c -p, --pattern=PATTERN Fill ICMP packet with given pattern (hex) +-@c -q, --quiet no packet message +-@c -R, --route Record route IP option +-@c -s, --size=NUMBER Send NUMBER data octets +- +-Finally, these last options are relevant only for sending echo requests, +-allowing many variations in order to detect various peculiarities of +-the targeted host, or the intermediary routers for that matter. +- +-@table @option +-@item -f +-@itemx --flood +-@opindex -f +-@opindex --flood +-Flood ping. Outputs packets as fast as they come back or one hundred +-times per second, whichever is more. For every ECHO_REQUEST packet +-sent, a period @samp{.} is printed, while for every ECHO_REPLY +-received in reply, a backspace is printed. +-This provides a rapid display of how many packets are being dropped. +-Only the super-user may use this option. +-This can be very hard on a network and should be used with caution. +- +-@item --ip-timestamp=@var{flag} +-@opindex --ip-timestamp +-Include IP option Timestamp in transmitted packets. +-The value @var{flag} is either @samp{tsonly}, which only records up +-to nine time stamps, or @samp{tsaddr}, which records IP +-addresses as well as time stamps, but for at most four hosts. +- +-@item -l @var{n} +-@itemx --preload=@var{n} +-@opindex -l +-@opindex --preload +-If @var{n} is specified, ping sends that many packets as fast as +-possible before falling into its normal mode of operation. +- +-@item -p @var{pat} +-@itemx --pattern=@var{pat} +-@opindex -p +-@opindex --pattern +-You may specify up to 16 pad bytes to fill out the packet you send. +-This is useful for diagnosing data-dependent problems in a network. +-For example, @option{-p ff} will cause the sent packet to be filled +-with all ones. +- +-@item -q +-@itemx --quiet +-@opindex -q +-@opindex --quiet +-Do not print timing for each transmitted packet. +-@item -R +-@itemx --route +-@opindex -R +-@opindex --route +-Record route. Includes the @code{RECORD_ROUTE} field in the +-ECHO_REQUEST packet and displays the route buffer on returned packets. +-Note that the IP header is only large enough for nine +-such routes. +-Many hosts ignore or discard this option. +- +-@item -s @var{n} +-@itemx --size=@var{n} +-@opindex -s +-@opindex --size +-Specifies the number of data bytes to be sent. The default is 56, +-which translates into 64@tie{}ICMP data bytes, taking +-the 8@tie{}bytes of ICMP header data into account. +-@end table +- +-@node Fault isolation +-@section Using ping for network fault isolation +- +-When using @command{ping} for fault isolation, it should first be run +-on the local host, to verify that the local network interface is up +-and running. Then, hosts and gateways further and further away should +-be pinged. Round-trip times and packet loss statistics are computed. +-If duplicate packets are received, they are not included in the packet +-loss calculation, although the round trip time of these packets is +-used in calculating the minimum/average/maximum round-trip time +-numbers. When the specified number of packets have been sent (and +-received) or if the program is terminated with a @samp{SIGINT}, a +-brief summary is displayed. +- +-This program is intended for use in network testing, measurement and +-management. Because of the load it can impose on the network, it is +-unwise to use ping during normal operations or from automated scripts. +- +-@ignore +-@section ICMP Packet Details +- +-An IP header without options consists of 20 bytes. +-An ICMP type ECHO_REQUEST packet contains an additional +-8 bytes worth of ICMP header followed by an arbitrary +-amount of data. +-When a packet size is stated, that indicates +-the size of the extra piece of data (the default is 56). +-Thus the amount of data received as an IP packet +-with an ICMP type ECHO_REPLY, will always be 8 bytes larger +-than the requested data space (the ICMP header). +- +-If the data space is at least eight bytes large, ping uses the first +-eight bytes of this space to include a timestamp which it uses in the +-computation of round trip times. If less than eight bytes of pad are +-specified, no round trip times are given. +-@end ignore +- +-@node Duplicate and damaged packets +-@section Duplicate and damaged packets +- +-Ping will report duplicate and damaged packets. Duplicate packets +-should never occur, and seem to be caused by inappropriate link-level +-retransmissions. Duplicates may occur in many situations and are +-rarely (if ever) a good sign, although the presence of low levels of +-duplicates may not always be cause for alarm. +- +-Damaged packets are obviously serious cause for alarm and often +-indicate broken hardware somewhere in the ping packet's path (in the +-network or in the hosts). +- +-@node Data patterns +-@section Trying different data patterns +- +-The (inter)network layer should never treat packets differently +-depending on the data contained in the data portion. Unfortunately, +-data-dependent problems have been known to sneak into networks and +-remain undetected for long periods of time. In many cases the +-particular pattern that will have problems is something that doesn't +-have sufficient ``transitions'', such as all ones or all zeros, or a +-pattern right at the edge, such as almost all zeros. It isn't +-necessarily enough to specify a data pattern of all zeros (for +-example) on the command line because the pattern that is of interest +-is at the data link level, and the relationship between what you type +-and what the controllers transmit can be complicated. +- +-This means that if you have a data-dependent problem you will probably +-have to do a lot of testing to find it. If you are lucky, you may +-manage to find a file that either can't be sent across your network or +-that takes much longer to transfer than other similar length files. +-You can then examine this file for repeated patterns that you can test +-using the @option{-p} option of ping. +- +-@node TTL details +-@section TTL details +- +-The TTL field, @dfn{Time To Live}, of an IP +-packet represents the maximum number of IP routers +-that the packet can go through before being discarded. +-In current practice you can expect each router on the +-Internet to decrement the TTL field by exactly one. +- +-The TCP/IP specification states that the TTL field +-of a new TCP packet should be set to 60, +-but many systems use smaller values (4.3BSD used 30 +-and 4.2BSD used 15). +- +-The maximum possible value of this field is 255, and most UNIX systems +-set the TTL field of ICMP (type @code{ECHO_REQUEST}) +-packets to 255. This is why you will find you can ping some hosts, +-but not reach them with @command{telnet} or @command{ftp}. +- +-During normal operation, @command{ping} prints the TTL value +-for every packet it receives. +-When a remote system receives an ICMP packet, +-it can do one of three things to the TTL field +-in its response packet: +- +-@itemize @bullet +-@item +-Not to change it. This is what Berkeley UNIX systems did before the +-4.3BSD-Tahoe release. In this case the TTL value in the +-received packet will be 255 minus the number of routers in the +-round-trip path. +- +-@item +-Set it to 255. This is what current Berkeley UNIX systems do. In this +-case the TTL value in the received packet will be 255 minus the +-number of routers in the path from the remote system to the pinging +-host. +- +-@item +-Set it to some other value. Some machines use the same value for +-ICMP packets that they use for TCP packets, +-for example either 30 or 60. +-Others may use completely arbitrary values. +- +-@end itemize +- +-@node Further remarks +-@section Further observations +-Many hosts and gateways ignore the @code{RECORD_ROUTE} field, since +-the maximum IP header length is far to small to hold all +-the routes. +-There is not much that can be done about this. +- +-Flood pinging is not recommended in general, and flood pinging the +-broadcast address should only be done under very controlled +-conditions. +- +-Some BSD variants offer a kernel setting to inhibit all replies +-to ICMP_MASKREQ packets, but in general, Unices are designed either +-to answer the request with a valid netmask, or to drop the request, +-causing @command{ping} to wait for a timeout condition. +- +-@node ping6 invocation +-@chapter @command{ping6}: Packets to IPv6 network hosts +-@pindex ping6 +- +-@command{ping6} uses ICMPv6 datagrams to get a response +-from the chosen destination host. +-The most common use is to probe whether the remote +-system is responsive. +-Observe that this program only uses IPv6 datagrams. +- +-Each datagram, of type @code{ECHO_REQUEST}, carries some header +-information and some additional payload, usually a time stamp. +-Making a suitable choice of payload, it is possible to probe +-different host or router properties on the way as the emitted +-datagram travels to its destination. +- +-@noindent +-Synopsis: +- +-@example +-ping6 [@var{option}@dots{}] @var{host} +-@end example +- +-@noindent +-Sending simple, timed echo requests is the standard use +-of @command{ping6}, but is by far not the only use case. +- +-This command is a close parallel to @command{ping}, +-except that it handles IPv6 and is thus not able +-to handle peculiarities of IPv4. +- +-@section Command line options +-@anchor{ping6 options} +- +-@table @option +-@item -c @var{n} +-@itemx --count=@var{n} +-@opindex -c +-@opindex --count +-Stop after sending and receiving answers to a total of +-@var{n} packets. +- +-@item -d +-@itemx --debug +-@opindex -d +-@opindex --debug +-Set the SO_DEBUG option on the socket being used. +- +-@item -f +-@itemx --flood +-@opindex -f +-@opindex --flood +-Flood ping. +-Outputs packets as fast as they come back, +-or one hundred times per second, whichever is more. +-For every ECHO_REQUEST packet sent, a period @samp{.} is printed, +-while for every ECHO_REPLY received in reply, a backspace is printed. +- +-This provides a rapid display of how many packets are being dropped. +-Only the super-user may use this option. +-This mode can be very hard on a network. +-It should be used with caution! +- +-@item --hoplimit=@var{n} +-@opindex --hoplimit +-Limit maximal distance to @var{n}. +-Acceptable values are 1 to 255, inclusive. +- +-@item -i @var{n} +-@itemx --interval=@var{n} +-@opindex -i +-@opindex --interval +-Wait @var{n} seconds until sending next packet. +-The default is to wait for one second between packets. +-This option is incompatible with the option @option{-f}. +- +-@item -l @var{n} +-@itemx --preload=@var{n} +-@opindex -l +-@opindex --preload +-Sends @var{n} packets as fast as possible before falling +-back to the normal mode of operation. +- +-@item -n +-@itemx --numeric +-@opindex -n +-@opindex --numeric +-Numeric output only. +-No attempt will be made to resolve symbolic names for host addresses. +- +-@item -p @var{pattern} +-@itemx --pattern=@var{pattern} +-@opindex -p +-@opindex --pattern +-Up to 16 hexadecimal pad bytes are given as @var{pattern}. +-These are use for filling out the packets you send. +-This option is useful for diagnosing data-dependent problems +-within a network. +-As an example, @option{-p ff} will cause the sent packets +-to have payloads with every bit set to one. +- +-@item -q +-@itemx --quiet +-@opindex -q +-@opindex --quiet +-Do not print timing result of each transmitted packet. +- +-@item -r +-@itemx --ignore-routing +-@opindex -r +-@opindex --ignore-routing-log +-Bypass the normal routing tables and send directly +-to a host on an attached network. +-If the host is not on a directly attached network, +-an error is returned. +-This option can be used to ping a local host +-through an interface, for which there is no +-assigned route, such as when the interface +-was dropped by @command{routed}. +- +-@item -s @var{n} +-@itemx --size=@var{n} +-@opindex -s +-@opindex --size +-Specifies the number of data bytes to be sent. The default is 56, +-which translates into 64@tie{}ICMP data bytes, taking +-the 8@tie{}bytes of ICMP header data into account. +- +-@item -T @var{num} +-@itemx --tos=@var{num} +-@opindex -T +-@opindex --tos +-Set the traffic class to @var{num} on transmitted packets. +- +-@item --ttl=@var{n} +-@opindex --ttl +-Synonym for @option{--hoplimit}. +- +-@item -v +-@itemx --verbose +-@opindex -v +-@opindex --verbose +-Produce more verbose output, giving more statistics. +- +-@item -w @var{n} +-@itemx --timeout=@var{n} +-@opindex -w +-@opindex --timeout +-Stop after @var{n} seconds. +-@end table +- +-The documentation of @command{ping} provides several +-pieces of information, and discussions, relevant to +-the use of @command{ping6}. +-Keep in mind, though, that the differing address family +-causes some discrepancy. +-@xref{ping invocation}. +- +-@node traceroute invocation +-@chapter @command{traceroute}: Trace the route to a host +-@pindex traceroute +- +-@command{traceroute} prints a trace of the route +-IP@tie{}packets are travelling to a remote host. +- +-@noindent +-Synopsis: +- +-@example +-traceroute [@var{option}@dots{}] @var{host} +-@end example +- +-@section Command line options +-@anchor{traceroute options} +- +-@table @option +-@item -f @var{num} +-@itemx --first-hop=@var{num} +-@opindex -f +-@opindex --first-hop +-Set the initial hop distance to @var{num}, instead of the default 1. +-This immediately allows probing packets to sense routing +-properties closer to the target host, skipping routers close +-to the local host. Quicker analysis of problems known to lie +-at some routing distance is the outcome. +- +-@item -g @var{gates} +-@itemx --gateways=@var{gates} +-@opindex -g +-@opindex --gateways +-Set intermediary hosts used in loose source routing. +-The argument @var{gates} is a list of gateways, +-using spaces, commata, or semicola as separators. +-These hosts must be traversed in the given order +-before the intended host receives any datagram. +-At most eight host names or addresses may be specified. +-Multiple uses of @option{-g} produce a concatenated list. +- +-@item -I +-@itemx --icmp +-@opindex -I +-@opindex --icmp +-Use ICMP ECHO datagrams for probing the remote host. +- +-@item -m @var{num} +-@itemx --max-hop=@var{num} +-@opindex -m +-@opindex --max-hop +-Set the maximum time-to-live allowed for probing. +-In other words, stop probing when the hop distance +-is in excess of @var{num}. +-The default limit is 64. +- +-@item -M @var{method} +-@itemx --type=@var{method} +-@opindex -M +-@opindex --type +-Use @var{method} as carrier packets for traceroute operations. +-Supported choices are @samp{icmp} and @samp{udp}, where @samp{udp} +-is the default type. +- +-@item -p @var{port} +-@itemx --port=@var{port} +-@opindex -p +-@opindex --port +-Set destination port of target to @var{port}. +-The default value is 33434. +- +-@item -q @var{num} +-@itemx --tries=@var{num} +-@opindex -q +-@opindex --tries +-Send a total of @var{num} probe packets per hop, defaulting to 3. +- +-@item --resolve-hostnames +-@opindex --resolve-hostnames +-Attempt to resolve all addresses as hostnames. +- +-@item -t @var{num} +-@itemx --tos=@var{num} +-@opindex -t +-@opindex --tos +-Set type-of-service, TOS field, to @var{num} on +-transmitted packets. +- +-@item -w @var{num} +-@itemx --wait=@var{num} +-@opindex -w +-@opindex --wait +-Set timeout in seconds, within which a returning response +-packet is accepted as such. +-Default waiting time is three seconds. +-@end table +- +-@section Diagnostic tokens +-@anchor{traceroute printing} +- +-During execution, @command{traceroute} sends three datagrams +-for each value for the TTL field, printing a diagnostic line +-of output for these. The TTL field is then steadily increased +-until the intended host responds, or some intermediary gateway +-returns a datagram to the effect that the target cannot be +-reached due to one reason or another. +- +-Each line of output displays a sequence number, followed by +-diagnostic annotation. Any responding host has its address +-printed without repetition, together with a measured timing. +-In case there is no response within a time period of three seconds, +-an asterisque @samp{*} is printed. +- +-When an intermediate router responds with an exceptional state, +-the time elapsed since emitting the original datagram is printed, +-followed by an additional short hand hint of the reason: +- +-@table @samp +-@item !F +-Fragmentation needed by gateway. +- +-@item !H +-Host not reachable from gateway. +- +-@item !N +-Network not reachable from gateway. +- +-@item !P +-Protocol not usable at host, or within network. +- +-@item !S +-Source routing failed at gateway. +- +-@item !T +-Host or network not reachable for stated type of service, TOS. +- +-@item !U +-Isolated host, not reachable. +- +-@item !X +-Forbidden by remote administration. +-@end table +- +-@node whois invocation +-@chapter @command{whois}: User interface to WHOIS data bases. +-@pindex whois +- +-The functionality of a world wide Internet is dependent on +-stored node information of different kinds. +-Registrars keep much relevant material in WHOIS data bases. +-This utility @command{whois} is able to query those sources +-for general and for particular properties of most domains. +- +-For many domains there are names of suitable data base servers +-hard coded into @command{whois}, ready to query for domain +-relevant information. +-Since servers' names do change from time to time, +-this utility might occasionally need some guidance using +-a suitable command line option. +- +-@noindent +-Synopsis: +- +-@example +-whois [@var{OPTION}@dots{}] @var{OBJECT}@dots{} +-@end example +- +-@section Command line options +-@anchor{whois options} +- +-@table @option +-@item -a +-@opindex -a +-Search all data bases. +- +-@item -F +-@opindex -F +-Fast and raw output. Implies @option{-r}. +- +-@item -g @var{source}:@var{first}-@var{last} +-@opindex -g +-Find updates for an object from provider @var{source}, +-starting from the version with serial key @var{first}, +-and ending with serial key @var{last}. +- +-@item -h @var{host} +-@itemx --server=@var{host} +-@opindex -h +-@opindex --server +-Connect to server @var{host}. +- +-@item -H +-@opindex -H +-Hide legal disclaimers. +- +-@item -i @var{attr}[,@var{attr2}@dots{}] +-@opindex -i +-Do an inverse lookup for specified attributes. +-Use a comma separated list for multiple attributes. +- +-@item -l +-@opindex -l +-One level less specific lookup. +-Applies to RPSL only. +- +-@item -L +-@opindex -L +-Find all less specific matches. +- +-@item -m +-@opindex -m +-Find more specific matches, one level deeper. +- +-@item -M +-@opindex -M +-Find all more specific matches. +- +-@item -p @var{port} +-@opindex -p +-Connect to server port @var{port}. +- +-@item -q @{version|sources@} +-@opindex -q +-Query specified server info. +-Applies to RPSL only. +- +-@item -r +-@opindex -r +-Turn off recursive lookups. +- +-@item -R +-@opindex -R +-Force output to show local copy of the domain object, +-even if it contains a referral. +- +-@item -s @var{source}[,@var{source2}@dots{}] +-@opindex -s +-Search the data base at @var{source}. +-A comma separated list queries multiple providers. +- +-@item -S +-@opindex -S +-Tell server to refrain from syntactic sugar. +- +-@item -t @var{type} +-@opindex -t +-Request a template for objects of type @var{type}. +-Use the value @samp{all} for a list of possible types. +- +-@item -T @var{type}[,@var{type2}@dots{}] +-@opindex -T +-Search only for objects of type @var{type}. +-A comma separated list allows for multiple types. +- +-@item -V +-@itemx --verbose +-@opindex -V +-@opindex --verbose +-Verbosely explain all actions taken. +- +-@item -x +-@opindex -x +-Search only for exact matches. +-Applicable only to RPSL. +-@end table +- +-@section Environment variables +-@anchor{whois environment} +- +-@command{whois} holds an internal list of information servers +-and their assigned data bases. +-Queries are examined against this list to select the most +-plausible server, but the hint can always be overruled on +-the command line by use of the option @option{-h}. +-If neither of these have a say, then the default server to ask +-is @samp{whois.internic.net}, but this name is in turn overruled +-by a server name in the environment variable @env{WHOIS_SERVER}. +- +-@table @env +-@item LANG +-When the server @samp{whois.nic.ad.jp} is queried, and only then, +-any non-Japanese locale in @env{LANG} will ask the server to reply +-with English text, not Japanese. +- +-@item WHOIS_HIDE +-When set, the effect on @command{whois} is as if the +-option @option{-H} had been given. +- +-@item WHOIS_SERVER +-Data base server to query when internal hinting is inconclusive. +-When unset, @samp{whois.internic.net} is used as default server. +- +-@end table +- ++@c @node dnsdomainname invocation ++@c @chapter @command{dnsdomainname}: Show DNS domain name ++@c @pindex dnsdomainname ++@c ++@c @command{dnsdomainname} is a program to show the domain part of the ++@c system's fully qualified domain name. For example, if the FQDN of the ++@c system is @code{name.example.org} the command will show ++@c @code{example.org}. ++@c The output is not necessarily related to the NIS/YP domain name. ++@c ++@c The tool uses gethostname to get the host name of the system and ++@c then getaddrinfo to resolve it into a canonical name. ++@c The domain part of the canonical name is shown, i.e., the part ++@c after the first period@tie{}(@code{.}) of the official name. ++@c ++@c @noindent ++@c Synopsis: ++@c ++@c @example ++@c dnsdomainname [@var{option}@dots{}] ++@c @end example ++@c ++@c @noindent ++@c There is no command specific option. ++@c ++@c @node hostname invocation ++@c @chapter @command{hostname}: Show or set system host name. ++@c @pindex hostname ++@c ++@c @command{hostname} is a program to show or to set the name of a ++@c host system. ++@c ++@c @noindent ++@c Synopsis: ++@c ++@c @example ++@c hostname [@var{option}@dots{}] ++@c hostname @var{name} ++@c @end example ++@c ++@c @noindent ++@c where @var{name} is the name to be used by the running host. ++@c ++@c @section Command line options ++@c @anchor{hostname options} ++@c ++@c @table @option ++@c @item -a ++@c @itemx --aliases ++@c @opindex -a ++@c @opindex --aliases ++@c Get alias names. ++@c ++@c @item -d ++@c @itemx --domain ++@c @opindex -d ++@c @opindex --domain ++@c Get DNS domain name. ++@c ++@c @item -f ++@c @itemx --fqdn ++@c @itemx --long ++@c @opindex -f ++@c @opindex --fqdn ++@c @opindex --long ++@c Get DNS host name or Fully Qualified Domain Name. ++@c ++@c @item -F @var{file} ++@c @itemx --file=@var{file} ++@c @opindex -F ++@c @opindex --file ++@c Set host name or NIS domain name from FILE. ++@c ++@c @item -i ++@c @itemx --ip-addresses ++@c @opindex -i ++@c @opindex --ip-addresses ++@c Get addresses for the host name. ++@c ++@c @item -s ++@c @itemx --short ++@c @opindex -s ++@c @opindex --short ++@c Get short host name. ++@c ++@c @item -y ++@c @itemx --yp ++@c @itemx --nis ++@c @opindex -y ++@c @opindex --yp ++@c @opindex --nis ++@c Get NIS/YP domain name. ++@c @end table ++@c ++@c @node ifconfig invocation ++@c @chapter @command{ifconfig}: Configure network interfaces ++@c @pindex ifconfig ++@c ++@c @command{ifconfig} is a program to retrieve and to set selected ++@c properties of network interfaces. It is best viewed as a tool to ++@c get information, rather than for changing the behaviour of adapters, ++@c since it is hard to support property setting in a portable manner. ++@c ++@c @noindent ++@c Synopsis: ++@c ++@c @example ++@c ifconfig @var{iface} [@var{arg}@dots{}] ++@c ifconfig -i @var{iface} [@var{option}@dots{}] [-i @var{iface2} [@var{option}@dots{}]] ++@c @end example ++@c ++@c @section Command line options ++@c @anchor{ifconfig options} ++@c ++@c @table @option ++@c @item -a ++@c @itemx --all ++@c @opindex -a ++@c @opindex --all ++@c Display all available interfaces, including those that not are ++@c marked as `up', i.e., also the inactive interfaces. ++@c ++@c @item -A @var{addr} ++@c @itemx --address=@var{addr} ++@c @opindex -A ++@c @opindex --address ++@c Set address of selected interface to @var{addr}. ++@c ++@c @item -b @var{addr} ++@c @itemx -B @var{addr} ++@c @itemx --brdaddr=@var{addr} ++@c @itemx --broadcast=@var{addr} ++@c @opindex -b ++@c @opindex -B ++@c @opindex --brdaddr ++@c @opindex --broadcast ++@c Set broadcast address of selected interface to @var{addr}. ++@c ++@c @item -d @var{addr} ++@c @itemx -p @var{addr} ++@c @itemx --dstaddr=@var{addr} ++@c @itemx --peer=@var{addr} ++@c @opindex -d ++@c @opindex -p ++@c @opindex --dstaddr ++@c @opindex --peer ++@c Set destination (peer) address of selected interface. ++@c ++@c @item --down ++@c @opindex --down ++@c Deactivate the selected interface. ++@c ++@c @item -F @var{list} ++@c @itemx --flags=@var{list} ++@c @opindex -F ++@c @opindex --flags ++@c Change those interface flags mentioned in @var{list}. ++@c The argument is a comma separated list of one ore more ++@c flag names to be set, or in case the name is prepended ++@c with @samp{no}, the corresponding flag is cleared. ++@c The output of @command{ifconfig} with the option @option{--help} ++@c contains a list of available flag names. ++@c ++@c @item --format=@var{format} ++@c @opindex --format ++@c Select output format; the value @samp{help} prints a list ++@c of all available formats. ++@c ++@c @item -i @var{name} ++@c @itemx --interface=@var{name} ++@c @opindex -i ++@c @opindex --interface ++@c Select the named interface for any following action. ++@c ++@c @item -l ++@c @itemx --list ++@c @opindex -l ++@c @opindex --list ++@c List, with name only, all available interfaces, or only those ++@c selected should at least one option @option{-i} have specified. ++@c ++@c @item -m @var{mask} ++@c @itemx --netmask=@var{mask} ++@c @opindex -m ++@c @opindex --netmask ++@c Set netmask of selected interface to @var{mask}. ++@c ++@c @item --metric=@var{n} ++@c @opindex --metric ++@c Set the metric of selected interface to the number @var{n}. ++@c ++@c @item -M @var{n} ++@c @itemx --mtu=@var{n} ++@c @opindex -M ++@c @opindex --mtu ++@c Set MTU of selected interface to the number @var{n}. ++@c ++@c @item -s ++@c @itemx --short ++@c @opindex -s ++@c @opindex --short ++@c Use short output format. This is identical to specifying ++@c @samp{--format=netstat}. ++@c ++@c @item --up ++@c @opindex --up ++@c Activate the selected interface. ++@c ++@c @item -v ++@c @itemx --verbose ++@c @opindex -v ++@c @opindex --verbose ++@c Print informational messages when configuring an interface. ++@c @end table ++@c ++@c Observe that the use of program options is the only manner ++@c in which @command{ifconfig} is able to handle multiple ++@c interfaces in one invocation. Once a particular interface ++@c has been selected using @option{-i}, it is affected by any ++@c following option until replaced by another interface selector. ++@c This is also the main cause, that @command{ifconfig} is ++@c unable to treat options independently of their order, as is ++@c mostly the case in other GNU software. ++@c ++@c @section Formatted status output ++@c @anchor{ifconfig formats} ++@c ++@c The status of one or more interfaces can be presented in a number ++@c of different formats. A list of them is printed by the option ++@c @option{--format=help}. In the following table the valid formats ++@c are given, each is used in the form @option{--format=@var{name}}. ++@c ++@c @table @asis ++@c @item check ++@c @itemx check-existence ++@c @itemx ? ++@c Place holders for the ability to check whether the interfaces ++@c selected by one or more options @option{-i} are determining ++@c existing interfaces in the running system. No output in case ++@c of success, an error message in case of a failure. ++@c ++@c @item gnu ++@c @itemx default ++@c Standard GNU output format. ++@c ++@c @item gnu-one-entry ++@c Like the previous format, but with intermediary newlines removed. ++@c ++@c @item help ++@c Display a list of valid formats, together with a short description ++@c for each choice. ++@c ++@c @item net-tools ++@c Imitation of presentation used by the implementation in @samp{net-tools}. ++@c Default format for GNU/Linux. ++@c ++@c @item netstat ++@c Terse output with statistics, similar to that of @code{netstat -i}. ++@c ++@c @item osf ++@c Format variant of @samp{unix} preferred by OSF's implementation. ++@c ++@c @item unix ++@c Traditional UNIX type format. Default for BSD, HPUX and Solaris. ++@c @end table ++@c ++@c @section Legacy syntax ++@c @anchor{ifconfig legacy syntax} ++@c ++@c The traditional mode of invoking @command{ifconfig} is via ++@c a parsed command line, without all use of program switches ++@c and options, relying fully on argument parsing. This mode ++@c of use is supported also in the present implementation, ++@c but keep in mind that only one interface can be manipulated ++@c using this legacy syntax. ++@c ++@c @example ++@c ifconfig NAME [ADDR [DSTADDR]] [broadcast BRDADDR] [netmask MASK] ++@c [metric N] [mtu N] [up|down] ++@c @end example ++@c ++@c As is conventional, only the primary address and possibly the ++@c peer destination address are stated as bare arguments, without ++@c a specifying keyword. ++@c Some slight variation on this syntax will depend on the target ++@c system for which the program is being built, as not all platforms ++@c support identical abilities. ++@c The best information is found via the usage massage ++@c @samp{ifconfig --usage}. ++@c ++@c @node logger invocation ++@c @chapter @command{logger}: Send messages to system log ++@c @pindex logger ++@c ++@c @command{logger} is a program to send entries to system log. It ++@c provides a shell command interface similar to the system log module. ++@c For background information, ++@c @pxref{Syslog, , Syslog, libc, The GNU C Library Reference Manual}. ++@c ++@c @noindent ++@c Synopsis: ++@c ++@c @example ++@c logger [@var{option}@dots{}] [@var{message}] ++@c @end example ++@c ++@c @section Command line options ++@c @anchor{logger options} ++@c ++@c @table @option ++@c @item -4 ++@c @itemx --ipv4 ++@c @opindex -4 ++@c @opindex --ipv4 ++@c Use IPv4 as transport when logging to a host. The default behaviour ++@c is to use whatever IP version that matches the host. ++@c ++@c @item -6 ++@c @itemx --ipv6 ++@c @opindex -6 ++@c @opindex --ipv6 ++@c Use IPv6 as transport when logging to a host. The option is present ++@c also on systems without support for IPv6, but will then issue a warning ++@c and then fall back to IPv4 when delivering the message. ++@c ++@c Both options are most influencial when the target host is named using ++@c a symbolic name, but numerical addresses for host or source must also ++@c match if either of @option{--ipv4} or @option{--ipv6} is stated. ++@c ++@c @item -f @var{file} ++@c @itemx --file=@var{file} ++@c @opindex -f ++@c @opindex --file ++@c Log the content of the specified file. If @var{file} is @samp{-} then ++@c standard input is assumed. ++@c ++@c @item -h @var{host} ++@c @itemx --host=@var{host} ++@c @opindex -h ++@c @opindex --host ++@c Send messages to the given host or socket. The @var{host} argument ++@c can be either a local UNIX socket name (containing a slash @samp{/}), ++@c or be of the form ++@c ++@c @example ++@c @var{host}[:@var{port}] ++@c @end example ++@c ++@c @noindent ++@c where @var{host} is the remote host name or IP address, and the ++@c optional @var{port} is a decimal port number or symbolic service ++@c name from @file{/etc/services}. If @var{port} is not specified, ++@c the port number corresponding to the @samp{syslog} service is used. ++@c If a numerical IPv6 address is given without a port specification, ++@c then the address must be enclosed within brackets (like [::1]). ++@c ++@c @item -i[@var{pid}] ++@c @itemx --id=[@var{pid}] ++@c @opindex -i ++@c @opindex --id ++@c Add process ID to each message. If @var{pid} is not supplied, use the ++@c process ID of the logger process with each line. Notice, that ++@c @var{pid} is an optional argument. When supplied to the @option{-i} ++@c option, it must follow the @samp{i} letter immediately, without any ++@c separating whitespace. When supplied to the @option{--id} form, it ++@c must be separated from it by exactly one equals sign. ++@c ++@c @item -p @var{priority} ++@c @itemx --priority=@var{priority} ++@c @opindex -p ++@c @opindex --priority ++@c Enter the message with the specified priority. The priority may be ++@c specified numerically or as a @samp{facility.level} pair. For ++@c example, @option{-p local3.info} logs the message at the informational ++@c level in the @samp{local3} facility. The default is ++@c @samp{user.notice}. ++@c ++@c The actual list of supported facilities and levels is system specific. ++@c ++@c @item -s ++@c @itemx --stderr ++@c @opindex -s ++@c @opindex --stderr ++@c Log the message to standard error, as well as to the system log. ++@c ++@c @item -S @var{addr} ++@c @itemx --source=@var{addr} ++@c @opindex -S ++@c @opindex --source ++@c Supply the source IP address for INET connections. This option is ++@c useful in conjunction with @option{--host} (see above). The kind of ++@c address specified here (IPv4 or IPv6) will propagate to influence ++@c the resolution of the host address, if it is a symbolic name. ++@c ++@c @item -t @var{tag} ++@c @itemx --tag=@var{tag} ++@c @opindex -t ++@c @opindex --tag ++@c Mark every line in the log with the specified tag. ++@c ++@c @item -u @var{socket} ++@c @itemx --unix=@var{socket} ++@c @opindex -h ++@c @opindex --host ++@c Send messages to the given local UNIX socket. The @var{socket} argument ++@c can be either an absolute path (starting with a slash @samp{/}), or a relative ++@c path understood relative to the current working directory. ++@c @end table ++@c ++@c The options are followed by the message which should be written to the ++@c log. If not specified, and the @option{-f} flag is not provided, ++@c standard input is logged. ++@c ++@c @section Examples ++@c @anchor{logger examples} ++@c ++@c The following examples illustrate the usage of the @command{logger} ++@c command: ++@c ++@c @enumerate 1 ++@c @item Log the message @samp{System rebooted} to the local syslog. ++@c Use default facility and priority: ++@c ++@c @example ++@c logger System rebooted ++@c @end example ++@c ++@c @item Run command and send its error output to the channel ++@c @samp{local0.err}. Mark each message with tag @samp{cmd}: ++@c ++@c @example ++@c command 2>&1 | logger -p local0.err -t cmd ++@c @end example ++@c ++@c @item Log each line from file @file{warnings} to channel ++@c @samp{daemon.warn} on host @samp{logger.runasimi.org}, ++@c using the source IP @samp{10.10.10.1}: ++@c ++@c @example ++@c logger -p daemon.warn -h logger.runasimi.org -S 10.10.10.1 \ ++@c @verb{| |}--file warnings ++@c @end example ++@c @end enumerate ++@c ++@c @node ping invocation ++@c @chapter @command{ping}: Packets to network hosts ++@c @pindex ping ++@c ++@c @c FIXME: The text is far to detailed about the actual implementation ++@c @c of ping. A user doesn't need to know that we are using TIMEVAL, or ++@c @c how things are padded. ++@c ++@c @command{ping} uses ICMP datagrams to provoke a response ++@c from the chosen destination host, mainly intending to probe ++@c whether it is alive. ++@c ++@c The used datagram, of type @code{ECHO_REQUEST}, contains some header ++@c information and some additional payload, usually a time stamp. ++@c By a suitable choice of payload, different host or router properties ++@c are detectable, as the emitted datagram travels to its destination. ++@c ++@c @ignore %* Too detailed for end user. ++@c @command{ping} uses the ICMP protocol's mandatory ++@c @code{ECHO_REQUEST} datagram to elicit an ICMP type @code{ECHO_REPLY} ++@c packet from a host or gateway. ++@c @code{ECHO_REQUEST} datagrams (@dfn{pings}) have an IP and ++@c an ICMP header, followed by a @dfn{struct timeval} and then ++@c an arbitrary number of @dfn{padding} bytes used to fill out the packet. ++@c @end ignore ++@c ++@c @noindent ++@c Synopsis: ++@c ++@c @example ++@c ping [@var{option}@dots{}] @var{host} ++@c @end example ++@c ++@c @noindent ++@c Sending echo requests is the standard use of @command{ping}, ++@c but by far not the only use case. ++@c ++@c @menu ++@c * Ping options:: ++@c * Fault isolation:: ++@c * Duplicate and damaged packets:: ++@c * Data patterns:: ++@c * TTL details:: ++@c * Further remarks:: ++@c @end menu ++@c ++@c @node Ping options ++@c @section Command line options ++@c @anchor{ping options} ++@c ++@c @c Options controlling ICMP request types: ++@c @c --address Send ICMP_ADDRESS packets (root only) ++@c @c --echo Send ICMP_ECHO packets (default) ++@c @c --mask Same as --address ++@c @c --timestamp Send ICMP_TIMESTAMP packets ++@c @c -t, --type=TYPE Send TYPE packets ++@c ++@c Selection of packet type is handled by these first options: ++@c ++@c @table @option ++@c @item --address ++@c @opindex --address ++@c Send ICMP_ADDRESS packets, thus requesting the address netmask ++@c in use by the targetted host. ++@c ++@c @item --echo ++@c @opindex --echo ++@c Send ICMP_ECHO requests. ++@c This is the default action. ++@c ++@c @item --mask ++@c @opindex --mask ++@c Identical to @option{--address}. ++@c ++@c @item --timestamp ++@c @opindex --timestamp ++@c Send ICMP_TIMESTAMP packets, thereby requesting a timed response ++@c from the targetted host. ++@c ++@c In successful cases three time values are returned. ++@c All are expected to state the number of milliseconds since ++@c midnight@tie{}UTC. ++@c The first of these, @samp{icmp_otime}, contains the original ++@c time of sending the request. ++@c Then comes @samp{icmp_rtime}, the time of reception by the target, ++@c and finally, @samp{icmp_ttime}, the time of transmitting an answer ++@c back to the originator. ++@c ++@c @item -t @var{type} ++@c @itemx --type=@var{type} ++@c @opindex --type ++@c @opindex -t ++@c Send @var{type} packets. Accepted values are @samp{address}, ++@c @samp{echo}, @samp{mask}, and @samp{timestamp}. ++@c @end table ++@c ++@c @c Options valid for all request types: ++@c @c -c, --count=NUMBER Stop after sending NUMBER packets ++@c @c -d, --debug Set the SO_DEBUG option ++@c @c -i, --interval=NUMBER Wait NUMBER seconds between sending each packet ++@c @c -n, --numeric Do not resolve host addresses ++@c @c -r, --ignore-routing Send directly to a host on an attached network ++@c @c -T, --tos=NUM Set type-of-service to NUM ++@c @c --ttl=NUMBER Set specified time-to-live on packet ++@c ++@c @noindent ++@c The following options are available for all packet types: ++@c ++@c @table @option ++@c @item -c @var{n} ++@c @itemx --count=@var{n} ++@c @opindex -c ++@c @opindex --count ++@c Stop after sending and receiving answers to a total of ++@c @var{n} packets. ++@c ++@c @item -d ++@c @itemx --debug ++@c @opindex -d ++@c @opindex --debug ++@c Set the SO_DEBUG option on the socket being used. ++@c ++@c @item -i @var{n} ++@c @itemx --interval=@var{n} ++@c @opindex -i ++@c @opindex --interval ++@c Wait @var{n} seconds until sending next packet. ++@c The default is to wait for one second between packets. ++@c This option is incompatible with the option @option{-f}. ++@c ++@c @item -n ++@c @itemx --numeric ++@c @opindex -n ++@c @opindex --numeric ++@c Numeric output only. No attempt will be made to resolve ++@c symbolic names for host addresses. ++@c ++@c @item -r ++@c @itemx --ignore-routing ++@c @opindex -r ++@c @opindex --ignore-routing-log ++@c Bypass the normal routing tables and send directly to a host on an ++@c attached network. If the host is not on a directly attached network, ++@c an error is returned. This option can be used to ping a local host ++@c through an interface that has no route through it (e.g., after the ++@c interface was dropped by @command{routed}). ++@c ++@c @item -T @var{num} ++@c @itemx --tos=@var{num} ++@c @opindex -T ++@c @opindex --tos ++@c Set type-of-service, TOS field, to @var{num} on ++@c transmitted packets. ++@c ++@c @item --ttl=@var{n} ++@c @opindex --ttl ++@c Set the specified number @var{n} as value of time-to-live when ++@c transmitting packets. Acceptable values are 1 to 255, inclusive. ++@c ++@c @item -v ++@c @itemx --verbose ++@c @opindex -v ++@c @opindex --verbose ++@c Produce more verbose output, giving more statistics. ++@c ++@c @item -w @var{n} ++@c @itemx --timeout=@var{n} ++@c @opindex -w ++@c @opindex --timeout ++@c Stop after @var{n} seconds. ++@c ++@c @item -W @var{n} ++@c @itemx --linger=@var{n} ++@c @opindex -W ++@c @opindex --linger ++@c Maximum number of seconds @var{n} to wait for a response. ++@c @end table ++@c ++@c @c Options valid for --echo requests: ++@c @c -f, --flood Flood ping (root only) ++@c @c --ip-timestamp=FLAG Timestamp IP option of types tsonly, ++@c @c tsaddr, or (not yet implemented) prespec. ++@c @c -l, --preload=NUMBER Send NUMBER packets as fast as possible before ++@c @c falling into normal mode of behavior (root only) ++@c @c -p, --pattern=PATTERN Fill ICMP packet with given pattern (hex) ++@c @c -q, --quiet no packet message ++@c @c -R, --route Record route IP option ++@c @c -s, --size=NUMBER Send NUMBER data octets ++@c ++@c Finally, these last options are relevant only for sending echo requests, ++@c allowing many variations in order to detect various peculiarities of ++@c the targeted host, or the intermediary routers for that matter. ++@c ++@c @table @option ++@c @item -f ++@c @itemx --flood ++@c @opindex -f ++@c @opindex --flood ++@c Flood ping. Outputs packets as fast as they come back or one hundred ++@c times per second, whichever is more. For every ECHO_REQUEST packet ++@c sent, a period @samp{.} is printed, while for every ECHO_REPLY ++@c received in reply, a backspace is printed. ++@c This provides a rapid display of how many packets are being dropped. ++@c Only the super-user may use this option. ++@c This can be very hard on a network and should be used with caution. ++@c ++@c @item --ip-timestamp=@var{flag} ++@c @opindex --ip-timestamp ++@c Include IP option Timestamp in transmitted packets. ++@c The value @var{flag} is either @samp{tsonly}, which only records up ++@c to nine time stamps, or @samp{tsaddr}, which records IP ++@c addresses as well as time stamps, but for at most four hosts. ++@c ++@c @item -l @var{n} ++@c @itemx --preload=@var{n} ++@c @opindex -l ++@c @opindex --preload ++@c If @var{n} is specified, ping sends that many packets as fast as ++@c possible before falling into its normal mode of operation. ++@c ++@c @item -p @var{pat} ++@c @itemx --pattern=@var{pat} ++@c @opindex -p ++@c @opindex --pattern ++@c You may specify up to 16 pad bytes to fill out the packet you send. ++@c This is useful for diagnosing data-dependent problems in a network. ++@c For example, @option{-p ff} will cause the sent packet to be filled ++@c with all ones. ++@c ++@c @item -q ++@c @itemx --quiet ++@c @opindex -q ++@c @opindex --quiet ++@c Do not print timing for each transmitted packet. ++@c @item -R ++@c @itemx --route ++@c @opindex -R ++@c @opindex --route ++@c Record route. Includes the @code{RECORD_ROUTE} field in the ++@c ECHO_REQUEST packet and displays the route buffer on returned packets. ++@c Note that the IP header is only large enough for nine ++@c such routes. ++@c Many hosts ignore or discard this option. ++@c ++@c @item -s @var{n} ++@c @itemx --size=@var{n} ++@c @opindex -s ++@c @opindex --size ++@c Specifies the number of data bytes to be sent. The default is 56, ++@c which translates into 64@tie{}ICMP data bytes, taking ++@c the 8@tie{}bytes of ICMP header data into account. ++@c @end table ++@c ++@c @node Fault isolation ++@c @section Using ping for network fault isolation ++@c ++@c When using @command{ping} for fault isolation, it should first be run ++@c on the local host, to verify that the local network interface is up ++@c and running. Then, hosts and gateways further and further away should ++@c be pinged. Round-trip times and packet loss statistics are computed. ++@c If duplicate packets are received, they are not included in the packet ++@c loss calculation, although the round trip time of these packets is ++@c used in calculating the minimum/average/maximum round-trip time ++@c numbers. When the specified number of packets have been sent (and ++@c received) or if the program is terminated with a @samp{SIGINT}, a ++@c brief summary is displayed. ++@c ++@c This program is intended for use in network testing, measurement and ++@c management. Because of the load it can impose on the network, it is ++@c unwise to use ping during normal operations or from automated scripts. ++@c ++@c @ignore ++@c @section ICMP Packet Details ++@c ++@c An IP header without options consists of 20 bytes. ++@c An ICMP type ECHO_REQUEST packet contains an additional ++@c 8 bytes worth of ICMP header followed by an arbitrary ++@c amount of data. ++@c When a packet size is stated, that indicates ++@c the size of the extra piece of data (the default is 56). ++@c Thus the amount of data received as an IP packet ++@c with an ICMP type ECHO_REPLY, will always be 8 bytes larger ++@c than the requested data space (the ICMP header). ++@c ++@c If the data space is at least eight bytes large, ping uses the first ++@c eight bytes of this space to include a timestamp which it uses in the ++@c computation of round trip times. If less than eight bytes of pad are ++@c specified, no round trip times are given. ++@c @end ignore ++@c ++@c @node Duplicate and damaged packets ++@c @section Duplicate and damaged packets ++@c ++@c Ping will report duplicate and damaged packets. Duplicate packets ++@c should never occur, and seem to be caused by inappropriate link-level ++@c retransmissions. Duplicates may occur in many situations and are ++@c rarely (if ever) a good sign, although the presence of low levels of ++@c duplicates may not always be cause for alarm. ++@c ++@c Damaged packets are obviously serious cause for alarm and often ++@c indicate broken hardware somewhere in the ping packet's path (in the ++@c network or in the hosts). ++@c ++@c @node Data patterns ++@c @section Trying different data patterns ++@c ++@c The (inter)network layer should never treat packets differently ++@c depending on the data contained in the data portion. Unfortunately, ++@c data-dependent problems have been known to sneak into networks and ++@c remain undetected for long periods of time. In many cases the ++@c particular pattern that will have problems is something that doesn't ++@c have sufficient ``transitions'', such as all ones or all zeros, or a ++@c pattern right at the edge, such as almost all zeros. It isn't ++@c necessarily enough to specify a data pattern of all zeros (for ++@c example) on the command line because the pattern that is of interest ++@c is at the data link level, and the relationship between what you type ++@c and what the controllers transmit can be complicated. ++@c ++@c This means that if you have a data-dependent problem you will probably ++@c have to do a lot of testing to find it. If you are lucky, you may ++@c manage to find a file that either can't be sent across your network or ++@c that takes much longer to transfer than other similar length files. ++@c You can then examine this file for repeated patterns that you can test ++@c using the @option{-p} option of ping. ++@c ++@c @node TTL details ++@c @section TTL details ++@c ++@c The TTL field, @dfn{Time To Live}, of an IP ++@c packet represents the maximum number of IP routers ++@c that the packet can go through before being discarded. ++@c In current practice you can expect each router on the ++@c Internet to decrement the TTL field by exactly one. ++@c ++@c The TCP/IP specification states that the TTL field ++@c of a new TCP packet should be set to 60, ++@c but many systems use smaller values (4.3BSD used 30 ++@c and 4.2BSD used 15). ++@c ++@c The maximum possible value of this field is 255, and most UNIX systems ++@c set the TTL field of ICMP (type @code{ECHO_REQUEST}) ++@c packets to 255. This is why you will find you can ping some hosts, ++@c but not reach them with @command{telnet} or @command{ftp}. ++@c ++@c During normal operation, @command{ping} prints the TTL value ++@c for every packet it receives. ++@c When a remote system receives an ICMP packet, ++@c it can do one of three things to the TTL field ++@c in its response packet: ++@c ++@c @itemize @bullet ++@c @item ++@c Not to change it. This is what Berkeley UNIX systems did before the ++@c 4.3BSD-Tahoe release. In this case the TTL value in the ++@c received packet will be 255 minus the number of routers in the ++@c round-trip path. ++@c ++@c @item ++@c Set it to 255. This is what current Berkeley UNIX systems do. In this ++@c case the TTL value in the received packet will be 255 minus the ++@c number of routers in the path from the remote system to the pinging ++@c host. ++@c ++@c @item ++@c Set it to some other value. Some machines use the same value for ++@c ICMP packets that they use for TCP packets, ++@c for example either 30 or 60. ++@c Others may use completely arbitrary values. ++@c ++@c @end itemize ++@c ++@c @node Further remarks ++@c @section Further observations ++@c Many hosts and gateways ignore the @code{RECORD_ROUTE} field, since ++@c the maximum IP header length is far to small to hold all ++@c the routes. ++@c There is not much that can be done about this. ++@c ++@c Flood pinging is not recommended in general, and flood pinging the ++@c broadcast address should only be done under very controlled ++@c conditions. ++@c ++@c Some BSD variants offer a kernel setting to inhibit all replies ++@c to ICMP_MASKREQ packets, but in general, Unices are designed either ++@c to answer the request with a valid netmask, or to drop the request, ++@c causing @command{ping} to wait for a timeout condition. ++@c ++@c @node ping6 invocation ++@c @chapter @command{ping6}: Packets to IPv6 network hosts ++@c @pindex ping6 ++@c ++@c @command{ping6} uses ICMPv6 datagrams to get a response ++@c from the chosen destination host. ++@c The most common use is to probe whether the remote ++@c system is responsive. ++@c Observe that this program only uses IPv6 datagrams. ++@c ++@c Each datagram, of type @code{ECHO_REQUEST}, carries some header ++@c information and some additional payload, usually a time stamp. ++@c Making a suitable choice of payload, it is possible to probe ++@c different host or router properties on the way as the emitted ++@c datagram travels to its destination. ++@c ++@c @noindent ++@c Synopsis: ++@c ++@c @example ++@c ping6 [@var{option}@dots{}] @var{host} ++@c @end example ++@c ++@c @noindent ++@c Sending simple, timed echo requests is the standard use ++@c of @command{ping6}, but is by far not the only use case. ++@c ++@c This command is a close parallel to @command{ping}, ++@c except that it handles IPv6 and is thus not able ++@c to handle peculiarities of IPv4. ++@c ++@c @section Command line options ++@c @anchor{ping6 options} ++@c ++@c @table @option ++@c @item -c @var{n} ++@c @itemx --count=@var{n} ++@c @opindex -c ++@c @opindex --count ++@c Stop after sending and receiving answers to a total of ++@c @var{n} packets. ++@c ++@c @item -d ++@c @itemx --debug ++@c @opindex -d ++@c @opindex --debug ++@c Set the SO_DEBUG option on the socket being used. ++@c ++@c @item -f ++@c @itemx --flood ++@c @opindex -f ++@c @opindex --flood ++@c Flood ping. ++@c Outputs packets as fast as they come back, ++@c or one hundred times per second, whichever is more. ++@c For every ECHO_REQUEST packet sent, a period @samp{.} is printed, ++@c while for every ECHO_REPLY received in reply, a backspace is printed. ++@c ++@c This provides a rapid display of how many packets are being dropped. ++@c Only the super-user may use this option. ++@c This mode can be very hard on a network. ++@c It should be used with caution! ++@c ++@c @item --hoplimit=@var{n} ++@c @opindex --hoplimit ++@c Limit maximal distance to @var{n}. ++@c Acceptable values are 1 to 255, inclusive. ++@c ++@c @item -i @var{n} ++@c @itemx --interval=@var{n} ++@c @opindex -i ++@c @opindex --interval ++@c Wait @var{n} seconds until sending next packet. ++@c The default is to wait for one second between packets. ++@c This option is incompatible with the option @option{-f}. ++@c ++@c @item -l @var{n} ++@c @itemx --preload=@var{n} ++@c @opindex -l ++@c @opindex --preload ++@c Sends @var{n} packets as fast as possible before falling ++@c back to the normal mode of operation. ++@c ++@c @item -n ++@c @itemx --numeric ++@c @opindex -n ++@c @opindex --numeric ++@c Numeric output only. ++@c No attempt will be made to resolve symbolic names for host addresses. ++@c ++@c @item -p @var{pattern} ++@c @itemx --pattern=@var{pattern} ++@c @opindex -p ++@c @opindex --pattern ++@c Up to 16 hexadecimal pad bytes are given as @var{pattern}. ++@c These are use for filling out the packets you send. ++@c This option is useful for diagnosing data-dependent problems ++@c within a network. ++@c As an example, @option{-p ff} will cause the sent packets ++@c to have payloads with every bit set to one. ++@c ++@c @item -q ++@c @itemx --quiet ++@c @opindex -q ++@c @opindex --quiet ++@c Do not print timing result of each transmitted packet. ++@c ++@c @item -r ++@c @itemx --ignore-routing ++@c @opindex -r ++@c @opindex --ignore-routing-log ++@c Bypass the normal routing tables and send directly ++@c to a host on an attached network. ++@c If the host is not on a directly attached network, ++@c an error is returned. ++@c This option can be used to ping a local host ++@c through an interface, for which there is no ++@c assigned route, such as when the interface ++@c was dropped by @command{routed}. ++@c ++@c @item -s @var{n} ++@c @itemx --size=@var{n} ++@c @opindex -s ++@c @opindex --size ++@c Specifies the number of data bytes to be sent. The default is 56, ++@c which translates into 64@tie{}ICMP data bytes, taking ++@c the 8@tie{}bytes of ICMP header data into account. ++@c ++@c @item -T @var{num} ++@c @itemx --tos=@var{num} ++@c @opindex -T ++@c @opindex --tos ++@c Set the traffic class to @var{num} on transmitted packets. ++@c ++@c @item --ttl=@var{n} ++@c @opindex --ttl ++@c Synonym for @option{--hoplimit}. ++@c ++@c @item -v ++@c @itemx --verbose ++@c @opindex -v ++@c @opindex --verbose ++@c Produce more verbose output, giving more statistics. ++@c ++@c @item -w @var{n} ++@c @itemx --timeout=@var{n} ++@c @opindex -w ++@c @opindex --timeout ++@c Stop after @var{n} seconds. ++@c @end table ++@c ++@c The documentation of @command{ping} provides several ++@c pieces of information, and discussions, relevant to ++@c the use of @command{ping6}. ++@c Keep in mind, though, that the differing address family ++@c causes some discrepancy. ++@c @xref{ping invocation}. ++@c ++@c @node traceroute invocation ++@c @chapter @command{traceroute}: Trace the route to a host ++@c @pindex traceroute ++@c ++@c @command{traceroute} prints a trace of the route ++@c IP@tie{}packets are travelling to a remote host. ++@c ++@c @noindent ++@c Synopsis: ++@c ++@c @example ++@c traceroute [@var{option}@dots{}] @var{host} ++@c @end example ++@c ++@c @section Command line options ++@c @anchor{traceroute options} ++@c ++@c @table @option ++@c @item -f @var{num} ++@c @itemx --first-hop=@var{num} ++@c @opindex -f ++@c @opindex --first-hop ++@c Set the initial hop distance to @var{num}, instead of the default 1. ++@c This immediately allows probing packets to sense routing ++@c properties closer to the target host, skipping routers close ++@c to the local host. Quicker analysis of problems known to lie ++@c at some routing distance is the outcome. ++@c ++@c @item -g @var{gates} ++@c @itemx --gateways=@var{gates} ++@c @opindex -g ++@c @opindex --gateways ++@c Set intermediary hosts used in loose source routing. ++@c The argument @var{gates} is a list of gateways, ++@c using spaces, commata, or semicola as separators. ++@c These hosts must be traversed in the given order ++@c before the intended host receives any datagram. ++@c At most eight host names or addresses may be specified. ++@c Multiple uses of @option{-g} produce a concatenated list. ++@c ++@c @item -I ++@c @itemx --icmp ++@c @opindex -I ++@c @opindex --icmp ++@c Use ICMP ECHO datagrams for probing the remote host. ++@c ++@c @item -m @var{num} ++@c @itemx --max-hop=@var{num} ++@c @opindex -m ++@c @opindex --max-hop ++@c Set the maximum time-to-live allowed for probing. ++@c In other words, stop probing when the hop distance ++@c is in excess of @var{num}. ++@c The default limit is 64. ++@c ++@c @item -M @var{method} ++@c @itemx --type=@var{method} ++@c @opindex -M ++@c @opindex --type ++@c Use @var{method} as carrier packets for traceroute operations. ++@c Supported choices are @samp{icmp} and @samp{udp}, where @samp{udp} ++@c is the default type. ++@c ++@c @item -p @var{port} ++@c @itemx --port=@var{port} ++@c @opindex -p ++@c @opindex --port ++@c Set destination port of target to @var{port}. ++@c The default value is 33434. ++@c ++@c @item -q @var{num} ++@c @itemx --tries=@var{num} ++@c @opindex -q ++@c @opindex --tries ++@c Send a total of @var{num} probe packets per hop, defaulting to 3. ++@c ++@c @item --resolve-hostnames ++@c @opindex --resolve-hostnames ++@c Attempt to resolve all addresses as hostnames. ++@c ++@c @item -t @var{num} ++@c @itemx --tos=@var{num} ++@c @opindex -t ++@c @opindex --tos ++@c Set type-of-service, TOS field, to @var{num} on ++@c transmitted packets. ++@c ++@c @item -w @var{num} ++@c @itemx --wait=@var{num} ++@c @opindex -w ++@c @opindex --wait ++@c Set timeout in seconds, within which a returning response ++@c packet is accepted as such. ++@c Default waiting time is three seconds. ++@c @end table ++@c ++@c @section Diagnostic tokens ++@c @anchor{traceroute printing} ++@c ++@c During execution, @command{traceroute} sends three datagrams ++@c for each value for the TTL field, printing a diagnostic line ++@c of output for these. The TTL field is then steadily increased ++@c until the intended host responds, or some intermediary gateway ++@c returns a datagram to the effect that the target cannot be ++@c reached due to one reason or another. ++@c ++@c Each line of output displays a sequence number, followed by ++@c diagnostic annotation. Any responding host has its address ++@c printed without repetition, together with a measured timing. ++@c In case there is no response within a time period of three seconds, ++@c an asterisque @samp{*} is printed. ++@c ++@c When an intermediate router responds with an exceptional state, ++@c the time elapsed since emitting the original datagram is printed, ++@c followed by an additional short hand hint of the reason: ++@c ++@c @table @samp ++@c @item !F ++@c Fragmentation needed by gateway. ++@c ++@c @item !H ++@c Host not reachable from gateway. ++@c ++@c @item !N ++@c Network not reachable from gateway. ++@c ++@c @item !P ++@c Protocol not usable at host, or within network. ++@c ++@c @item !S ++@c Source routing failed at gateway. ++@c ++@c @item !T ++@c Host or network not reachable for stated type of service, TOS. ++@c ++@c @item !U ++@c Isolated host, not reachable. ++@c ++@c @item !X ++@c Forbidden by remote administration. ++@c @end table ++@c ++@c @node whois invocation ++@c @chapter @command{whois}: User interface to WHOIS data bases. ++@c @pindex whois ++@c ++@c The functionality of a world wide Internet is dependent on ++@c stored node information of different kinds. ++@c Registrars keep much relevant material in WHOIS data bases. ++@c This utility @command{whois} is able to query those sources ++@c for general and for particular properties of most domains. ++@c ++@c For many domains there are names of suitable data base servers ++@c hard coded into @command{whois}, ready to query for domain ++@c relevant information. ++@c Since servers' names do change from time to time, ++@c this utility might occasionally need some guidance using ++@c a suitable command line option. ++@c ++@c @noindent ++@c Synopsis: ++@c ++@c @example ++@c whois [@var{OPTION}@dots{}] @var{OBJECT}@dots{} ++@c @end example ++@c ++@c @section Command line options ++@c @anchor{whois options} ++@c ++@c @table @option ++@c @item -a ++@c @opindex -a ++@c Search all data bases. ++@c ++@c @item -F ++@c @opindex -F ++@c Fast and raw output. Implies @option{-r}. ++@c ++@c @item -g @var{source}:@var{first}-@var{last} ++@c @opindex -g ++@c Find updates for an object from provider @var{source}, ++@c starting from the version with serial key @var{first}, ++@c and ending with serial key @var{last}. ++@c ++@c @item -h @var{host} ++@c @itemx --server=@var{host} ++@c @opindex -h ++@c @opindex --server ++@c Connect to server @var{host}. ++@c ++@c @item -H ++@c @opindex -H ++@c Hide legal disclaimers. ++@c ++@c @item -i @var{attr}[,@var{attr2}@dots{}] ++@c @opindex -i ++@c Do an inverse lookup for specified attributes. ++@c Use a comma separated list for multiple attributes. ++@c ++@c @item -l ++@c @opindex -l ++@c One level less specific lookup. ++@c Applies to RPSL only. ++@c ++@c @item -L ++@c @opindex -L ++@c Find all less specific matches. ++@c ++@c @item -m ++@c @opindex -m ++@c Find more specific matches, one level deeper. ++@c ++@c @item -M ++@c @opindex -M ++@c Find all more specific matches. ++@c ++@c @item -p @var{port} ++@c @opindex -p ++@c Connect to server port @var{port}. ++@c ++@c @item -q @{version|sources@} ++@c @opindex -q ++@c Query specified server info. ++@c Applies to RPSL only. ++@c ++@c @item -r ++@c @opindex -r ++@c Turn off recursive lookups. ++@c ++@c @item -R ++@c @opindex -R ++@c Force output to show local copy of the domain object, ++@c even if it contains a referral. ++@c ++@c @item -s @var{source}[,@var{source2}@dots{}] ++@c @opindex -s ++@c Search the data base at @var{source}. ++@c A comma separated list queries multiple providers. ++@c ++@c @item -S ++@c @opindex -S ++@c Tell server to refrain from syntactic sugar. ++@c ++@c @item -t @var{type} ++@c @opindex -t ++@c Request a template for objects of type @var{type}. ++@c Use the value @samp{all} for a list of possible types. ++@c ++@c @item -T @var{type}[,@var{type2}@dots{}] ++@c @opindex -T ++@c Search only for objects of type @var{type}. ++@c A comma separated list allows for multiple types. ++@c ++@c @item -V ++@c @itemx --verbose ++@c @opindex -V ++@c @opindex --verbose ++@c Verbosely explain all actions taken. ++@c ++@c @item -x ++@c @opindex -x ++@c Search only for exact matches. ++@c Applicable only to RPSL. ++@c @end table ++@c ++@c @section Environment variables ++@c @anchor{whois environment} ++@c ++@c @command{whois} holds an internal list of information servers ++@c and their assigned data bases. ++@c Queries are examined against this list to select the most ++@c plausible server, but the hint can always be overruled on ++@c the command line by use of the option @option{-h}. ++@c If neither of these have a say, then the default server to ask ++@c is @samp{whois.internic.net}, but this name is in turn overruled ++@c by a server name in the environment variable @env{WHOIS_SERVER}. ++@c ++@c @table @env ++@c @item LANG ++@c When the server @samp{whois.nic.ad.jp} is queried, and only then, ++@c any non-Japanese locale in @env{LANG} will ask the server to reply ++@c with English text, not Japanese. ++@c ++@c @item WHOIS_HIDE ++@c When set, the effect on @command{whois} is as if the ++@c option @option{-H} had been given. ++@c ++@c @item WHOIS_SERVER ++@c Data base server to query when internal hinting is inconclusive. ++@c When unset, @samp{whois.internic.net} is used as default server. ++@c ++@c @end table ++@c + @node ftp invocation + @chapter @command{ftp}: FTP client + @pindex ftp +@@ -2369,521 +2369,521 @@ encountered. If a macro named init is d + executed as the last step in the auto-login process. + @end table + +-@node rcp invocation +-@chapter @command{rcp}: Copy files between machines +-@pindex rcp +- +-@command{rcp} copies files between machines. Each file or directory +-argument is either a remote file name of the form +-@samp{rname@@rhost:path}, or a local file name (containing no @samp{:} +-characters, or a @samp{/} before any @samp{:}s). +- +-@noindent +-Synopsis: +- +-@example +-rcp [@var{option}]@dots{} @var{old-file} @var{new-file} +-rcp [@var{option}]@dots{} @var{files}@dots{} @var{directory} +-@end example +- +-@section Command line options +-@anchor{rcp options} +- +-@table @option +-@item -4 +-@itemx --ipv4 +-@opindex -4 +-@opindex --ipv4 +-Use only IPv4. +- +-@item -6 +-@itemx --ipv6 +-@opindex -6 +-@opindex --ipv6 +-Use only IPv6. +- +-@item -d @var{directory} +-@itemx --target-directory=@var{directory} +-@opindex -d +-@opindex --target-directory +-Copy all source arguments into @var{directory}. +- +-@item -f +-@itemx --from +-@opindex -f +-@opindex --from +-(Server mode only.) Copying from remote host. +- +-@item -k @var{realm} +-@itemx --realm=@var{realm} +-@opindex -k +-@opindex --realm +-The option requests rcp to obtain tickets for the remote host in +-realm @var{realm} instead of the remote host's realm. +- +-@item -K +-@itemx --kerberos +-@opindex -K +-@opindex --kerberos +-Turns off all Kerberos authentication. +- +-@item -p +-@itemx --preserve +-@opindex -p +-@opindex --preserve +-Causes @code{rcp} to attempt to preserve (duplicate) in its copies the +-modification times and modes of the source files, ignoring the umask. +-By default, the mode and owner of the target file are preserved +-if the target itself already exists; otherwise the mode of the source +-file is modified by the @code{umask} setting on the destination host. +- +-@item -r +-@itemx --recursive +-@opindex -r +-@opindex --recursive +-If any of the source files are directories, @command{rcp} copies each +-subtree rooted at that name; in this case the destination must be a +-directory. +- +-@item -t +-@itemx --to +-@opindex -t +-@opindex --to +-(Server mode only.) Copying to remote host. +- +-@item -x +-@itemx --encrypt +-@opindex -x +-@opindex --encrypt +-Turns on encryption for all data passed via the @command{rcp} session. +-This may impact response time and CPU utilization, but provides increased +-security. +- +-@end table +- +-@command{rcp} doesn't detect all cases where the target of a copy +-might be a file in cases where only a directory should be legal. +- +-@command{rcp} can be confused by any output generated by commands in a +-@file{.login}, @file{.profile}, or @file{.cshrc} file on the remote +-host. +- +-The destination user and hostname may have to be specified as +-@samp{rhost.rname} when the destination machine is running the 4.2BSD +-version of @command{rcp}. +- +-@node rexec invocation +-@chapter @command{rexec}: a remote execution program +-@pindex rexec +- +-@command{rexec} is a program that executes a program on another host. +- +-@noindent +-Synopsis: +- +-@example +-rexec --user=@var{login} --password=@var{pass} --host=@var{host} \ +-@verb{| |}[OPTION] @var{command} +-@end example +- +-@section Command line options +-@anchor{rexec options} +- +-@table @option +-@item -4 +-@itemx --ipv4 +-@opindex -4 +-@opindex --ipv4 +-Use only IPv4 connections as all times. +- +-@item -6 +-@itemx --ipv6 +-@opindex -6 +-@opindex --ipv6 +-Use only IPv6 connections. +- +-@item -a +-@itemx --ipany +-@opindex -a +-@opindex --ipany +-Allow any address family for connections. This is the default. +- +-@item -e +-@itemx --error=@var{port} +-@opindex -e +-@opindex --error +-Specify the TCP port to use for stderr redirection, in case it is not +-specified a random port will be used. +- +-@item -h +-@item --host=@var{name} +-@opindex -h +-@opindex --host +-Specify the host with whom to connect: symbolic name or address. +- +-@item -n +-@itemx --noerr +-@opindex -n +-@opindex --noerr +-If specified, an error stream will not be created. +- +-@item -p +-@itemx --password=@var{passwd} +-@opindex -p +-@opindex --password +-Specify the password for logging-in. The special value +-consisting of a single dash @samp{-} will make @command{rexec} +-read a single line from stdin. This input is then used +-as password and is passed as such to the remote server. +-Thus it is possible to hide vital access information +-slightly better than the full disclosure implicit in +-the text of a command line option. +- +-@item -P +-@itemx --port=@var{num} +-@opindex -P +-@opindex --port +-Specify to which numerical port a connection shall be sought. +-If it is not specified, then use port 512/tcp by default. +- +-@item -u +-@itemx --user=@var{name} +-@opindex -u +-@opindex --user +-Specify the user with whom to log into the server. +-@end table +- +-@node rlogin invocation +-@chapter @command{rlogin}: Remote login +-@pindex rlogin +- +-The @command{rlogin} command starts a terminal session on the +-specified remote host, provided the required authentication +-is successful. The remote terminal type is the same as that +-given in the @env{TERM} local environment variable. +-The terminal and the window size stay the same, if the remote +-host supports them, and any changes in size are transferred +-as need may be. +- +-When using the @command{rlogin} command, you can create a link +-in your path, using a host name as the link name. For example: +- +-@example +-# ln -s /usr/bin/rlogin @var{hostname} +-# @var{hostname} -8 +-@end example +- +-@noindent +-Afterwards, the use of @var{hostname} will automatically invoke +-@command{rlogin} to direct a log in request to the remote host +-named @var{hostname}. +- +-@command{rlogin} allows access to the remote host without the use of a +-password. The prerequisite is a suitable specification in @file{~/.rhosts}. +-For details, @xref{rcmd, , rcmd, libc, The GNU C Library Reference Manual}. +- +-@section Command line options +-@anchor{rlogin options} +- +-The options are as follows : +- +-@table @option +-@item -4 +-@itemx --ipv4 +-@opindex -4 +-@opindex --ipv4 +-Use only IPv4. +- +-@item -6 +-@itemx --ipv6 +-@opindex -6 +-@opindex --ipv6 +-Use only IPv6. +- +-@item -8 +-@itemx --8-bit +-@opindex -8 +-@opindex --8-bit +-Allows an eight-bit input data path at all times; otherwise parity +-bits are stripped except when the remote side's stop and start +-characters are other than @kbd{C-S}/@kbd{C-Q}. +- +-@item -d +-@itemx --debug +-@opindex -d +-@opindex --debug +-Turns on socket debugging on the TCP sockets used for communication +-with the remote host. +- +-@item -e @var{char} +-@itemx --escape=@var{char} +-@opindex -e +-@opindex --escape +-Allows user specification of the escape character, which is @samp{~} +-by default. This specification may be as a literal character, or as +-an octal value in the form @samp{\nnn}. +- +-@item -E +-@itemx --no-escape +-@opindex -E +-@opindex --no-escape +-Stops any character from being recognized as an escape character. +-When used with the @option{-8} option, this provides a completely +-transparent connection. +- +-@item -l @var{user} +-@itemx --user=@var{user} +-@opindex -l +-@opindex --user +-By default, the remote username is the same as the local username. +-This option, and the @samp{user@@host} format, allow the remote +-user name to be made explicit, or changed. +-@end table +- +-@noindent +-The next three options are available only if the program +-has been compiled with support for Kerberos authentication. +- +-@table @option +-@item -k @var{realm} +-@itemx --realm=@var{realm} +-@opindex -k +-@opindex --realm +-The option requests rlogin to obtain tickets for the remote host in +-realm @var{realm} instead of the remote host's realm. +- +-@item -K +-@itemx --kerberos +-@opindex -K +-@opindex --kerberos +-Turns off all Kerberos authentication. +- +-@item -x +-@itemx --encrypt +-@opindex -x +-@opindex --encrypt +-Turns on encryption for all data passed via the rlogin session. +-This may impact response time and CPU utilization, but provides +-increased security. +-@end table +- +-@section Escape characters and flow control +- +-As long as the connection stands, the client program @command{rsh} +-is observing the input stream in order to detect so called +-escape sequences, allowing the user to execute some local +-actions without having to tear down the remote connection. +- +-The sequences consist of two characters, the first of which +-always is the distinguished character @var{escape-char}. +-The following sequences are supported: +- +-@c An input line of the form of the two-character sequence +-@itemize @bullet +-@item +-@kbd{@var{escape-char} .} disconnects from the remote host. +- +-@item +-@kbd{@var{escape-char} C-d} does the same. +-(Termios character @samp{VEOF}.) +- +-@item +-@kbd{@var{escape-char} C-z} suspends the session, halting the +-remote process, but keeping it ready for resumed processing. +-The user is given access to a local shell. +-(Termios character @samp{VSUSP}.) +- +-@item +-@kbd{@var{escape-char} @var{delayed-suspend-char}} implements +-a half-way suspend, in the sense of stopping local input from +-reaching the remote side, but still displaying all output from +-the remote host on the local terminal. The remote process is +-still running, but the local user is given a local shell until +-the resuming the original command. +-Normally, only BSD systems offer this mode. +-(Termios character @samp{VDSUSP}.) +-@end itemize +- +-@noindent +-By default, the character tilde @samp{~} is assigned to @var{escape-char}, +-but it can be changed using the option @option{--escape}. +-The processing of escape sequences can even be disable using +-the option @option{--no-escape}. +-On BSD systems, @var{delayed-suspend-char} is usually set to @kbd{C-Y}. +-It displays as @samp{dsusp} using @command{stty}. +- +-All echoing takes place at the remote site, so that the @command{rlogin} +-is transparent except possibly for transmission delays. +-Flow control via @kbd{C-S} and @kbd{C-Q}, if at all supported, +-will stop and start the flow of data on the local terminal. +-Flushing of input and output on interrupts is also +-handled properly. +- +-On the server side the @code{iruserok} and @code{ruserok} functions +-are used to authenticate the connection request, unless Kerberised +-mode is in effect. See the appropriate man pages for more information. +- +-@section Kerberos Authentication +- +-If @command{rlogin} was compiled with kerberos support, options +-@option{-x}, @option{-k}, @option{-K} are available. Each user may +-have a private authorization list in the file @file{.k5login} in their +-home directory. Each line in this file should contain a Kerberos +-principal name of the form @samp{principal/instance@@realm}. If the +-originating user is authenticated to one of the principals named in +-@file{.k5login}, access is granted to the account. The principal +-@samp{accountname@@localrealm} is granted access if there is no +-@file{.k5login} file. Otherwise a login and password will be prompted +-for on the remote machine as in @command{login}. To avoid certain +-security problems, the @file{.k5login} file must be owned by the remote +-user. If Kerberos authentication fails, a warning message is printed +-and the standard Berkeley rlogin is used instead. +- +-@node rsh invocation +-@chapter @command{rsh}: Remote shell +-@pindex rsh +- +-@command{rsh} executes commands on a remote host and copies its local +-standard input to that of the remote command, as well as the remote +-standard output to the local standard output, and the remote standard +-error to the local standard error. Locally raised interrupt, quit and +-terminate signals are all propagated to the remote command. Normally +-@command{rsh} terminates when the remote command does so. +- +-When using the @command{rsh} command, you can for convenience create +-a link in your path, using a host name as name of the link. For example: +- +-@example +-# ln -s /usr/bin/rsh @var{hostname} +-# @var{hostname} ls +-@end example +- +-@noindent +-Afterwards, @var{hostname} will be passed to @command{rsh} as host name +-whenever the command @var{hostname} is issued. +- +-@command{rsh} allows access to the remote host without the use of a +-password. The prerequisite is a suitable specification in @file{~/.rhosts}. +-For details, @xref{rcmd, , rcmd, libc, The GNU C Library Reference Manual}. +- +-If no command is specified for @command{rsh} ar argument following the +-host name, then you will be logged in on the remote host using @command{rlogin}. +- +-@section Command line options +-@anchor{rsh options} +- +-The options are as follows : +- +-@table @option +-@item -4 +-@itemx --ipv4 +-@opindex -4 +-@opindex --ipv4 +-Use only IPv4. +- +-@item -6 +-@itemx --ipv6 +-@opindex -6 +-@opindex --ipv6 +-Use only IPv6. +- +-@item -d +-@itemx --debug +-@opindex -d +-@opindex --debug +-Turns on socket debugging used for communication with the remote host. +- +-@item -l @var{user} +-@itemx --user=@var{user} +-@opindex -l +-@opindex --user +-By default, the remote username is the same as the local username. +-The @option{-l} option and the @samp{username@@host} format allow the +-remote user name to be specified. Kerberos authentication is used, +-whenever available, and authorization is determined as in @command{rlogin} +-(@pxref{rlogin invocation}). +- +-@item -n +-@itemx --no-input +-@opindex -n +-@opindex --no-input +-Use @file{/dev/null} for all input, telling the server side that +-we send no material. This can prevent the remote process from +-blocking, should it optionally accept more input. +-The option is void together with encryption. +-@end table +- +-@noindent +-The next three options are available only if the program +-has been compiled with support for Kerberos authentication. +- +-@table @option +-@item -k @var{realm} +-@itemx --realm=@var{realm} +-@opindex -k +-@opindex --realm +-The option requests rsh to obtain tickets for the remote host in +-realm @var{realm} instead of the remote host's realm. +- +-@item -K +-@itemx --kerberos +-@opindex -K +-@opindex --kerberos +-Turns off all Kerberos authentication. +- +-@item -x +-@itemx --encrypt +-@opindex -x +-@opindex --encrypt +-Turns on encryption for all data passed via the rsh session. This +-may impact response time and CPU utilization, but provides increased +-security. +-@end table +- +-@noindent +-Finally, some compatibility options are present: +- +-@table @option +-@item -8 +-@itemx --8-bit +-@itemx -e @var{char} +-@itemx --escape=@var{char} +-@itemx -E +-@itemx --no-escape +-Ignored during normal operation, but passed on to @command{rlogin} +-when @command{rsh} is invoked without a command argument. +-@end table +- +-@section Note on stream redirections +- +-Beware that non-quoted shell metacharacters are interpreted on the local +-machine, while quoted metacharacters are interpreted on the remote +-machine. For example: +- +-@example +-rsh otherhost cat remotefile >> localfile +-rsh otherhost cat remotefile ">>" otherfile +-@end example +- +-@noindent +-The first command appends the contents of @file{remotefile}, as found +-on the remote host, to the file @file{localfile} on the local host, +-since the local shell will intercept the redirection and will thus +-receive whatever the remote process directs to stdout. +- +-In contrast, the second command will append the contents of the same +-file @file{remotefile} to a file named @file{otherfile} again, but this +-time the file is located on the remote host. The effect of quoting +-the redirection operator is to execute the command +- +-@example +-cat remotefile >> localfile +-@end example +- +-@noindent +-entirely on the remote most, whence stdout at the remote host will +-have nothing to transmit to the listening local host!. +- ++@c @node rcp invocation ++@c @chapter @command{rcp}: Copy files between machines ++@c @pindex rcp ++@c ++@c @command{rcp} copies files between machines. Each file or directory ++@c argument is either a remote file name of the form ++@c @samp{rname@@rhost:path}, or a local file name (containing no @samp{:} ++@c characters, or a @samp{/} before any @samp{:}s). ++@c ++@c @noindent ++@c Synopsis: ++@c ++@c @example ++@c rcp [@var{option}]@dots{} @var{old-file} @var{new-file} ++@c rcp [@var{option}]@dots{} @var{files}@dots{} @var{directory} ++@c @end example ++@c ++@c @section Command line options ++@c @anchor{rcp options} ++@c ++@c @table @option ++@c @item -4 ++@c @itemx --ipv4 ++@c @opindex -4 ++@c @opindex --ipv4 ++@c Use only IPv4. ++@c ++@c @item -6 ++@c @itemx --ipv6 ++@c @opindex -6 ++@c @opindex --ipv6 ++@c Use only IPv6. ++@c ++@c @item -d @var{directory} ++@c @itemx --target-directory=@var{directory} ++@c @opindex -d ++@c @opindex --target-directory ++@c Copy all source arguments into @var{directory}. ++@c ++@c @item -f ++@c @itemx --from ++@c @opindex -f ++@c @opindex --from ++@c (Server mode only.) Copying from remote host. ++@c ++@c @item -k @var{realm} ++@c @itemx --realm=@var{realm} ++@c @opindex -k ++@c @opindex --realm ++@c The option requests rcp to obtain tickets for the remote host in ++@c realm @var{realm} instead of the remote host's realm. ++@c ++@c @item -K ++@c @itemx --kerberos ++@c @opindex -K ++@c @opindex --kerberos ++@c Turns off all Kerberos authentication. ++@c ++@c @item -p ++@c @itemx --preserve ++@c @opindex -p ++@c @opindex --preserve ++@c Causes @code{rcp} to attempt to preserve (duplicate) in its copies the ++@c modification times and modes of the source files, ignoring the umask. ++@c By default, the mode and owner of the target file are preserved ++@c if the target itself already exists; otherwise the mode of the source ++@c file is modified by the @code{umask} setting on the destination host. ++@c ++@c @item -r ++@c @itemx --recursive ++@c @opindex -r ++@c @opindex --recursive ++@c If any of the source files are directories, @command{rcp} copies each ++@c subtree rooted at that name; in this case the destination must be a ++@c directory. ++@c ++@c @item -t ++@c @itemx --to ++@c @opindex -t ++@c @opindex --to ++@c (Server mode only.) Copying to remote host. ++@c ++@c @item -x ++@c @itemx --encrypt ++@c @opindex -x ++@c @opindex --encrypt ++@c Turns on encryption for all data passed via the @command{rcp} session. ++@c This may impact response time and CPU utilization, but provides increased ++@c security. ++@c ++@c @end table ++@c ++@c @command{rcp} doesn't detect all cases where the target of a copy ++@c might be a file in cases where only a directory should be legal. ++@c ++@c @command{rcp} can be confused by any output generated by commands in a ++@c @file{.login}, @file{.profile}, or @file{.cshrc} file on the remote ++@c host. ++@c ++@c The destination user and hostname may have to be specified as ++@c @samp{rhost.rname} when the destination machine is running the 4.2BSD ++@c version of @command{rcp}. ++@c ++@c @node rexec invocation ++@c @chapter @command{rexec}: a remote execution program ++@c @pindex rexec ++@c ++@c @command{rexec} is a program that executes a program on another host. ++@c ++@c @noindent ++@c Synopsis: ++@c ++@c @example ++@c rexec --user=@var{login} --password=@var{pass} --host=@var{host} \ ++@c @verb{| |}[OPTION] @var{command} ++@c @end example ++@c ++@c @section Command line options ++@c @anchor{rexec options} ++@c ++@c @table @option ++@c @item -4 ++@c @itemx --ipv4 ++@c @opindex -4 ++@c @opindex --ipv4 ++@c Use only IPv4 connections as all times. ++@c ++@c @item -6 ++@c @itemx --ipv6 ++@c @opindex -6 ++@c @opindex --ipv6 ++@c Use only IPv6 connections. ++@c ++@c @item -a ++@c @itemx --ipany ++@c @opindex -a ++@c @opindex --ipany ++@c Allow any address family for connections. This is the default. ++@c ++@c @item -e ++@c @itemx --error=@var{port} ++@c @opindex -e ++@c @opindex --error ++@c Specify the TCP port to use for stderr redirection, in case it is not ++@c specified a random port will be used. ++@c ++@c @item -h ++@c @item --host=@var{name} ++@c @opindex -h ++@c @opindex --host ++@c Specify the host with whom to connect: symbolic name or address. ++@c ++@c @item -n ++@c @itemx --noerr ++@c @opindex -n ++@c @opindex --noerr ++@c If specified, an error stream will not be created. ++@c ++@c @item -p ++@c @itemx --password=@var{passwd} ++@c @opindex -p ++@c @opindex --password ++@c Specify the password for logging-in. The special value ++@c consisting of a single dash @samp{-} will make @command{rexec} ++@c read a single line from stdin. This input is then used ++@c as password and is passed as such to the remote server. ++@c Thus it is possible to hide vital access information ++@c slightly better than the full disclosure implicit in ++@c the text of a command line option. ++@c ++@c @item -P ++@c @itemx --port=@var{num} ++@c @opindex -P ++@c @opindex --port ++@c Specify to which numerical port a connection shall be sought. ++@c If it is not specified, then use port 512/tcp by default. ++@c ++@c @item -u ++@c @itemx --user=@var{name} ++@c @opindex -u ++@c @opindex --user ++@c Specify the user with whom to log into the server. ++@c @end table ++@c ++@c @node rlogin invocation ++@c @chapter @command{rlogin}: Remote login ++@c @pindex rlogin ++@c ++@c The @command{rlogin} command starts a terminal session on the ++@c specified remote host, provided the required authentication ++@c is successful. The remote terminal type is the same as that ++@c given in the @env{TERM} local environment variable. ++@c The terminal and the window size stay the same, if the remote ++@c host supports them, and any changes in size are transferred ++@c as need may be. ++@c ++@c When using the @command{rlogin} command, you can create a link ++@c in your path, using a host name as the link name. For example: ++@c ++@c @example ++@c # ln -s /usr/bin/rlogin @var{hostname} ++@c # @var{hostname} -8 ++@c @end example ++@c ++@c @noindent ++@c Afterwards, the use of @var{hostname} will automatically invoke ++@c @command{rlogin} to direct a log in request to the remote host ++@c named @var{hostname}. ++@c ++@c @command{rlogin} allows access to the remote host without the use of a ++@c password. The prerequisite is a suitable specification in @file{~/.rhosts}. ++@c For details, @xref{rcmd, , rcmd, libc, The GNU C Library Reference Manual}. ++@c ++@c @section Command line options ++@c @anchor{rlogin options} ++@c ++@c The options are as follows : ++@c ++@c @table @option ++@c @item -4 ++@c @itemx --ipv4 ++@c @opindex -4 ++@c @opindex --ipv4 ++@c Use only IPv4. ++@c ++@c @item -6 ++@c @itemx --ipv6 ++@c @opindex -6 ++@c @opindex --ipv6 ++@c Use only IPv6. ++@c ++@c @item -8 ++@c @itemx --8-bit ++@c @opindex -8 ++@c @opindex --8-bit ++@c Allows an eight-bit input data path at all times; otherwise parity ++@c bits are stripped except when the remote side's stop and start ++@c characters are other than @kbd{C-S}/@kbd{C-Q}. ++@c ++@c @item -d ++@c @itemx --debug ++@c @opindex -d ++@c @opindex --debug ++@c Turns on socket debugging on the TCP sockets used for communication ++@c with the remote host. ++@c ++@c @item -e @var{char} ++@c @itemx --escape=@var{char} ++@c @opindex -e ++@c @opindex --escape ++@c Allows user specification of the escape character, which is @samp{~} ++@c by default. This specification may be as a literal character, or as ++@c an octal value in the form @samp{\nnn}. ++@c ++@c @item -E ++@c @itemx --no-escape ++@c @opindex -E ++@c @opindex --no-escape ++@c Stops any character from being recognized as an escape character. ++@c When used with the @option{-8} option, this provides a completely ++@c transparent connection. ++@c ++@c @item -l @var{user} ++@c @itemx --user=@var{user} ++@c @opindex -l ++@c @opindex --user ++@c By default, the remote username is the same as the local username. ++@c This option, and the @samp{user@@host} format, allow the remote ++@c user name to be made explicit, or changed. ++@c @end table ++@c ++@c @noindent ++@c The next three options are available only if the program ++@c has been compiled with support for Kerberos authentication. ++@c ++@c @table @option ++@c @item -k @var{realm} ++@c @itemx --realm=@var{realm} ++@c @opindex -k ++@c @opindex --realm ++@c The option requests rlogin to obtain tickets for the remote host in ++@c realm @var{realm} instead of the remote host's realm. ++@c ++@c @item -K ++@c @itemx --kerberos ++@c @opindex -K ++@c @opindex --kerberos ++@c Turns off all Kerberos authentication. ++@c ++@c @item -x ++@c @itemx --encrypt ++@c @opindex -x ++@c @opindex --encrypt ++@c Turns on encryption for all data passed via the rlogin session. ++@c This may impact response time and CPU utilization, but provides ++@c increased security. ++@c @end table ++@c ++@c @section Escape characters and flow control ++@c ++@c As long as the connection stands, the client program @command{rsh} ++@c is observing the input stream in order to detect so called ++@c escape sequences, allowing the user to execute some local ++@c actions without having to tear down the remote connection. ++@c ++@c The sequences consist of two characters, the first of which ++@c always is the distinguished character @var{escape-char}. ++@c The following sequences are supported: ++@c ++@c @c An input line of the form of the two-character sequence ++@c @itemize @bullet ++@c @item ++@c @kbd{@var{escape-char} .} disconnects from the remote host. ++@c ++@c @item ++@c @kbd{@var{escape-char} C-d} does the same. ++@c (Termios character @samp{VEOF}.) ++@c ++@c @item ++@c @kbd{@var{escape-char} C-z} suspends the session, halting the ++@c remote process, but keeping it ready for resumed processing. ++@c The user is given access to a local shell. ++@c (Termios character @samp{VSUSP}.) ++@c ++@c @item ++@c @kbd{@var{escape-char} @var{delayed-suspend-char}} implements ++@c a half-way suspend, in the sense of stopping local input from ++@c reaching the remote side, but still displaying all output from ++@c the remote host on the local terminal. The remote process is ++@c still running, but the local user is given a local shell until ++@c the resuming the original command. ++@c Normally, only BSD systems offer this mode. ++@c (Termios character @samp{VDSUSP}.) ++@c @end itemize ++@c ++@c @noindent ++@c By default, the character tilde @samp{~} is assigned to @var{escape-char}, ++@c but it can be changed using the option @option{--escape}. ++@c The processing of escape sequences can even be disable using ++@c the option @option{--no-escape}. ++@c On BSD systems, @var{delayed-suspend-char} is usually set to @kbd{C-Y}. ++@c It displays as @samp{dsusp} using @command{stty}. ++@c ++@c All echoing takes place at the remote site, so that the @command{rlogin} ++@c is transparent except possibly for transmission delays. ++@c Flow control via @kbd{C-S} and @kbd{C-Q}, if at all supported, ++@c will stop and start the flow of data on the local terminal. ++@c Flushing of input and output on interrupts is also ++@c handled properly. ++@c ++@c On the server side the @code{iruserok} and @code{ruserok} functions ++@c are used to authenticate the connection request, unless Kerberised ++@c mode is in effect. See the appropriate man pages for more information. ++@c ++@c @section Kerberos Authentication ++@c ++@c If @command{rlogin} was compiled with kerberos support, options ++@c @option{-x}, @option{-k}, @option{-K} are available. Each user may ++@c have a private authorization list in the file @file{.k5login} in their ++@c home directory. Each line in this file should contain a Kerberos ++@c principal name of the form @samp{principal/instance@@realm}. If the ++@c originating user is authenticated to one of the principals named in ++@c @file{.k5login}, access is granted to the account. The principal ++@c @samp{accountname@@localrealm} is granted access if there is no ++@c @file{.k5login} file. Otherwise a login and password will be prompted ++@c for on the remote machine as in @command{login}. To avoid certain ++@c security problems, the @file{.k5login} file must be owned by the remote ++@c user. If Kerberos authentication fails, a warning message is printed ++@c and the standard Berkeley rlogin is used instead. ++@c ++@c @node rsh invocation ++@c @chapter @command{rsh}: Remote shell ++@c @pindex rsh ++@c ++@c @command{rsh} executes commands on a remote host and copies its local ++@c standard input to that of the remote command, as well as the remote ++@c standard output to the local standard output, and the remote standard ++@c error to the local standard error. Locally raised interrupt, quit and ++@c terminate signals are all propagated to the remote command. Normally ++@c @command{rsh} terminates when the remote command does so. ++@c ++@c When using the @command{rsh} command, you can for convenience create ++@c a link in your path, using a host name as name of the link. For example: ++@c ++@c @example ++@c # ln -s /usr/bin/rsh @var{hostname} ++@c # @var{hostname} ls ++@c @end example ++@c ++@c @noindent ++@c Afterwards, @var{hostname} will be passed to @command{rsh} as host name ++@c whenever the command @var{hostname} is issued. ++@c ++@c @command{rsh} allows access to the remote host without the use of a ++@c password. The prerequisite is a suitable specification in @file{~/.rhosts}. ++@c For details, @xref{rcmd, , rcmd, libc, The GNU C Library Reference Manual}. ++@c ++@c If no command is specified for @command{rsh} ar argument following the ++@c host name, then you will be logged in on the remote host using @command{rlogin}. ++@c ++@c @section Command line options ++@c @anchor{rsh options} ++@c ++@c The options are as follows : ++@c ++@c @table @option ++@c @item -4 ++@c @itemx --ipv4 ++@c @opindex -4 ++@c @opindex --ipv4 ++@c Use only IPv4. ++@c ++@c @item -6 ++@c @itemx --ipv6 ++@c @opindex -6 ++@c @opindex --ipv6 ++@c Use only IPv6. ++@c ++@c @item -d ++@c @itemx --debug ++@c @opindex -d ++@c @opindex --debug ++@c Turns on socket debugging used for communication with the remote host. ++@c ++@c @item -l @var{user} ++@c @itemx --user=@var{user} ++@c @opindex -l ++@c @opindex --user ++@c By default, the remote username is the same as the local username. ++@c The @option{-l} option and the @samp{username@@host} format allow the ++@c remote user name to be specified. Kerberos authentication is used, ++@c whenever available, and authorization is determined as in @command{rlogin} ++@c (@pxref{rlogin invocation}). ++@c ++@c @item -n ++@c @itemx --no-input ++@c @opindex -n ++@c @opindex --no-input ++@c Use @file{/dev/null} for all input, telling the server side that ++@c we send no material. This can prevent the remote process from ++@c blocking, should it optionally accept more input. ++@c The option is void together with encryption. ++@c @end table ++@c ++@c @noindent ++@c The next three options are available only if the program ++@c has been compiled with support for Kerberos authentication. ++@c ++@c @table @option ++@c @item -k @var{realm} ++@c @itemx --realm=@var{realm} ++@c @opindex -k ++@c @opindex --realm ++@c The option requests rsh to obtain tickets for the remote host in ++@c realm @var{realm} instead of the remote host's realm. ++@c ++@c @item -K ++@c @itemx --kerberos ++@c @opindex -K ++@c @opindex --kerberos ++@c Turns off all Kerberos authentication. ++@c ++@c @item -x ++@c @itemx --encrypt ++@c @opindex -x ++@c @opindex --encrypt ++@c Turns on encryption for all data passed via the rsh session. This ++@c may impact response time and CPU utilization, but provides increased ++@c security. ++@c @end table ++@c ++@c @noindent ++@c Finally, some compatibility options are present: ++@c ++@c @table @option ++@c @item -8 ++@c @itemx --8-bit ++@c @itemx -e @var{char} ++@c @itemx --escape=@var{char} ++@c @itemx -E ++@c @itemx --no-escape ++@c Ignored during normal operation, but passed on to @command{rlogin} ++@c when @command{rsh} is invoked without a command argument. ++@c @end table ++@c ++@c @section Note on stream redirections ++@c ++@c Beware that non-quoted shell metacharacters are interpreted on the local ++@c machine, while quoted metacharacters are interpreted on the remote ++@c machine. For example: ++@c ++@c @example ++@c rsh otherhost cat remotefile >> localfile ++@c rsh otherhost cat remotefile ">>" otherfile ++@c @end example ++@c ++@c @noindent ++@c The first command appends the contents of @file{remotefile}, as found ++@c on the remote host, to the file @file{localfile} on the local host, ++@c since the local shell will intercept the redirection and will thus ++@c receive whatever the remote process directs to stdout. ++@c ++@c In contrast, the second command will append the contents of the same ++@c file @file{remotefile} to a file named @file{otherfile} again, but this ++@c time the file is located on the remote host. The effect of quoting ++@c the redirection operator is to execute the command ++@c ++@c @example ++@c cat remotefile >> localfile ++@c @end example ++@c ++@c @noindent ++@c entirely on the remote most, whence stdout at the remote host will ++@c have nothing to transmit to the listening local host!. ++@c + @node talk invocation + @chapter @command{talk}: a communication program + @pindex talk +@@ -3082,104 +3082,104 @@ is to be disabled. Standard choices are + @samp{kerberos_v4}, and @samp{kerberos_v5}. + @end table + +-@node tftp invocation +-@chapter @command{tftp}: TFTP client +-@pindex tftp +- +-@command{tftp} is the user interface to the Internet TFTP, Trivial +-File Transfer Protocol, which allows users to transfer files to and +-from a remote machine. The remote host may be specified on the +-command line, in which case @command{tftp} uses host as the default +-host for future transfers. +- +-@noindent +-Synopsis: +- +-@example +-tftp [@var{option}]@dots{} @var{host} +-@end example +- +-@section Commands +- +-Once @command{tftp} is running, it issues the prompt and recognizes +-the following commands: +- +-@table @code +-@item ? @var{command-name} +-Print help information. +- +-@item ascii +-Shorthand for @code{mode ascii} +- +-@item binary +-Shorthand for @code{mode binary} +- +-@item connect @var{host-name} [@var{port}] +-Set the host (and optionally port) for transfers. Note that the TFTP +-protocol, unlike the FTP protocol, does not maintain connections +-between transfers; thus, the connect command does not actually create +-a connection, but merely remembers what host is to be used for +-transfers. You do not have to use the connect command; the remote +-host can be specified as part of the get or put commands. +- +-@item get @var{file-name} +-@itemx get @var{remotename} @var{localname} +-@itemx get @var{file}@dots{} +-Get a file, or a set of files, from the specified sources. The source can +-be in one of two forms: a file name on the remote host, if the host has +-already been specified, or a string of the form @samp{host:filename} +-to specify both a host and file name at the same time. If the latter +-form is used, the last hostname specified becomes the default for +-future transfers. When specifying a numeric IPv6 address as host +-part, then this address must be enclosed between square brackets, +-since it contains colons and would interfere with the delimiter +-before the file name. Brackets are optional for IPv4 addresses. +- +-@example +-tftp> get [2001:1234::12]:issue +-@end example +- +-@item mode @var{transfer-mode} +-Set the mode for transfers; @var{transfer-mode} may be one of +-@samp{ascii} or @samp{binary}. The default is @samp{ascii}. +- +-@item put @var{file} +-@itemx put @var{localfile} @var{remotefile} +-@itemx put @var{file}@dots{} @var{remote-directory} +-Put a file or set of files to the specified remote file or directory. +-The destination can be in one of two forms: a filename on the remote +-host, if the host has already been specified, or a string of the form +-@samp{host:filename} to specify both a host and filename at the same +-time. If the latter form is used, the hostname specified becomes the +-default for future transfers. If the @file{remote-directory} form is +-used, the remote host is assumed to be a UNIX machine. The same use +-of square brackets for enclosing numeric IPv6 addresses applies here, +-as was mentioned for the command @command{get}. +- +-@item quit +-Exit @command{tftp}. An end of file also exits. +- +-@item rexmt @var{retransmission-timeout} +-Set the per-packet retransmission timeout, in seconds. +- +-@item status +-Show current status. +- +-@item timeout @var{total-transmission-timeout} +-Set the total transmission timeout, in seconds. +- +-@item trace +-Toggle packet tracing. +- +-@item verbose +-Toggle verbose mode. +-@end table +- +-Because there is no user-login or validation within the @command{tftp} +-protocol, the remote site will probably have some sort of file-access +-restrictions in place. The exact methods are specific to each site +-and therefore difficult to document here. +- ++@c @node tftp invocation ++@c @chapter @command{tftp}: TFTP client ++@c @pindex tftp ++@c ++@c @command{tftp} is the user interface to the Internet TFTP, Trivial ++@c File Transfer Protocol, which allows users to transfer files to and ++@c from a remote machine. The remote host may be specified on the ++@c command line, in which case @command{tftp} uses host as the default ++@c host for future transfers. ++@c ++@c @noindent ++@c Synopsis: ++@c ++@c @example ++@c tftp [@var{option}]@dots{} @var{host} ++@c @end example ++@c ++@c @section Commands ++@c ++@c Once @command{tftp} is running, it issues the prompt and recognizes ++@c the following commands: ++@c ++@c @table @code ++@c @item ? @var{command-name} ++@c Print help information. ++@c ++@c @item ascii ++@c Shorthand for @code{mode ascii} ++@c ++@c @item binary ++@c Shorthand for @code{mode binary} ++@c ++@c @item connect @var{host-name} [@var{port}] ++@c Set the host (and optionally port) for transfers. Note that the TFTP ++@c protocol, unlike the FTP protocol, does not maintain connections ++@c between transfers; thus, the connect command does not actually create ++@c a connection, but merely remembers what host is to be used for ++@c transfers. You do not have to use the connect command; the remote ++@c host can be specified as part of the get or put commands. ++@c ++@c @item get @var{file-name} ++@c @itemx get @var{remotename} @var{localname} ++@c @itemx get @var{file}@dots{} ++@c Get a file, or a set of files, from the specified sources. The source can ++@c be in one of two forms: a file name on the remote host, if the host has ++@c already been specified, or a string of the form @samp{host:filename} ++@c to specify both a host and file name at the same time. If the latter ++@c form is used, the last hostname specified becomes the default for ++@c future transfers. When specifying a numeric IPv6 address as host ++@c part, then this address must be enclosed between square brackets, ++@c since it contains colons and would interfere with the delimiter ++@c before the file name. Brackets are optional for IPv4 addresses. ++@c ++@c @example ++@c tftp> get [2001:1234::12]:issue ++@c @end example ++@c ++@c @item mode @var{transfer-mode} ++@c Set the mode for transfers; @var{transfer-mode} may be one of ++@c @samp{ascii} or @samp{binary}. The default is @samp{ascii}. ++@c ++@c @item put @var{file} ++@c @itemx put @var{localfile} @var{remotefile} ++@c @itemx put @var{file}@dots{} @var{remote-directory} ++@c Put a file or set of files to the specified remote file or directory. ++@c The destination can be in one of two forms: a filename on the remote ++@c host, if the host has already been specified, or a string of the form ++@c @samp{host:filename} to specify both a host and filename at the same ++@c time. If the latter form is used, the hostname specified becomes the ++@c default for future transfers. If the @file{remote-directory} form is ++@c used, the remote host is assumed to be a UNIX machine. The same use ++@c of square brackets for enclosing numeric IPv6 addresses applies here, ++@c as was mentioned for the command @command{get}. ++@c ++@c @item quit ++@c Exit @command{tftp}. An end of file also exits. ++@c ++@c @item rexmt @var{retransmission-timeout} ++@c Set the per-packet retransmission timeout, in seconds. ++@c ++@c @item status ++@c Show current status. ++@c ++@c @item timeout @var{total-transmission-timeout} ++@c Set the total transmission timeout, in seconds. ++@c ++@c @item trace ++@c Toggle packet tracing. ++@c ++@c @item verbose ++@c Toggle verbose mode. ++@c @end table ++@c ++@c Because there is no user-login or validation within the @command{tftp} ++@c protocol, the remote site will probably have some sort of file-access ++@c restrictions in place. The exact methods are specific to each site ++@c and therefore difficult to document here. ++@c + @node inetd invocation + @chapter @command{inetd}: Internet super-server + @pindex inetd +@@ -4186,574 +4186,574 @@ that a single @samp{@@} on a line by its + upon every user allowed to access the FTP service. + This gives a Draconian, protective configuration. + +-@node rexecd invocation +-@chapter @command{rexecd}: server for @code{rexec} +-@pindex rexecd +- +-@command{rexecd} is the server for the @code{rexec} routine. The +-server provides remote execution facilities with authentication based +-on user names and passwords. It passes error messages and notices +-to the @code{syslog} facility @samp{LOG_DAEMON}. +- +-@example +-rexecd [@var{option}]@dots{} +-@end example +- +-@command{rexecd} listens for service requests at the port indicated in +-the @samp{exec} service specification. When a service request is +-received the following protocol is initiated: +- +-@enumerate +-@item +-The server reads characters from the socket up to a NUL (@samp{\0}) +-byte. The resultant string is interpreted as an ASCII number, base +-10. +- +-@item +-If the number received in step 1 is non-zero, it is interpreted as the +-port number of a secondary stream to be used for the stderr. A second +-connection is then created to the specified port on the client's +-machine. +- +-@item +-A NUL terminated user name of at most 16 characters is retrieved on +-the initial socket. +- +-@item +-A NUL terminated, unencrypted password of at most 16 characters is +-retrieved on the initial socket. +- +-@item +-A NUL terminated command to be passed to a shell is retrieved on the +-initial socket. The length of the command is limited by the upper +-bound on the size of the system's argument list. +- +-@item +-@command{rexecd} then validates the user as is done at login time and, +-if the authentication was successful, changes to the user's home +-directory, and establishes the user and group protections of the user. +-If any of these steps fail the connection is aborted with a diagnostic +-message returned. +- +-@item +-A NUL byte is returned on the initial socket and the command line is +-passed to the normal login shell of the user. The shell inherits the +-network connections established by rexecd. +-@end enumerate +- +-@section Invoking +- +-The only option is as follows: +- +-@table @option +-@item -l +-@itemx --logging +-@opindex -l +-@opindex --logging +-Raise logging level for this service; use more than once for +-increased verbosity. The @code{syslog} facility in use is +-@samp{LOG_DAEMON}. +- +-@end table +- +-Should @command{rexecd} have been built with PAM support, +-it reads any setting specified for a service named @samp{rexec}. +- +-@section Diagnostics +- +-Except for the last one listed below, all diagnostic messages are +-returned on the initial socket, after which any network connections +-are closed. An error is indicated by a leading byte with a value of 1 +-(0 is returned in step 7 above upon successful completion of all the +-steps prior to the command execution). +- +-@table @samp +-@item username too long +-The name is longer than 16 characters. +- +-@item password too long +-The password is longer than 16 characters. +- +-@item command too long +-The command line passed exceeds the size of the argument list (as +-configured into the system). +- +-@item Login incorrect. +-No password file entry for the user name existed. +- +-@item Password incorrect. +-The wrong password was supplied. +- +-@item No remote directory. +-The chdir command to the home directory failed. +- +-@item Try again. +-A fork by the server failed. +- +-@item : @dots{} +-The user's login shell could not be started. This message is returned +-on the connection associated with the stderr, and is not ... +-@c FIXME: Fill this out. +-@end table +- +-@emph{Note}, that indicating @samp{Login incorrect} as opposed to +-@samp{Password incorrect} is a security breach which allows people to +-probe a system for users with null passwords. +- +-@node rlogind invocation +-@chapter @command{rlogind}: Remote login server +-@pindex rlogind +- +-@command{rlogind} is the server for the @command{rlogin} client program +-(@pxref{rlogin invocation}). The server provides a remote login +-facility with authentication based on privileged port numbers from +-trusted hosts, or using authentication according to a Kerberos +-protocol. +- +-@command{rlogind} in daemon mode listens for service requests at the +-port indicated in the @samp{login} service specification. A common +-alternative is to have the super-server @command{inetd} listen at +-the same port, which then invokes @command{rlogind} as demand arises. +-In Kerberised mode, the port is either @samp{eklogin}, or +-@samp{klogin}, depending on preset encryption, or none. +- +-The standard authentication procedure assumes the integrity of each +-client machine and of the connecting medium. This is insecure, since +-it transmits credentials in clear text, but is useful in an ``open'' +-environment. This weakness is reduced when running the service +-in Kerberised version, at the price of a larger complexity of the +-supporting infrastructure. Using an encrypting Kerberised service +-even avoids all clear text processing. +- +-@section Invoking +- +-The available options are as follows: +- +-@table @option +-@item -4 +-@itemx --ipv4 +-@opindex -4 +-@opindex --ipv4 +-Accept only IPv4 connections in daemon mode. +- +-@item -6 +-@itemx --ipv6 +-@opindex -6 +-@opindex --ipv6 +-Only IPv6 connections in daemon mode. +- +-@item -a +-@itemx --verify-hostname +-@opindex -a +-@opindex --verify-hostname +-Ask hostname for verification. +- +-@item -d[@var{max}] +-@itemx --daemon[=@var{max}] +-@opindex -d +-@opindex --daemon +-Run in background daemon mode, optionally setting the maximal +-number of simultaneously running client sessions. The default +-limit is 10. +- +-@item -D[@var{level}] +-@itemx --debug[=@var{level}] +-@opindex -D +-@opindex -debug +-Set debug level, not implemented. +- +-@item -l +-@itemx --no-rhosts +-@opindex -l +-@opindex --no-rhosts +-Ignore client's @file{.rhosts} file. +- +-@item -L @var{name} +-@itemx --local-domain=@var{name} +-@opindex -L +-@opindex --local-domain +-Set local domain name, to which the server host belongs. By default +-the domain is recovered from the canonical name of the host. +- +-@item -n +-@itemx --no-keepalive +-@opindex -n +-@opindex --no-keepalive +-Do not set SO_KEEPALIVE on sockets. This decreases the ability +-to close lost connections to once active clients. +- +-@item -o +-@itemx --allow-root +-@opindex -o +-@opindex --allow-root +-Allow the root user to login, which is disallowed by default. +- +-@item -p @var{port} +-@itemx --port=@var{port} +-@opindex -p +-@opindex --port +-Listen on given port. Applicable only in daemon mode. +- +-@item -r +-@itemx --reverse-required +-@opindex -r +-@opindex --reverse-required +-Require reverse resolvability of remote host's numerical IP. +-@end table +- +-For sites requiring improved authentication, Kerberos +-authentication is a viable decision, and possibly even +-with encryption for enhanced integrity. Three additional +-options are available for an executable @command{rlogind} +-compiled with Kerberos support. +- +-@table @option +-@item -k +-@itemx --kerberos +-@opindex -k +-@opindex --kerberos +-Activate Kerberos authentication on all incoming requests. +- +-@item -S @var{name} +-@itemx --server-principal=@var{name} +-@opindex -S +-@opindex --server-principal +-Set Kerberos server name, overriding canonical hostname. +- +-@item -x +-@itemx --encrypt +-@opindex -x +-@opindex --encrypt +-Activate encryption of all data passed via the @command{rlogind} session. +-This may impact response time and CPU utilization, but provides +-increased security. Only for Kerberised mode of operation. +-@end table +- +-Should @command{rlogind} have been built with PAM support, +-it reads any setting specified for a service named either +-@samp{rlogin} or @samp{krlogin}, the latter name for clients +-using Kerberised authentication. +- +-@section Kerberos specific details +- +-The option @option{-k} is mandatory for Kerberised operation mode, +-while addition of the option @option{-x} will also demand encryption +-of every request to this particular server. +- +-@command{rlogind} will, in Kerberised operation mode, as default +-instantiate itself using the principal name +-@samp{host/canonical_name@@DEFAULT_REALM}, a compound arranged +-from the running host's canonical name, and from the default realm +-configured for the system. Either of these can be overridden +-using the option @option{--server-principal}, as follows: +- +-@example +-rlogind -k -S alias.server.our +-rlogind --kerberos --server-principal=@@NEW.REALM +-rlogind -k -x -S rlogin/backup.ex.org@@OUR.REALM +-@end example +- +-When overriding only the realm, with the option @option{-S}, +-an initial at-sign is mandatory. +- +-@section Protocol details +- +-When a service request is received, in non-Kerberised mode, +-the following protocol is initiated: +- +-@enumerate +-@item +-The server checks the client's source port. If the port is not in the +-range 512-1023, the server aborts the connection. +- +-@item +-The server next checks the client's source address and requests the +-corresponding host name. If the hostname cannot be determined, the +-numerical representation of the host address is used. If the +-hostname is in the same domain as the server (according to the last +-two components of the domain name), or if the option @option{-a} is +-in effect, the address for the hostname is requested, verifying that +-the name and address correspond. Normal authentication is considered +-as failed, should this address verification fail. +-@end enumerate +- +-Once the source port and address have been checked, @command{rlogind} +-proceeds +-with the authentication process as described in @ref{rshd invocation}. +-The server +-then allocates a pseudo terminal, and manipulates file descriptors so +-that the slave half of the pseudo terminal becomes the stdin, stdout, +-and stderr for a login process. The login process is an instance of +-the @command{login} program, invoked with the option @option{-f} if +-authentication had succeeded. If automatic authentication had failed, +-the user is prompted to log in as if on a standard terminal line. +- +-The parent of the login process manipulates the master side of the +-pseudo terminal, operating as an intermediary between the login +-process and the client instance of the rlogin program. In normal +-operation, the packet protocol described in @samp{PTY} is invoked to +-provide flow control using @kbd{C-S}/@kbd{C-Q}, and to propagate interrupt +-signals to the remote program. The login process transmits the +-client terminal's baud rate, and its terminal type, as found in the +-environment variable @env{TERM}. The screen or window size of the +-terminal is requested from the client, and any later window size changes +-at the client's side are propagated to the pseudo terminal as well. +- +-Transport-level keepalive messages are enabled unless the +-option @option{-n} was in effect when starting @code{rlogind}. +-The use of keepalive messages allows sessions to be timed out, +-should the client crash, or otherwise become unreachable. +- +-@xref{ruserok, , ruserok, libc, The GNU C Library Reference Manual}, +-for details. +- +-@section Diagnostics +- +-The exchange protocol states that a negotiation reaches a successful +-completion as soon as the server @command{rlogind} transmits back to +-the client a single null byte, marking the completion of all +-information exchange. +- +-Error conditions are instead transmitted back to the client as +-a message containing an initial byte value 1, followed by a C-string +-indicating the cause of failure. All network connections are closed +-at the server side after this message. Some common messages follow: +- +-@table @samp +-@item Permission denied. +-The client presented insufficient credentials, +-or the client's address is not sufficiently resolvable +-to pass the checks induced by options @option{-a} or @option{-r}. +- +-@item Try again. +-A fork by the server failed. +-@end table +- +-@node rshd invocation +-@chapter @command{rshd}: Remote shell server +-@pindex rshd +- +-The @command{rshd} server is the server for the @code{rcmd} routine +-and, consequently, for the @command{rsh} (@pxref{rsh invocation}) +-program. The server provides remote execution facilities with +-authentication based on privileged port numbers from trusted hosts. +-The @command{rshd} server listens for service requests at the port +-indicated in the @samp{cmd} service specification. When a service +-request is received the following protocol is initiated: +- +-@enumerate +-@item +-The server checks the client's source port. If the port is not in the +-range 512--1023, the server aborts the connection. However, this +-condition is not applied for Kerberized service. +- +-@item +-The server reads characters from the socket up to a NUL (@samp{\0}) +-byte. The resultant string is interpreted as an ASCII number, base +-10. +- +-@item +-If the number received in step 2 is non-zero, it is interpreted as the +-port number of a secondary stream to be used for the stderr. A second +-connection is then created to the specified port on the client's +-machine. The source port of this second connection is also in the +-range 512--1023. +- +-@item +-The server checks the client's source address and requests the +-corresponding host name. If the hostname cannot be determined, the +-dot-notation representation of the host address is used. If the +-hostname is in the same domain as the server (according to the last +-two components of the domain name), or if the @option{-a} option is +-given, the addresses for the hostname are requested, verifying that +-the name and address correspond. If address verification fails, the +-connection is aborted with the message, @samp{Host address mismatch.} +- +-@item +-A null terminated user name of at most 16 characters is retrieved on +-the initial socket. This user name is interpreted as the user +-identity on the client's machine. +- +-@item +-A null terminated user name of at most 16 characters is retrieved on +-the initial socket. This user name is interpreted as a user identity +-to use on the server's machine. +- +-@item +-A null terminated command to be passed to a shell is retrieved on the +-initial socket. The length of the command is limited by the upper +-bound on the size of the system's argument list. +- +-@item +-Rshd then validates the user using @code{ruserok}, which uses the file +-@file{/etc/hosts.equiv} and the @file{.rhosts} file found in the +-user's home directory. The @option{-l} option prevents @code{ruserok} +-from doing any validation based on the user's @file{.rhosts} file, +-unless the user is the superuser. +- +-@item +-If the file @file{/etc/nologin} exists and the user is not the +-superuser, the connection is closed. +- +-@item +-A null byte is returned on the initial socket and the command line is +-passed to the normal login shell of the user. The shell inherits the +-network connections established by @command{rshd}. +- +-@item +-Transport-level keepalive messages are enabled unless the @option{-n} +-option is present. The use of keepalive messages allows sessions to +-be timed out if the client crashes or becomes unreachable. +- +-@item +-The @option{-L} option causes all successful accesses to be logged to +-@command{syslogd} (@pxref{syslogd invocation}) as @samp{auth.info} +-messages. +-@end enumerate +- +-@xref{ruserok, , ruserok, libc, The GNU C Library Reference Manual}, +-for details. +- +-@section Invoking +- +-The options are as follows: +- +-@table @option +-@item -a +-@itemx --verify-hostname +-@opindex -a +-@opindex --verify-hostname +-Ask hostname for verification. +- +-@c @item -d +-@c @itemx --daemon ++@c @node rexecd invocation ++@c @chapter @command{rexecd}: server for @code{rexec} ++@c @pindex rexecd ++@c ++@c @command{rexecd} is the server for the @code{rexec} routine. The ++@c server provides remote execution facilities with authentication based ++@c on user names and passwords. It passes error messages and notices ++@c to the @code{syslog} facility @samp{LOG_DAEMON}. ++@c ++@c @example ++@c rexecd [@var{option}]@dots{} ++@c @end example ++@c ++@c @command{rexecd} listens for service requests at the port indicated in ++@c the @samp{exec} service specification. When a service request is ++@c received the following protocol is initiated: ++@c ++@c @enumerate ++@c @item ++@c The server reads characters from the socket up to a NUL (@samp{\0}) ++@c byte. The resultant string is interpreted as an ASCII number, base ++@c 10. ++@c ++@c @item ++@c If the number received in step 1 is non-zero, it is interpreted as the ++@c port number of a secondary stream to be used for the stderr. A second ++@c connection is then created to the specified port on the client's ++@c machine. ++@c ++@c @item ++@c A NUL terminated user name of at most 16 characters is retrieved on ++@c the initial socket. ++@c ++@c @item ++@c A NUL terminated, unencrypted password of at most 16 characters is ++@c retrieved on the initial socket. ++@c ++@c @item ++@c A NUL terminated command to be passed to a shell is retrieved on the ++@c initial socket. The length of the command is limited by the upper ++@c bound on the size of the system's argument list. ++@c ++@c @item ++@c @command{rexecd} then validates the user as is done at login time and, ++@c if the authentication was successful, changes to the user's home ++@c directory, and establishes the user and group protections of the user. ++@c If any of these steps fail the connection is aborted with a diagnostic ++@c message returned. ++@c ++@c @item ++@c A NUL byte is returned on the initial socket and the command line is ++@c passed to the normal login shell of the user. The shell inherits the ++@c network connections established by rexecd. ++@c @end enumerate ++@c ++@c @section Invoking ++@c ++@c The only option is as follows: ++@c ++@c @table @option ++@c @item -l ++@c @itemx --logging ++@c @opindex -l ++@c @opindex --logging ++@c Raise logging level for this service; use more than once for ++@c increased verbosity. The @code{syslog} facility in use is ++@c @samp{LOG_DAEMON}. ++@c ++@c @end table ++@c ++@c Should @command{rexecd} have been built with PAM support, ++@c it reads any setting specified for a service named @samp{rexec}. ++@c ++@c @section Diagnostics ++@c ++@c Except for the last one listed below, all diagnostic messages are ++@c returned on the initial socket, after which any network connections ++@c are closed. An error is indicated by a leading byte with a value of 1 ++@c (0 is returned in step 7 above upon successful completion of all the ++@c steps prior to the command execution). ++@c ++@c @table @samp ++@c @item username too long ++@c The name is longer than 16 characters. ++@c ++@c @item password too long ++@c The password is longer than 16 characters. ++@c ++@c @item command too long ++@c The command line passed exceeds the size of the argument list (as ++@c configured into the system). ++@c ++@c @item Login incorrect. ++@c No password file entry for the user name existed. ++@c ++@c @item Password incorrect. ++@c The wrong password was supplied. ++@c ++@c @item No remote directory. ++@c The chdir command to the home directory failed. ++@c ++@c @item Try again. ++@c A fork by the server failed. ++@c ++@c @item : @dots{} ++@c The user's login shell could not be started. This message is returned ++@c on the connection associated with the stderr, and is not ... ++@c @c FIXME: Fill this out. ++@c @end table ++@c ++@c @emph{Note}, that indicating @samp{Login incorrect} as opposed to ++@c @samp{Password incorrect} is a security breach which allows people to ++@c probe a system for users with null passwords. ++@c ++@c @node rlogind invocation ++@c @chapter @command{rlogind}: Remote login server ++@c @pindex rlogind ++@c ++@c @command{rlogind} is the server for the @command{rlogin} client program ++@c (@pxref{rlogin invocation}). The server provides a remote login ++@c facility with authentication based on privileged port numbers from ++@c trusted hosts, or using authentication according to a Kerberos ++@c protocol. ++@c ++@c @command{rlogind} in daemon mode listens for service requests at the ++@c port indicated in the @samp{login} service specification. A common ++@c alternative is to have the super-server @command{inetd} listen at ++@c the same port, which then invokes @command{rlogind} as demand arises. ++@c In Kerberised mode, the port is either @samp{eklogin}, or ++@c @samp{klogin}, depending on preset encryption, or none. ++@c ++@c The standard authentication procedure assumes the integrity of each ++@c client machine and of the connecting medium. This is insecure, since ++@c it transmits credentials in clear text, but is useful in an ``open'' ++@c environment. This weakness is reduced when running the service ++@c in Kerberised version, at the price of a larger complexity of the ++@c supporting infrastructure. Using an encrypting Kerberised service ++@c even avoids all clear text processing. ++@c ++@c @section Invoking ++@c ++@c The available options are as follows: ++@c ++@c @table @option ++@c @item -4 ++@c @itemx --ipv4 ++@c @opindex -4 ++@c @opindex --ipv4 ++@c Accept only IPv4 connections in daemon mode. ++@c ++@c @item -6 ++@c @itemx --ipv6 ++@c @opindex -6 ++@c @opindex --ipv6 ++@c Only IPv6 connections in daemon mode. ++@c ++@c @item -a ++@c @itemx --verify-hostname ++@c @opindex -a ++@c @opindex --verify-hostname ++@c Ask hostname for verification. ++@c ++@c @item -d[@var{max}] ++@c @itemx --daemon[=@var{max}] + @c @opindex -d + @c @opindex --daemon +-@c Daemon mode. +- +-@item -k +-@itemx --kerberos +-@opindex -k +-@opindex --kerberos +-Use Kerberos authentication. +- +-@item -l +-@itemx --no-rhosts +-@opindex -l +-@opindex --no-rhosts +-Ignore @file{.rhosts} file. +- +-@item -L +-@itemx --log-sessions +-@opindex -L +-@opindex --log-sessions +-Log successful logins. +- +-@item -n +-@itemx --no-keepalive +-@opindex -n +-@opindex --no-keepalive +-Do not set SO_KEEPALIVE. +- +-@item -S @var{name} +-@itemx --servername=@var{name} +-@opindex -S +-@opindex --servername +-Set Kerberos server name, overriding canonical hostname. +- +-@item -v +-@itemx --vacuous +-@opindex -v +-@opindex --vacuous +-Fail any call asking for non-Kerberos authentication. +- +-@c OBSOLETE? +-@c @item -x +-@c @itemx --encrypt +-@c @opindex -x +-@c @opindex --encrypt +-@c Turns on DES encryption for all data passed via the @command{rshd} +-@c session. This may impact response time and CPU utilization, but +-@c provides increased security. +- ++@c Run in background daemon mode, optionally setting the maximal ++@c number of simultaneously running client sessions. The default ++@c limit is 10. ++@c + @c @item -D[@var{level}] + @c @itemx --debug[=@var{level}] + @c @opindex -D + @c @opindex -debug + @c Set debug level, not implemented. +- ++@c ++@c @item -l ++@c @itemx --no-rhosts ++@c @opindex -l ++@c @opindex --no-rhosts ++@c Ignore client's @file{.rhosts} file. ++@c ++@c @item -L @var{name} ++@c @itemx --local-domain=@var{name} ++@c @opindex -L ++@c @opindex --local-domain ++@c Set local domain name, to which the server host belongs. By default ++@c the domain is recovered from the canonical name of the host. ++@c ++@c @item -n ++@c @itemx --no-keepalive ++@c @opindex -n ++@c @opindex --no-keepalive ++@c Do not set SO_KEEPALIVE on sockets. This decreases the ability ++@c to close lost connections to once active clients. ++@c + @c @item -o + @c @itemx --allow-root + @c @opindex -o + @c @opindex --allow-root +-@c Allow uid == 0 to login, disabled by default +- ++@c Allow the root user to login, which is disallowed by default. ++@c + @c @item -p @var{port} + @c @itemx --port=@var{port} + @c @opindex -p + @c @opindex --port +-@c Listen on given port (valid only in daemon mode). +- +-@item -r +-@itemx --reverse-required +-@opindex -r +-@opindex --reverse-required +-Demand that the client's IP address be resolvable +-as a host name. +-@end table +- +-Should @command{rshd} have been built with PAM support, +-it reads any setting specified for a service named either +-@samp{rsh} or @samp{krsh}, the latter name for clients +-seeking Kerberised authentication. +- +-@section Diagnostics +- +-Except for the last one listed below, all diagnostic messages are +-returned on the initial socket, after which any network connections +-are closed. An error is indicated by a leading byte with a value of 1 +-(0 is returned in step 10 above upon successful completion of all the +-steps prior to the execution of the login shell). +- +-@table @samp +-@item Locuser too long +-The name of the user on the client's machine is longer than 16 +-characters. +- +-@item Ruser too long +-The name of the user on the remote machine is longer than 16 +-characters. +- +-@item Command too long +-The command line passed exceeds the size of the argument list (as +-configured into the system). +- +-@item Login incorrect +-No password file entry for the user name existed. +- +-@item Remote directory +-The chdir command to the home directory failed. +- +-@item Permission denied +-The authentication procedure described above failed, +-or address resolution was insufficient. +- +-@item Can't make pipe. +-The pipe needed for the stderr, wasn't created. +- +-@item Can't fork; try again. +-A fork by the server failed. +- +-@item : @dots{} +-The user's login shell could not be started. This message is returned +-on the connection associated with the stderr, and is not preceded by a +-flag byte. +-@end table +- +-The authentication procedure used here assumes the integrity of each +-client machine and the connecting medium. This is insecure, but is +-useful in an ``open'' environment. +- ++@c Listen on given port. Applicable only in daemon mode. ++@c ++@c @item -r ++@c @itemx --reverse-required ++@c @opindex -r ++@c @opindex --reverse-required ++@c Require reverse resolvability of remote host's numerical IP. ++@c @end table ++@c ++@c For sites requiring improved authentication, Kerberos ++@c authentication is a viable decision, and possibly even ++@c with encryption for enhanced integrity. Three additional ++@c options are available for an executable @command{rlogind} ++@c compiled with Kerberos support. ++@c ++@c @table @option ++@c @item -k ++@c @itemx --kerberos ++@c @opindex -k ++@c @opindex --kerberos ++@c Activate Kerberos authentication on all incoming requests. ++@c ++@c @item -S @var{name} ++@c @itemx --server-principal=@var{name} ++@c @opindex -S ++@c @opindex --server-principal ++@c Set Kerberos server name, overriding canonical hostname. ++@c ++@c @item -x ++@c @itemx --encrypt ++@c @opindex -x ++@c @opindex --encrypt ++@c Activate encryption of all data passed via the @command{rlogind} session. ++@c This may impact response time and CPU utilization, but provides ++@c increased security. Only for Kerberised mode of operation. ++@c @end table ++@c ++@c Should @command{rlogind} have been built with PAM support, ++@c it reads any setting specified for a service named either ++@c @samp{rlogin} or @samp{krlogin}, the latter name for clients ++@c using Kerberised authentication. ++@c ++@c @section Kerberos specific details ++@c ++@c The option @option{-k} is mandatory for Kerberised operation mode, ++@c while addition of the option @option{-x} will also demand encryption ++@c of every request to this particular server. ++@c ++@c @command{rlogind} will, in Kerberised operation mode, as default ++@c instantiate itself using the principal name ++@c @samp{host/canonical_name@@DEFAULT_REALM}, a compound arranged ++@c from the running host's canonical name, and from the default realm ++@c configured for the system. Either of these can be overridden ++@c using the option @option{--server-principal}, as follows: ++@c ++@c @example ++@c rlogind -k -S alias.server.our ++@c rlogind --kerberos --server-principal=@@NEW.REALM ++@c rlogind -k -x -S rlogin/backup.ex.org@@OUR.REALM ++@c @end example ++@c ++@c When overriding only the realm, with the option @option{-S}, ++@c an initial at-sign is mandatory. ++@c ++@c @section Protocol details ++@c ++@c When a service request is received, in non-Kerberised mode, ++@c the following protocol is initiated: ++@c ++@c @enumerate ++@c @item ++@c The server checks the client's source port. If the port is not in the ++@c range 512-1023, the server aborts the connection. ++@c ++@c @item ++@c The server next checks the client's source address and requests the ++@c corresponding host name. If the hostname cannot be determined, the ++@c numerical representation of the host address is used. If the ++@c hostname is in the same domain as the server (according to the last ++@c two components of the domain name), or if the option @option{-a} is ++@c in effect, the address for the hostname is requested, verifying that ++@c the name and address correspond. Normal authentication is considered ++@c as failed, should this address verification fail. ++@c @end enumerate ++@c ++@c Once the source port and address have been checked, @command{rlogind} ++@c proceeds ++@c with the authentication process as described in @ref{rshd invocation}. ++@c The server ++@c then allocates a pseudo terminal, and manipulates file descriptors so ++@c that the slave half of the pseudo terminal becomes the stdin, stdout, ++@c and stderr for a login process. The login process is an instance of ++@c the @command{login} program, invoked with the option @option{-f} if ++@c authentication had succeeded. If automatic authentication had failed, ++@c the user is prompted to log in as if on a standard terminal line. ++@c ++@c The parent of the login process manipulates the master side of the ++@c pseudo terminal, operating as an intermediary between the login ++@c process and the client instance of the rlogin program. In normal ++@c operation, the packet protocol described in @samp{PTY} is invoked to ++@c provide flow control using @kbd{C-S}/@kbd{C-Q}, and to propagate interrupt ++@c signals to the remote program. The login process transmits the ++@c client terminal's baud rate, and its terminal type, as found in the ++@c environment variable @env{TERM}. The screen or window size of the ++@c terminal is requested from the client, and any later window size changes ++@c at the client's side are propagated to the pseudo terminal as well. ++@c ++@c Transport-level keepalive messages are enabled unless the ++@c option @option{-n} was in effect when starting @code{rlogind}. ++@c The use of keepalive messages allows sessions to be timed out, ++@c should the client crash, or otherwise become unreachable. ++@c ++@c @xref{ruserok, , ruserok, libc, The GNU C Library Reference Manual}, ++@c for details. ++@c ++@c @section Diagnostics ++@c ++@c The exchange protocol states that a negotiation reaches a successful ++@c completion as soon as the server @command{rlogind} transmits back to ++@c the client a single null byte, marking the completion of all ++@c information exchange. ++@c ++@c Error conditions are instead transmitted back to the client as ++@c a message containing an initial byte value 1, followed by a C-string ++@c indicating the cause of failure. All network connections are closed ++@c at the server side after this message. Some common messages follow: ++@c ++@c @table @samp ++@c @item Permission denied. ++@c The client presented insufficient credentials, ++@c or the client's address is not sufficiently resolvable ++@c to pass the checks induced by options @option{-a} or @option{-r}. ++@c ++@c @item Try again. ++@c A fork by the server failed. ++@c @end table ++@c ++@c @node rshd invocation ++@c @chapter @command{rshd}: Remote shell server ++@c @pindex rshd ++@c ++@c The @command{rshd} server is the server for the @code{rcmd} routine ++@c and, consequently, for the @command{rsh} (@pxref{rsh invocation}) ++@c program. The server provides remote execution facilities with ++@c authentication based on privileged port numbers from trusted hosts. ++@c The @command{rshd} server listens for service requests at the port ++@c indicated in the @samp{cmd} service specification. When a service ++@c request is received the following protocol is initiated: ++@c ++@c @enumerate ++@c @item ++@c The server checks the client's source port. If the port is not in the ++@c range 512--1023, the server aborts the connection. However, this ++@c condition is not applied for Kerberized service. ++@c ++@c @item ++@c The server reads characters from the socket up to a NUL (@samp{\0}) ++@c byte. The resultant string is interpreted as an ASCII number, base ++@c 10. ++@c ++@c @item ++@c If the number received in step 2 is non-zero, it is interpreted as the ++@c port number of a secondary stream to be used for the stderr. A second ++@c connection is then created to the specified port on the client's ++@c machine. The source port of this second connection is also in the ++@c range 512--1023. ++@c ++@c @item ++@c The server checks the client's source address and requests the ++@c corresponding host name. If the hostname cannot be determined, the ++@c dot-notation representation of the host address is used. If the ++@c hostname is in the same domain as the server (according to the last ++@c two components of the domain name), or if the @option{-a} option is ++@c given, the addresses for the hostname are requested, verifying that ++@c the name and address correspond. If address verification fails, the ++@c connection is aborted with the message, @samp{Host address mismatch.} ++@c ++@c @item ++@c A null terminated user name of at most 16 characters is retrieved on ++@c the initial socket. This user name is interpreted as the user ++@c identity on the client's machine. ++@c ++@c @item ++@c A null terminated user name of at most 16 characters is retrieved on ++@c the initial socket. This user name is interpreted as a user identity ++@c to use on the server's machine. ++@c ++@c @item ++@c A null terminated command to be passed to a shell is retrieved on the ++@c initial socket. The length of the command is limited by the upper ++@c bound on the size of the system's argument list. ++@c ++@c @item ++@c Rshd then validates the user using @code{ruserok}, which uses the file ++@c @file{/etc/hosts.equiv} and the @file{.rhosts} file found in the ++@c user's home directory. The @option{-l} option prevents @code{ruserok} ++@c from doing any validation based on the user's @file{.rhosts} file, ++@c unless the user is the superuser. ++@c ++@c @item ++@c If the file @file{/etc/nologin} exists and the user is not the ++@c superuser, the connection is closed. ++@c ++@c @item ++@c A null byte is returned on the initial socket and the command line is ++@c passed to the normal login shell of the user. The shell inherits the ++@c network connections established by @command{rshd}. ++@c ++@c @item ++@c Transport-level keepalive messages are enabled unless the @option{-n} ++@c option is present. The use of keepalive messages allows sessions to ++@c be timed out if the client crashes or becomes unreachable. ++@c ++@c @item ++@c The @option{-L} option causes all successful accesses to be logged to ++@c @command{syslogd} (@pxref{syslogd invocation}) as @samp{auth.info} ++@c messages. ++@c @end enumerate ++@c ++@c @xref{ruserok, , ruserok, libc, The GNU C Library Reference Manual}, ++@c for details. ++@c ++@c @section Invoking ++@c ++@c The options are as follows: ++@c ++@c @table @option ++@c @item -a ++@c @itemx --verify-hostname ++@c @opindex -a ++@c @opindex --verify-hostname ++@c Ask hostname for verification. ++@c ++@c @c @item -d ++@c @c @itemx --daemon ++@c @c @opindex -d ++@c @c @opindex --daemon ++@c @c Daemon mode. ++@c ++@c @item -k ++@c @itemx --kerberos ++@c @opindex -k ++@c @opindex --kerberos ++@c Use Kerberos authentication. ++@c ++@c @item -l ++@c @itemx --no-rhosts ++@c @opindex -l ++@c @opindex --no-rhosts ++@c Ignore @file{.rhosts} file. ++@c ++@c @item -L ++@c @itemx --log-sessions ++@c @opindex -L ++@c @opindex --log-sessions ++@c Log successful logins. ++@c ++@c @item -n ++@c @itemx --no-keepalive ++@c @opindex -n ++@c @opindex --no-keepalive ++@c Do not set SO_KEEPALIVE. ++@c ++@c @item -S @var{name} ++@c @itemx --servername=@var{name} ++@c @opindex -S ++@c @opindex --servername ++@c Set Kerberos server name, overriding canonical hostname. ++@c ++@c @item -v ++@c @itemx --vacuous ++@c @opindex -v ++@c @opindex --vacuous ++@c Fail any call asking for non-Kerberos authentication. ++@c ++@c @c OBSOLETE? ++@c @c @item -x ++@c @c @itemx --encrypt ++@c @c @opindex -x ++@c @c @opindex --encrypt ++@c @c Turns on DES encryption for all data passed via the @command{rshd} ++@c @c session. This may impact response time and CPU utilization, but ++@c @c provides increased security. ++@c ++@c @c @item -D[@var{level}] ++@c @c @itemx --debug[=@var{level}] ++@c @c @opindex -D ++@c @c @opindex -debug ++@c @c Set debug level, not implemented. ++@c ++@c @c @item -o ++@c @c @itemx --allow-root ++@c @c @opindex -o ++@c @c @opindex --allow-root ++@c @c Allow uid == 0 to login, disabled by default ++@c ++@c @c @item -p @var{port} ++@c @c @itemx --port=@var{port} ++@c @c @opindex -p ++@c @c @opindex --port ++@c @c Listen on given port (valid only in daemon mode). ++@c ++@c @item -r ++@c @itemx --reverse-required ++@c @opindex -r ++@c @opindex --reverse-required ++@c Demand that the client's IP address be resolvable ++@c as a host name. ++@c @end table ++@c ++@c Should @command{rshd} have been built with PAM support, ++@c it reads any setting specified for a service named either ++@c @samp{rsh} or @samp{krsh}, the latter name for clients ++@c seeking Kerberised authentication. ++@c ++@c @section Diagnostics ++@c ++@c Except for the last one listed below, all diagnostic messages are ++@c returned on the initial socket, after which any network connections ++@c are closed. An error is indicated by a leading byte with a value of 1 ++@c (0 is returned in step 10 above upon successful completion of all the ++@c steps prior to the execution of the login shell). ++@c ++@c @table @samp ++@c @item Locuser too long ++@c The name of the user on the client's machine is longer than 16 ++@c characters. ++@c ++@c @item Ruser too long ++@c The name of the user on the remote machine is longer than 16 ++@c characters. ++@c ++@c @item Command too long ++@c The command line passed exceeds the size of the argument list (as ++@c configured into the system). ++@c ++@c @item Login incorrect ++@c No password file entry for the user name existed. ++@c ++@c @item Remote directory ++@c The chdir command to the home directory failed. ++@c ++@c @item Permission denied ++@c The authentication procedure described above failed, ++@c or address resolution was insufficient. ++@c ++@c @item Can't make pipe. ++@c The pipe needed for the stderr, wasn't created. ++@c ++@c @item Can't fork; try again. ++@c A fork by the server failed. ++@c ++@c @item : @dots{} ++@c The user's login shell could not be started. This message is returned ++@c on the connection associated with the stderr, and is not preceded by a ++@c flag byte. ++@c @end table ++@c ++@c The authentication procedure used here assumes the integrity of each ++@c client machine and the connecting medium. This is insecure, but is ++@c useful in an ``open'' environment. ++@c + @node talkd invocation + @chapter @command{talkd}: a server for communication between users + @pindex talkd +@@ -5141,162 +5141,162 @@ In all other cases the result would be + where @code{$USER} is the value of the corresponding environment + variable and could possibly be empty. + +-@node tftpd invocation +-@chapter @command{tftpd}: TFTP server +-@pindex tftpd +- +-@command{tftpd} is intended to be invoked via @command{inetd} +-at all times. +- +-@noindent +-Synopsis: +- +-@example +-tftpd [@var{options}] [@var{directory} @dots{}] +-@end example +- +-@table @option +-@item -g @var{group} +-@itemx --group=@var{group} +-@opindex -g +-@opindex --group +-Specify group membership of the process owner. +-This is used only along with the option @option{-s}, +-and replaces the group membership that comes from +-the process owner himself. +- +-@item -l +-@itemx --logging +-@opindex -l +-@opindex --logging +-Enable logging. +- +-@item -n +-@itemx --nonexistent +-@opindex -n +-@opindex --nonexistent +-Supress negative acknowledgement of requests for nonexistent relative +-filenames. +- +-@item -s @var{dir} +-@itemx --secure-dir=@var{dir} +-@opindex -s +-@opindex --secure-dir +-Let the serving process change its root directory to @var{dir} +-before attending to any requests. +-This directory is not observable by any client, but improves +-server isolation, since servable contents must be located +-below this chrooted directory @var{dir}. +- +-@item -u @var{user} +-@itemx --user=@var{user} +-@opindex -u +-@opindex --user +-Specify the process owner for serving requests. +-Only relevant along with the option @option{-s}. +-The default name is @samp{nobody}. +-@end table +- +-@section Directory prefixes +-@anchor{tftpd validation} +- +-In addition to options, an invocation of @command{tftpd} can +-specify an optional list of directory prefixes. +-These are approved of according to two principles: +- +-@itemize @bullet +-@item +-Relative pathnames are ignored. +- +-@item +-At most twenty prefixes are approved, the rest is discarded. +-@end itemize +- +-@noindent +-A request for a file is decided upon as a consequence +-of evaluating these criteria: +- +-@itemize @bullet +-@item +-Every file request containing the substring @samp{/../} is denied, +-as is a file name beginning with @samp{../}. +- +-@item +-Write requests must specify absolute locations. +- +-@item +-A file request, if specified as an @emph{absolute} pathname, +-must begin with one of the approved directory prefixes, +-should at least one such prefix have been accepted. +- +-@item +-In the absence of a prefix collection, any absolute pathname is +-accepted, should the corresponding file exist. +- +-@item +-A file request, if specified as a @emph{relative} name, +-will only be searched for below the acceptable prefixes, +-should at least one such prefix have been approved. +- +-@item +-A request for a relatively named file, is denied in the absence +-of approved directory prefixes. +- +-@item +-The resulting file must be world readable, or world writable, +-for a read request, or a write request, to succeed. +-@end itemize +- +-@section Use cases +-@anchor{tftpd setup cases} +- +-The standard use case is an entry in @file{/etc/inetd.conf} like +- +-@example +-tftp dgram udp4 wait root /usr/sbin/tftpd \ +-@verb{ } tftpd /tftpboot /altboot +-@end example +- +-@noindent +-This would allow the TFTP client to use any of +- +-@example +-get kernel +-get /tftpboot/kernel +-get kernel.alt +-get /altboot/kernel.alt +-get /etc/motd +-@end example +- +-@noindent +-given that @file{/tftpboot/kernel} and @file{/altboot/kernel.alt} exist. +-Observe that also @file{/etc/motd} is accessible, inspite there being +-no explicit mention of standard file locations. +- +-A stronger mode of running a TFTP server is to use the `secure mode', +-meaning that the serving process is running in a chrooted mode. +-Then a suitable configuration could be +- +-@example +-tftp dgram udp4 wait root /usr/sbin/tftpd \ +-@verb{ } tftpd --secure-dir=/srv/tftp-root /tftpboot /altboot +-@end example +- +-@noindent +-Supposing the files @file{kernel} and @file{kernel.alt} to exist +-in the common directory @file{/srv/tftp-root/altboot/}, +-all the previously suggested client requests for a kernel would +-still be granted, but now any request for @file{/etc/motd} +-would be declined, and would get a reply `File not found' back. +- +-The chrooted setting is denying access outside of +-@file{/srv/tftp-root}, yet is not indicating this lock-in +-to the client, and is thus improving server isolation. +-Since neither of @option{-u} and @option{-g} were specified, +-the configuration reproduced above will in fact have the +-transmitting server process running with the default +-owner set to @samp{nobody:nogroup}. +- ++@c @node tftpd invocation ++@c @chapter @command{tftpd}: TFTP server ++@c @pindex tftpd ++@c ++@c @command{tftpd} is intended to be invoked via @command{inetd} ++@c at all times. ++@c ++@c @noindent ++@c Synopsis: ++@c ++@c @example ++@c tftpd [@var{options}] [@var{directory} @dots{}] ++@c @end example ++@c ++@c @table @option ++@c @item -g @var{group} ++@c @itemx --group=@var{group} ++@c @opindex -g ++@c @opindex --group ++@c Specify group membership of the process owner. ++@c This is used only along with the option @option{-s}, ++@c and replaces the group membership that comes from ++@c the process owner himself. ++@c ++@c @item -l ++@c @itemx --logging ++@c @opindex -l ++@c @opindex --logging ++@c Enable logging. ++@c ++@c @item -n ++@c @itemx --nonexistent ++@c @opindex -n ++@c @opindex --nonexistent ++@c Supress negative acknowledgement of requests for nonexistent relative ++@c filenames. ++@c ++@c @item -s @var{dir} ++@c @itemx --secure-dir=@var{dir} ++@c @opindex -s ++@c @opindex --secure-dir ++@c Let the serving process change its root directory to @var{dir} ++@c before attending to any requests. ++@c This directory is not observable by any client, but improves ++@c server isolation, since servable contents must be located ++@c below this chrooted directory @var{dir}. ++@c ++@c @item -u @var{user} ++@c @itemx --user=@var{user} ++@c @opindex -u ++@c @opindex --user ++@c Specify the process owner for serving requests. ++@c Only relevant along with the option @option{-s}. ++@c The default name is @samp{nobody}. ++@c @end table ++@c ++@c @section Directory prefixes ++@c @anchor{tftpd validation} ++@c ++@c In addition to options, an invocation of @command{tftpd} can ++@c specify an optional list of directory prefixes. ++@c These are approved of according to two principles: ++@c ++@c @itemize @bullet ++@c @item ++@c Relative pathnames are ignored. ++@c ++@c @item ++@c At most twenty prefixes are approved, the rest is discarded. ++@c @end itemize ++@c ++@c @noindent ++@c A request for a file is decided upon as a consequence ++@c of evaluating these criteria: ++@c ++@c @itemize @bullet ++@c @item ++@c Every file request containing the substring @samp{/../} is denied, ++@c as is a file name beginning with @samp{../}. ++@c ++@c @item ++@c Write requests must specify absolute locations. ++@c ++@c @item ++@c A file request, if specified as an @emph{absolute} pathname, ++@c must begin with one of the approved directory prefixes, ++@c should at least one such prefix have been accepted. ++@c ++@c @item ++@c In the absence of a prefix collection, any absolute pathname is ++@c accepted, should the corresponding file exist. ++@c ++@c @item ++@c A file request, if specified as a @emph{relative} name, ++@c will only be searched for below the acceptable prefixes, ++@c should at least one such prefix have been approved. ++@c ++@c @item ++@c A request for a relatively named file, is denied in the absence ++@c of approved directory prefixes. ++@c ++@c @item ++@c The resulting file must be world readable, or world writable, ++@c for a read request, or a write request, to succeed. ++@c @end itemize ++@c ++@c @section Use cases ++@c @anchor{tftpd setup cases} ++@c ++@c The standard use case is an entry in @file{/etc/inetd.conf} like ++@c ++@c @example ++@c tftp dgram udp4 wait root /usr/sbin/tftpd \ ++@c @verb{ } tftpd /tftpboot /altboot ++@c @end example ++@c ++@c @noindent ++@c This would allow the TFTP client to use any of ++@c ++@c @example ++@c get kernel ++@c get /tftpboot/kernel ++@c get kernel.alt ++@c get /altboot/kernel.alt ++@c get /etc/motd ++@c @end example ++@c ++@c @noindent ++@c given that @file{/tftpboot/kernel} and @file{/altboot/kernel.alt} exist. ++@c Observe that also @file{/etc/motd} is accessible, inspite there being ++@c no explicit mention of standard file locations. ++@c ++@c A stronger mode of running a TFTP server is to use the `secure mode', ++@c meaning that the serving process is running in a chrooted mode. ++@c Then a suitable configuration could be ++@c ++@c @example ++@c tftp dgram udp4 wait root /usr/sbin/tftpd \ ++@c @verb{ } tftpd --secure-dir=/srv/tftp-root /tftpboot /altboot ++@c @end example ++@c ++@c @noindent ++@c Supposing the files @file{kernel} and @file{kernel.alt} to exist ++@c in the common directory @file{/srv/tftp-root/altboot/}, ++@c all the previously suggested client requests for a kernel would ++@c still be granted, but now any request for @file{/etc/motd} ++@c would be declined, and would get a reply `File not found' back. ++@c ++@c The chrooted setting is denying access outside of ++@c @file{/srv/tftp-root}, yet is not indicating this lock-in ++@c to the client, and is thus improving server isolation. ++@c Since neither of @option{-u} and @option{-g} were specified, ++@c the configuration reproduced above will in fact have the ++@c transmitting server process running with the default ++@c owner set to @samp{nobody:nogroup}. ++@c + @node uucpd invocation + @chapter @command{uucpd}: Unix to Unix Copy relay daemon. + @pindex uucpd +--- origsrc/inetutils-2.4/ftp/cmds.c 2022-10-15 06:42:15.000000000 +0900 ++++ src/inetutils-2.4/ftp/cmds.c 2022-10-28 05:02:21.722298400 +0900 +@@ -100,6 +100,10 @@ + # endif + #endif /* !DEFPORT */ + ++#ifdef __CYGWIN__ ++typedef _sig_func_ptr sig_t; ++#endif ++ + /* Returns true if STR is entirely lower case. */ + static int + all_lower (char *str) +@@ -310,6 +314,13 @@ setpeer (int argc, char **argv) + if (autologin) + login (host); + ++#ifdef __CYGWIN__ ++# ifndef unix ++# define unix ++# endif ++# define NBBY 8 ++#endif /* __CYGWIN__ */ ++ + #if (defined unix || defined __unix || defined __unix__) && NBBY == 8 + /* + * this ifdef is to keep someone form "porting" this to an incompatible +@@ -1919,7 +1930,7 @@ quote1 (char *initial, int argc, char ** + len += strlen (strcpy (&buf[len], argv[i])); + } + } +- if (command (buf) == PRELIM) ++ if (command ("%s", buf) == PRELIM) + { + while (getreply (0) == PRELIM) + continue; +--- origsrc/inetutils-2.4/ftp/ftp.c 2022-07-08 19:57:28.000000000 +0900 ++++ src/inetutils-2.4/ftp/ftp.c 2022-10-28 05:02:21.725301900 +0900 +@@ -90,6 +90,11 @@ + #include "ftp_var.h" + #include "attribute.h" + ++#ifdef __CYGWIN__ ++#include ++typedef _sig_func_ptr sig_t; ++#endif ++ + #if !HAVE_DECL_FCLOSE + /* Some systems don't declare fclose in , so do it ourselves. */ + extern int fclose (FILE *); +@@ -674,7 +679,15 @@ sendrequest (char *cmd, char *local, cha + } + else + { ++#ifdef __CYGWIN__ ++ if (curtype != TYPE_A) { ++ fin = fopen (local, "rb"); ++ } else { ++ fin = fopen (local, "r"); ++ } ++#else + fin = fopen (local, "r"); ++#endif + if (fin == NULL) + { + error (0, errno, "local: %s", local); +@@ -718,6 +731,7 @@ sendrequest (char *cmd, char *local, cha + break; + case TYPE_I: + case TYPE_L: ++ setmode (fileno (fin), O_BINARY); + rc = lseek (fileno (fin), restart_point, SEEK_SET); + break; + } +@@ -786,6 +800,8 @@ sendrequest (char *cmd, char *local, cha + + case TYPE_I: + case TYPE_L: ++ setmode (fileno (fin), O_BINARY); ++ setmode (fileno (dout), O_BINARY); + errno = d = 0; + while ((c = read (fileno (fin), buf, bufsize)) > 0) + { +@@ -1020,7 +1036,17 @@ recvrequest (char *cmd, char *local, cha + { + struct stat st; + ++#ifdef __CYGWIN__ ++ { ++ char nmode[8]; ++ strcpy (nmode, lmode); ++ if (curtype != TYPE_A) ++ strcat (nmode, "b"); ++ fout = fopen (local, nmode); ++ } ++#else + fout = fopen (local, lmode); ++#endif + if (fout == NULL || fstat (fileno (fout), &st) < 0) + { + error (0, errno, "local: %s", local); +@@ -1049,6 +1075,8 @@ recvrequest (char *cmd, char *local, cha + + case TYPE_I: + case TYPE_L: ++ setmode (fileno (fout), O_BINARY); ++ setmode (fileno (din), O_BINARY); + if (restart_point && lseek (fileno (fout), restart_point, SEEK_SET) < 0) + { + error (0, errno, "local: %s", local); +@@ -1516,10 +1544,15 @@ noport: + result = ERROR; /* For success detection. */ + if (data_addr.ss_family != AF_INET || doepsv4) + { ++ char *p; + /* Use EPRT mode. */ + getnameinfo ((struct sockaddr *) &data_addr, ctladdrlen, + ia, sizeof (ia), portstr, sizeof (portstr), + NI_NUMERICHOST | NI_NUMERICSERV); ++ /* Remove IPv6 link local address postfix */ ++ p = strchr (ia, '%'); ++ if (p) ++ *p = '\0'; + result = command ("EPRT |%d|%s|%s|", + (data_addr.ss_family == AF_INET) ? 1 : 2, + ia, portstr); +--- origsrc/inetutils-2.4/ftpd/auth.c 2022-07-08 19:57:28.000000000 +0900 ++++ src/inetutils-2.4/ftpd/auth.c 2022-10-28 05:02:21.727296000 +0900 +@@ -18,6 +18,17 @@ + + #include + ++#ifdef __CYGWIN__ ++# undef ERROR ++# include ++# include ++# include ++# include ++# define is_winnt (GetVersion() < 0x80000000) ++#else ++# define is_winnt (0) ++#endif ++ + #include + #include + #include +@@ -43,6 +54,9 @@ + shell as returned by getusershell(). Disallow anyone mentioned in the file + PATH_FTPUSERS to allow people such as root and uucp to be avoided. */ + ++static int ++do_cygwin_auth (const char* passwd, struct credentials *pcred); ++ + int + auth_user (const char *name, struct credentials *pcred) + { +@@ -92,8 +106,8 @@ auth_user (const char *name, struct cred + */ + if (strcmp (name, "ftp") == 0 || strcmp (name, "anonymous") == 0) + { +- if (checkuser (PATH_FTPUSERS, "ftp") +- || checkuser (PATH_FTPUSERS, "anonymous")) ++ if (checkuser (PATH_FTPUSERS, "ftp", NULL) ++ || checkuser (PATH_FTPUSERS, "anonymous", NULL)) + { + snprintf (pcred->message, len, "User %s access denied.", + name); +@@ -110,6 +124,8 @@ auth_user (const char *name, struct cred + snprintf (pcred->message, len, "User %s unknown.", name); + err = 1; + } ++ if (err == 0) ++ checkuser (PATH_FTPCHROOT, pcred->name, &pcred->rootdir); + return err; + } + +@@ -128,7 +144,7 @@ auth_user (const char *name, struct cred + break; + endusershell (); + +- if (cp == NULL || checkuser (PATH_FTPUSERS, name)) ++ if (cp == NULL || checkuser (PATH_FTPUSERS, name, NULL)) + { + sprintf (pcred->message, "User %s access denied.", name); + return 1; +@@ -148,7 +164,8 @@ auth_user (const char *name, struct cred + + if (err == 0) + { +- pcred->dochroot = checkuser (PATH_FTPCHROOT, pcred->name); ++ pcred->dochroot = ++ checkuser (PATH_FTPCHROOT, pcred->name, &pcred->rootdir); + + #if defined WITH_PAM && !defined WITH_LINUX_PAM + if (pcred->auth_type == AUTH_TYPE_PAM) +@@ -183,18 +200,49 @@ auth_pass (const char *passwd, struct cr + case AUTH_TYPE_PASSWD: + default: + { ++#ifdef __CYGWIN__ ++ if (!is_winnt) ++ { ++#endif /* __CYGWIN__ */ + char *xpasswd; + char *salt = pcred->passwd; + /* Try to authenticate the user. */ + if (pcred->passwd == NULL || *pcred->passwd == '\0') + return 1; /* Failed. */ +- xpasswd = crypt (passwd, salt); ++ xpasswd = (char*) crypt (passwd, salt); + return (!xpasswd || strcmp (xpasswd, pcred->passwd) != 0); ++#ifdef __CYGWIN__ ++ } else { ++ return do_cygwin_auth (passwd, pcred); ++ } ++#endif /* __CYGWIN__ */ + } + } /* switch (auth_type) */ + return -1; + } + ++#ifdef __CYGWIN__ ++static int ++do_cygwin_auth (const char* passwd, struct credentials *pcred) ++{ ++ struct passwd *p; ++ if ((pcred == NULL) || (pcred->name == NULL) || (pcred->name[0] == '\0')) ++ return 1; ++ ++ /* can't "recreate" p from contents of pcred, because ++ struct passwd might contain extension elements ++ unknown to us ++ */ ++ p = getpwnam (pcred->name); ++ if (p == NULL) ++ return 1; ++ ++ HANDLE hToken = (HANDLE) cygwin_logon_user (p, passwd); ++ cygwin_set_impersonation_token (hToken); ++ return (hToken == INVALID_HANDLE_VALUE); // non-zero on error ++} ++#endif /* __CYGWIN__ */ ++ + int + sgetcred (const char *name, struct credentials *pcred) + { +--- origsrc/inetutils-2.4/ftpd/conf.c 2022-07-08 19:57:28.000000000 +0900 ++++ src/inetutils-2.4/ftpd/conf.c 2022-10-28 05:02:21.730293900 +0900 +@@ -58,11 +58,11 @@ display_file (const char *name, int code + * Return 1 if yes, 0 otherwise. + */ + int +-checkuser (const char *filename, const char *name) ++checkuser (const char *filename, const char *name, char **path) + { + FILE *fp; + int found = 0, ngroups = 0; +- char *p, line[BUFSIZ]; ++ char *p = NULL, line[BUFSIZ]; + gid_t *groups = NULL; + struct passwd *pwd = NULL; + +@@ -88,6 +88,7 @@ checkuser (const char *filename, const c + /* Wildcard entry, a single '@'. */ + if (p[0] == '@' && (p[1] == 0 || isblank (p[1]))) + { ++ p++; + found = 1; + break; + } +@@ -116,7 +117,8 @@ checkuser (const char *filename, const c + while (*p && (isalnum (*p) || *p == '_' || *p == '-')) + p++; + +- *p = '\0'; /* Group name ends here. */ ++ if (*p) ++ *p++ = '\0'; /* Group name ends here. */ + + grp = getgrnam (gname); + if (grp) +@@ -135,14 +137,47 @@ checkuser (const char *filename, const c + } + + /* User name ends at the first blank character. */ +- if (strncmp (p, name, strlen (name)) == 0 ++ if (strncasecmp (p, name, strlen (name)) == 0 + && (p[strlen (name)] == 0 + || isblank (p[strlen (name)]))) + { ++ p += strlen (name); + found = 1; + break; + } + } ++ ++ /* Extract the second field and set to *path */ ++ if (found && path && p) ++ { ++ char *pend; ++ while (*p && isblank (*p)) ++ p++; ++ pend = p; ++ while (*pend && !isblank (*pend)) ++ pend++; ++ *pend = '\0'; ++ if (*p) ++ { ++ char *buf = malloc (strlen (*path) + strlen (p) + 2); ++ if (buf) ++ { ++ if (*p != '/') ++ sprintf(buf, "%s/%s", *path, p); ++ else ++ sprintf(buf, "%s", p); ++ free (*path); ++ *path = sgetsave (buf); ++ free(buf); ++ } ++ else ++ { ++ perror_reply (421, "Local resource failure: malloc"); ++ dologout (1); ++ } ++ } ++ } ++ + free (groups); + fclose (fp); + } +--- origsrc/inetutils-2.4/ftpd/extern.h 2022-07-08 19:57:28.000000000 +0900 ++++ src/inetutils-2.4/ftpd/extern.h 2022-10-28 05:02:21.732283500 +0900 +@@ -53,7 +53,7 @@ + #include + + extern void cwd (const char *); +-extern int checkuser (const char *filename, const char *name); ++extern int checkuser (const char *filename, const char *name, char **path); + extern void delete (const char *); + extern int display_file (const char *name, int code); + extern void dologout (int); +--- origsrc/inetutils-2.4/ftpd/ftpcmd.y 2022-06-19 03:34:05.000000000 +0900 ++++ src/inetutils-2.4/ftpd/ftpcmd.y 2022-10-28 05:02:21.734291900 +0900 +@@ -593,7 +593,7 @@ cmd + # endif /* BSD */ + #endif /* !HAVE_UNAME */ + +-#if defined unix || defined __unix || defined __unix__ ++#if defined unix || defined __unix || defined __unix__ || defined __CYGWIN__ + sys_type = "UNIX"; + #else + sys_type = "UNKNOWN"; +--- origsrc/inetutils-2.4/ftpd/ftpd.c 2022-07-08 19:57:28.000000000 +0900 ++++ src/inetutils-2.4/ftpd/ftpd.c 2022-10-28 05:02:21.737295800 +0900 +@@ -111,6 +111,10 @@ + # define LOG_FTP LOG_DAEMON /* Use generic facility. */ + #endif + ++#ifndef LARGE_TRANSFER_BLOCKSIZE ++# define LARGE_TRANSFER_BLOCKSIZE 4096 ++#endif ++ + #ifndef MAP_FAILED + # define MAP_FAILED (void*)-1 + #endif +@@ -445,11 +449,21 @@ static struct argp argp = { + NULL + }; + ++#if defined(WITH_WRAP) && defined(__CYGWIN__) ++extern int allow_severity; /* set value in main() */ ++extern int deny_severity; /* set value in main() */ ++#endif ++ + int + main (int argc, char *argv[], char **envp) + { + int index; + ++#if defined(WITH_WRAP) && defined(__CYGWIN__) ++ allow_severity = LOG_INFO; ++ deny_severity = LOG_NOTICE; ++#endif ++ + set_program_name (argv[0]); + + #ifdef HAVE_TZSET +@@ -560,7 +574,7 @@ main (int argc, char *argv[], char **env + } + #endif + +-#ifdef F_SETOWN ++#if defined(F_SETOWN) && !defined(__CYGWIN__) + if (fcntl (STDIN_FILENO, F_SETOWN, getpid ()) == -1) + syslog (LOG_ERR, "fcntl F_SETOWN: %m"); + #endif +@@ -684,19 +698,55 @@ complete_login (struct credentials *pcre + /* We MUST do a chdir () after the chroot. Otherwise + the old current directory will be accessible as "." + outside the new root! */ +- if (chroot (pcred->rootdir) < 0 || chdir (pcred->homedir) < 0) ++ char *subdir = strstr(pcred->rootdir, "/./"); ++ if (subdir) ++ *subdir++ = '\0'; ++ if (chroot (pcred->rootdir) < 0) + { + reply (550, "Can't set guest privileges."); + goto bad; + } ++ if (seteuid ((uid_t)pcred->uid) < 0) ++ { ++ reply(550, "Can't set uid."); ++ goto bad; ++ } ++ if (chdir (pcred->homedir) < 0) ++ { ++ reply(550, "Can't access home directory."); ++ goto bad; ++ } ++ if (subdir && chdir (subdir) < 0) ++ { ++ reply(550, "Can't change directory to %s.", subdir); ++ goto bad; ++ } + } + else if (pcred->dochroot) + { +- if (chroot (pcred->rootdir) < 0 || chdir (pcred->homedir) < 0) ++ char *subdir = strstr(pcred->rootdir, "/./"); ++ if (subdir) ++ *subdir++ = '\0'; ++ if (chroot (pcred->rootdir) < 0) + { + reply (550, "Can't change root."); + goto bad; + } ++ if (seteuid ((uid_t)pcred->uid) < 0) ++ { ++ reply(550, "Can't set uid."); ++ goto bad; ++ } ++ if (chdir (pcred->homedir) < 0) ++ { ++ reply(550, "Can't access home directory."); ++ goto bad; ++ } ++ if (subdir && chdir (subdir) < 0) ++ { ++ reply(550, "Can't change directory to %s.", subdir); ++ goto bad; ++ } + } + + if (seteuid ((uid_t) pcred->uid) < 0) +@@ -707,6 +757,11 @@ complete_login (struct credentials *pcre + + if (!pcred->guest && !pcred->dochroot) /* Remaining case. */ + { ++ if (seteuid ((uid_t)pcred->uid) < 0) ++ { ++ reply(550, "Can't set uid."); ++ goto bad; ++ } + if (chdir (pcred->rootdir) < 0) + { + if (chdir ("/") < 0) +@@ -862,7 +917,7 @@ end_login (struct credentials *pcred) + char *remotehost = pcred->remotehost; + int atype = pcred->auth_type; + +- seteuid ((uid_t) 0); ++ seteuid (getuid ()); + if (pcred->logged_in) + { + logwtmp_keep_open (ttyline, "", ""); +@@ -972,6 +1027,11 @@ retrieve (const char *cmd, const char *n + + if (cmd == 0) + { ++#ifdef __CYGWIN__ ++ if (type != TYPE_A) ++ fin = fopen (name, "rb"), closefunc = fclose; ++ else ++#endif + fin = fopen (name, "r"), closefunc = fclose; + st.st_size = 0; + } +@@ -1059,6 +1119,13 @@ store (const char *name, const char *mod + FILE *fout, *din; + struct stat st; + int (*closefunc) (FILE *); ++ char nmode[8]; ++ ++ strcpy (nmode, mode); ++#ifdef __CYGWIN__ ++ if (type != TYPE_A) ++ strcat (nmode, "b"); ++#endif + + if (unique && stat (name, &st) == 0) + { +@@ -1074,8 +1141,16 @@ store (const char *name, const char *mod + } + + if (restart_point) +- mode = "r+"; +- fout = fopen (name, mode); ++ { ++#ifdef __CYGWIN__ ++ if (type != TYPE_A) ++ mode = "rb+"; ++ else ++#endif ++ mode = "r+"; ++ strcpy (nmode, mode); ++ } ++ fout = fopen (name, nmode); + closefunc = fclose; + if (fout == NULL || fstat (fileno (fout), &st) < 0) + { +@@ -1151,7 +1226,7 @@ getdatasock (const char *mode) + + if (data >= 0) + return fdopen (data, mode); +- seteuid ((uid_t) 0); ++ seteuid (getuid ()); + s = socket (ctrl_addr.ss_family, SOCK_STREAM, 0); + if (s < 0) + goto bad; +@@ -1318,9 +1393,12 @@ static void + send_data (FILE * instr, FILE * outstr, off_t blksize) + { + int c, cnt, filefd, netfd; +- char *buf = MAP_FAILED, *bp; ++ char *buf = MAP_FAILED; + off_t curpos; ++#ifdef HAVE_MMAP ++ char *bp; + off_t len, filesize; ++#endif + + transflag++; + if (setjmp (urgcatch)) +@@ -1414,7 +1492,14 @@ send_data (FILE * instr, FILE * outstr, + len = filesize; + do + { ++#ifdef __CYGWIN__ ++ cnt = write (netfd, bp, ++ (len < LARGE_TRANSFER_BLOCKSIZE ? ++ len : LARGE_TRANSFER_BLOCKSIZE)); ++#else + cnt = write (netfd, bp, len); ++#endif /* __CYGWIN__ */ ++ + len -= cnt; + bp += cnt; + if (cnt > 0) +@@ -1439,6 +1524,9 @@ send_data (FILE * instr, FILE * outstr, + syslog (LOG_DEBUG, "Starting at position %jd.", curpos); + } + ++ if (blksize <= 0) ++ blksize = LARGE_TRANSFER_BLOCKSIZE; ++ + buf = malloc ((u_int) blksize); + if (buf == NULL) + { +@@ -1978,7 +2066,7 @@ passive (int epsv, int af) + else /* !AF_INET6 */ + ((struct sockaddr_in *) &pasv_addr)->sin_port = 0; + +- seteuid ((uid_t) 0); ++ seteuid (getuid ()); + if (bind (pdata, (struct sockaddr *) &pasv_addr, pasv_addrlen) < 0) + { + if (seteuid ((uid_t) cred.uid)) +--- origsrc/inetutils-2.4/ftpd/server_mode.c 2022-07-08 19:57:28.000000000 +0900 ++++ src/inetutils-2.4/ftpd/server_mode.c 2022-10-28 05:02:21.740278300 +0900 +@@ -57,8 +57,14 @@ static void reapchild (int); + extern int hosts_ctl (char *, char *, char *, char *); + # endif + ++#ifdef __CYGWIN__ ++/* provided by library (e.g. extern, here) on cygwin */ ++extern int allow_severity; /* set value in main() */ ++extern int deny_severity; /* set value in main() */ ++#else + int allow_severity = LOG_INFO; + int deny_severity = LOG_NOTICE; ++#endif + + static int + check_host (struct sockaddr *sa, socklen_t len) +--- origsrc/inetutils-2.4/lib/sys_select.in.h 2022-10-26 06:13:34.000000000 +0900 ++++ src/inetutils-2.4/lib/sys_select.in.h 2022-10-28 05:02:21.742277400 +0900 +@@ -35,7 +35,7 @@ + # @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@ + + #elif (@HAVE_SYS_SELECT_H@ \ +- && (defined _CYGWIN_SYS_TIME_H \ ++ && (defined __CYGWIN__ \ + || (!defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H \ + && ((defined __osf__ && defined _SYS_TIME_H_ \ + && defined _OSF_SOURCE) \ +--- origsrc/inetutils-2.4/libinetutils/daemon.c 2022-07-08 19:56:39.000000000 +0900 ++++ src/inetutils-2.4/libinetutils/daemon.c 2022-10-28 05:02:21.745275400 +0900 +@@ -49,6 +49,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -101,13 +102,87 @@ + + #define MAXFD 64 + ++/* copy signal stuff from inetd.c -- POSIX says that the various ++ signal interfaces should not be mixed in the same program. ++ Because inetd uses 'most recent signal interface' it can find, ++ we should too. ++*/ ++ ++#define SIGBLOCK (sigmask(SIGCHLD)|sigmask(SIGHUP)|sigmask(SIGALRM)) ++#if defined(HAVE_SIGACTION) ++# define SIGSTATUS sigset_t ++# define sigstatus_empty(s) sigemptyset(&s) ++#else ++# define SIGSTATUS long ++# define sigstatus_empty(s) s = 0 ++#endif ++ ++static void ++signal_set_handler (int signo, void (*handler) ()) ++{ ++#if defined(HAVE_SIGACTION) ++ struct sigaction sa; ++ memset ((char *)&sa, 0, sizeof(sa)); ++ sigemptyset (&sa.sa_mask); ++ sigaddset (&sa.sa_mask, signo); ++#ifdef SA_RESTART ++ sa.sa_flags = SA_RESTART; ++#endif ++ sa.sa_handler = handler; ++ sigaction (signo, &sa, NULL); ++#elif defined(HAVE_SIGVEC) ++ struct sigvec sv; ++ memset (&sv, 0, sizeof(sv)); ++ sv.sv_mask = SIGBLOCK; ++ sv.sv_handler = handler; ++ sigvec (signo, &sv, NULL); ++#else /* !HAVE_SIGVEC */ ++ signal (signo, handler); ++#endif /* HAVE_SIGACTION */ ++} ++ ++static void ++signal_block (SIGSTATUS *old_status) ++{ ++#ifdef HAVE_SIGACTION ++ sigset_t sigs; ++ ++ sigemptyset (&sigs); ++ sigaddset (&sigs, SIGCHLD); ++ sigaddset (&sigs, SIGHUP); ++ sigaddset (&sigs, SIGALRM); ++ sigprocmask (SIG_BLOCK, &sigs, old_status); ++#else ++ long omask = sigblock (SIGBLOCK); ++ if (old_status) ++ *old_status = omask; ++#endif ++} ++ ++static void ++signal_unblock (SIGSTATUS *status) ++{ ++#ifdef HAVE_SIGACTION ++ if (status) ++ sigprocmask (SIG_SETMASK, status, 0); ++ else ++ { ++ sigset_t empty; ++ sigemptyset (&empty); ++ sigprocmask (SIG_SETMASK, &empty, 0); ++ } ++#else ++ sigsetmask (status ? *status : 0); ++#endif ++} ++ + void + waitdaemon_timeout (int signo MAYBE_UNUSED) + { + int left; + + left = alarm (0); +- signal (SIGALRM, SIG_DFL); ++ signal_set_handler (SIGALRM, SIG_DFL); + if (left == 0) + error (EXIT_FAILURE, 0, "timed out waiting for child"); + } +@@ -136,9 +211,29 @@ waitdaemon (int nochdir, int noclose, in + default: /* In the parent. */ + if (maxwait > 0) + { +- signal (SIGALRM, waitdaemon_timeout); ++ int status; ++ pid_t wpid; ++ ++ signal_unblock(NULL); ++ signal_set_handler (SIGALRM, waitdaemon_timeout); + alarm (maxwait); +- pause (); ++ do ++ { ++ wpid = waitpid(childpid, &status, WUNTRACED ++#ifdef WCONTINUED /* Not all implementations support this */ ++ | WCONTINUED ++#endif ++ ); ++ if (wpid == -1) ++ { ++ /* should't happen for timeouts, because the ++ SIGALRM handler will error (and exit). However, ++ we may recieve some OTHER signal... ++ */ ++ error (1, 0, "interrupted while waiting for child"); ++ } ++ } ++ while (!WIFEXITED(status) && !WIFSIGNALED(status)); + } + _exit (EXIT_SUCCESS); + } +@@ -150,7 +245,7 @@ waitdaemon (int nochdir, int noclose, in + then SIGHUP is sent to all process belonging to the same session, + i.e., also to the second child. + */ +- signal (SIGHUP, SIG_IGN); ++ signal_set_handler (SIGHUP, SIG_IGN); + + switch (fork ()) + { +@@ -200,5 +295,9 @@ waitdaemon (int nochdir, int noclose, in + int + daemon (int nochdir, int noclose) + { ++#ifdef __CYGWIN__ ++ return (waitdaemon (nochdir, noclose, 5) == -1) ? -1 : 0; ++#else + return (waitdaemon (nochdir, noclose, 0) == -1) ? -1 : 0; ++#endif + } +--- origsrc/inetutils-2.4/libinetutils/logwtmp.c 2022-07-08 19:57:28.000000000 +0900 ++++ src/inetutils-2.4/libinetutils/logwtmp.c 2022-10-28 05:02:21.748273800 +0900 +@@ -48,6 +48,10 @@ + extern int errno; + #endif + ++#ifndef O_BINARY ++#define O_BINARY 0 ++#endif ++ + #ifdef HAVE_UTMPX_H + static void + _logwtmp (struct utmpx *ut) +@@ -60,9 +64,9 @@ _logwtmp (struct utmp *ut) + static int fd = -1; + + if (fd < 0) +- fd = open (OUR_WTMP, O_WRONLY | O_APPEND, 0); ++ fd = open (OUR_WTMP, O_WRONLY | O_APPEND | O_BINARY, 0); + #else +- int fd = open (OUR_WTMP, O_WRONLY | O_APPEND, 0); ++ int fd = open (OUR_WTMP, O_WRONLY | O_APPEND | O_BINARY, 0); + #endif + + if (fd >= 0) +--- origsrc/inetutils-2.4/libinetutils/setsig.c 2022-07-08 19:57:28.000000000 +0900 ++++ src/inetutils-2.4/libinetutils/setsig.c 2022-10-28 05:02:21.750272600 +0900 +@@ -24,6 +24,10 @@ + + #include + ++#ifdef __CYGWIN__ ++typedef _sig_func_ptr sig_t; ++#endif ++ + /* This is exactly like the traditional signal function, but turns on the + SA_RESTART bit where possible. */ + sighandler_t +--- origsrc/inetutils-2.4/ping/ping.c 2022-07-08 19:57:28.000000000 +0900 ++++ src/inetutils-2.4/ping/ping.c 2022-10-28 05:02:21.753042700 +0900 +@@ -275,8 +275,12 @@ main (int argc, char **argv) + setlocale(LC_ALL, ""); + # endif + ++#ifdef __CYGWIN__ ++ is_root = true; ++#else + if (getuid () == 0) + is_root = true; ++#endif + + /* Parse command line */ + iu_argp_init ("ping", program_authors); +--- origsrc/inetutils-2.4/ping/ping6.c 2022-07-08 19:57:28.000000000 +0900 ++++ src/inetutils-2.4/ping/ping6.c 2022-10-28 05:02:21.756025800 +0900 +@@ -132,6 +132,7 @@ parse_opt (int key, char *arg, struct ar + { + char *endptr; + static unsigned char pattern[MAXPATTERN]; ++ double v; + + switch (key) + { +@@ -159,9 +160,11 @@ parse_opt (int key, char *arg, struct ar + #endif + + case 'i': ++ v = strtod (arg, &endptr); ++ if (*endptr) ++ argp_error (state, "invalid value (`%s' near `%s')", arg, endptr); + options |= OPT_INTERVAL; +- interval = ping_cvt_number (arg, 0, 0); +- interval *= PING_PRECISION; ++ interval = v * PING_PRECISION; + if (!is_root && interval < PING_MIN_USER_INTERVAL) + error (EXIT_FAILURE, 0, "option value too small: %s", arg); + break; +@@ -242,8 +245,12 @@ main (int argc, char **argv) + setlocale (LC_ALL, ""); + # endif + ++#ifdef __CYGWIN__ ++ is_root = true; ++#else + if (getuid () == 0) + is_root = true; ++#endif + + /* Parse command line */ + iu_argp_init ("ping6", program_authors); +@@ -838,6 +845,7 @@ ping_init (int type MAYBE_UNUSED, int id + return NULL; + } + ++#if defined(ICMP6_FILTER) & !defined(__CYGWIN__) + /* Tell which ICMPs we are interested in. */ + ICMP6_FILTER_SETBLOCKALL (&filter); + ICMP6_FILTER_SETPASS (ICMP6_ECHO_REPLY, &filter); +@@ -853,13 +861,16 @@ ping_init (int type MAYBE_UNUSED, int id + close (fd); + return NULL; + } ++#endif + ++#ifdef IPV6_RECVHOPLIMIT + err = setsockopt (fd, IPPROTO_IPV6, IPV6_RECVHOPLIMIT, &on, sizeof (on)); + if (err) + { + close (fd); + return NULL; + } ++#endif + + /* Allocate PING structure and initialize it to default values */ + p = malloc (sizeof (*p)); +--- origsrc/inetutils-2.4/src/inetd.c 2022-10-26 05:43:38.000000000 +0900 ++++ src/inetutils-2.4/src/inetd.c 2022-10-28 05:02:21.760038600 +0900 +@@ -136,6 +136,12 @@ + #include "version-etc.h" + #include "attribute.h" + ++#ifdef __CYGWIN__ ++#include ++#include ++#endif /* __CYGWIN__ */ ++ ++ + #ifndef EAI_ADDRFAMILY + # define EAI_ADDRFAMILY 1 + #endif +@@ -149,7 +155,14 @@ + #endif + #define SIGBLOCK (sigmask(SIGCHLD)|sigmask(SIGHUP)|sigmask(SIGALRM)) + ++enum { ++ NO_DAEMON = 0, ++ UNIX_DAEMON ++}; ++ + bool debug = false; ++static int daemonize = UNIX_DAEMON; ++ + int nsock, maxsock; + fd_set allsock; + int options; +@@ -194,6 +207,13 @@ static struct argp_option argp_options[] + {"resolve", OPT_RESOLVE, NULL, 0, + "resolve IP addresses when setting environment variables " + "(see --environment)", GRP+1}, ++#ifdef __CYGWIN__ ++ {0,0,0,0,"Cygwin-specific options:",GRP+2}, ++ {"no-daemonize", 'D', NULL, 0, ++ "Do not run as a daemon", GRP+2}, ++ {"traditional-daemon", 'T', NULL, 0, ++ "This option is present for backwards compatibility.", GRP+2}, ++#endif /* __CYGWIN__ */ + #undef GRP + {NULL, 0, NULL, 0, NULL, 0} + }; +@@ -235,6 +255,16 @@ parse_opt (int key, char *arg, + resolve_option = true; + break; + ++#ifdef __CYGWIN__ ++ case 'D': /* don't become a daemon */ ++ daemonize = NO_DAEMON; ++ break; ++ ++ case 'T': /* act like a normal unix daemon */ ++ daemonize = UNIX_DAEMON; ++ break; ++#endif /* __CYGWIN__ */ ++ + default: + return ARGP_ERR_UNKNOWN; + } +@@ -410,6 +440,44 @@ signal_unblock (SIGSTATUS * status) + #endif + } + ++#ifdef __CYGWIN__ ++void ++hide_console () ++{ ++ HMODULE lib; ++ HWND WINAPI (*GetConsoleWindow) (void) = NULL; ++ HWND console = NULL; ++ ++ AllocConsole (); ++ if (lib = LoadLibrary ("kernel32.dll")) ++ GetConsoleWindow = (HWND WINAPI (*) (void)) ++ GetProcAddress (lib, "GetConsoleWindow"); ++ ++ if (GetConsoleWindow) ++ /* If GetConsoleWindow exists (W2K and newer), use it. */ ++ console = GetConsoleWindow (); ++ if (!console) ++ { ++ /* Get console window handle as described in KB article Q124103 */ ++ char title[32]; ++ snprintf (title, 32, "inetd.%d", getpid ()); ++ SetConsoleTitle (title); ++ Sleep (40); ++ console = FindWindow (NULL, title); ++ if (console) ++ { ++ char ctitle[256]; ++ if (!GetWindowText (console, ctitle, 256) || strcmp (title, ctitle)) ++ console = NULL; ++ } ++ } ++ if (console) ++ ShowWindow (console, SW_HIDE); ++} ++#endif /* __CYGWIN__ */ ++ ++ ++ + void + run_service (int ctrl, struct servtab *sep) + { +@@ -429,6 +497,10 @@ run_service (int ctrl, struct servtab *s + close (ctrl); + dup2 (0, 1); + dup2 (0, 2); ++#ifdef __CYGWIN__ ++ if (strcmp (sep->se_user, "root")) ++ { ++#endif + pwd = getpwnam (sep->se_user); + if (pwd == NULL) + { +@@ -450,6 +522,13 @@ run_service (int ctrl, struct servtab *s + _exit (EXIT_FAILURE); + } + } ++#ifdef __CYGWIN__ ++ } ++ else ++ { ++ pwd = getpwuid (getuid ()); ++ } ++#endif + if (pwd->pw_uid) + { + if (grp && grp->gr_gid) +@@ -463,8 +542,8 @@ run_service (int ctrl, struct servtab *s + } + else if (setgid (pwd->pw_gid) < 0) + { +- syslog (LOG_ERR, "%s: can't set gid %d: %m", +- sep->se_service, pwd->pw_gid); ++ syslog (LOG_ERR, "%s: can't set gid %d uid(%d): %m", ++ sep->se_service, pwd->pw_gid, pwd->pw_uid); + _exit (EXIT_FAILURE); + } + #ifdef HAVE_INITGROUPS +@@ -1276,6 +1355,10 @@ nextconfig (const char *file) + } + while ((sep = getconfigent (fconfig, file, &line))) + { ++#ifdef __CYGWIN__ ++ if (strcmp (sep->se_user, "root")) ++ { ++#endif + pwd = getpwnam (sep->se_user); + if (pwd == NULL) + { +@@ -1293,6 +1376,9 @@ nextconfig (const char *file) + continue; + } + } ++#ifdef __CYGWIN__ ++ } ++#endif + if (ISMUX (sep)) + { + sep->se_fd = -1; +@@ -1495,10 +1581,48 @@ set_proc_title (char *a, int s) + } + else + snprintf (buf, sizeof buf, "-%s", a); +- strncpy (cp, buf, LastArg - cp); +- cp += strlen (cp); +- while (cp < LastArg) +- *cp++ = ' '; ++ ++ /* the non-portable code in the #else block relies on ++ the system allocating all of the strings in argv[] ++ contiguously. On cygwin this is not necessarily so, ++ and to assume otherwise will lead to segfaults. ++ The downside here is we get supposed ps entries for ++ internal services like: ++ '-echo' instead of '-echo [remoteIP]' (okay?) ++ '-char' instead of '-chargen [remoteIP]' (awful) ++ '-disc' instead of '-discard [remoteIP]' (awful) ++ because the original argv[0] might be 'inetd' unless ++ it was specifically invoked with a full path. However, ++ this is mostly moot: ++ (1) cygwin's ps uses its own internal version of the ++ exe name (or GetModuleName) and then calls ++ cygwin_conv_xxx() for display. ++ (2) procps DOES use the modified argv[0] value ++ */ ++ { ++#ifdef __CYGWIN__ ++ char* LastNullChar = cp + strlen(cp); ++ char** scan; ++#else ++ char* LastNullChar = LastArg; ++#endif ++ ++ strncpy (cp, buf, LastNullChar - cp); ++ cp += strlen (cp); ++ while (cp < LastNullChar) ++ *cp++ = ' '; ++ ++#ifdef __CYGWIN__ ++ /* individually blank out the rest of the args */ ++ for (scan = Argv + 1; *scan != NULL; scan++) ++ { ++ char* nullChar = *scan + strlen(*scan); ++ cp = *scan; ++ while (cp < nullChar) ++ *cp++ = ' '; ++ } ++#endif ++ } + } + + /* +@@ -1937,6 +2061,16 @@ main (int argc, char *argv[], char *envp + envp++; + LastArg = envp[-1] + strlen (envp[-1]); + ++#ifdef __CYGWIN__ ++ /* on cygwin, open the log early -- because even ++ help and cmdline processing messages go directly ++ to syslog. This is because inetd is often run ++ under the SYSTEM account (which is not quite like ++ the *nix 'root') ++ */ ++ openlog("inetd", LOG_PID | LOG_NOWAIT, LOG_DAEMON); ++#endif ++ + /* Parse command line */ + iu_argp_init ("inetd", program_authors); + argp_parse (&argp, argc, argv, 0, &index, NULL); +@@ -1960,7 +2094,7 @@ main (int argc, char *argv[], char *envp + config_files[1] = newstr (PATH_INETDDIR); + } + +- if (!debug) ++ if ((debug == 0) && daemonize) + { + if (daemon (0, 0) < 0) + { +@@ -1970,6 +2104,12 @@ main (int argc, char *argv[], char *envp + }; + } + ++#ifndef __CYGWIN__ ++ exception_list except_list; ++ cygwin_internal (CW_INIT_EXCEPTIONS, &except_list); ++ hide_console (); ++#endif /* __CYGWIN__ */ ++ + openlog ("inetd", LOG_PID | LOG_NOWAIT, LOG_DAEMON); + + if (pidfile_option) +@@ -1993,6 +2133,7 @@ main (int argc, char *argv[], char *envp + signal_set_handler (SIGCHLD, reapchild); + signal_set_handler (SIGPIPE, SIG_IGN); + ++#ifndef __CYGWIN__ + { + /* space for daemons to overwrite environment for ps */ + #define DUMMYSIZE 100 +@@ -2002,6 +2143,7 @@ main (int argc, char *argv[], char *envp + dummy[DUMMYSIZE - 1] = '\0'; + setenv ("inetd_dummy", dummy, 1); + } ++#endif /* __CYGWIN__ */ + + for (;;) + { +--- origsrc/inetutils-2.4/src/syslogd.c 2022-07-08 19:57:28.000000000 +0900 ++++ src/inetutils-2.4/src/syslogd.c 2022-10-28 05:02:21.763022400 +0900 +@@ -336,7 +336,8 @@ enum { + OPT_NO_FORWARD = 256, + OPT_NO_KLOG, + OPT_NO_UNIXAF, +- OPT_IPANY ++ OPT_IPANY, ++ OPT_RCDIR + }; + + static struct argp_option argp_options[] = { +@@ -359,6 +360,7 @@ static struct argp_option argp_options[] + {"mark", 'm', "INTVL", 0, "specify timestamp interval in minutes" + " (0 for no timestamping)", GRP+1}, + {"no-detach", 'n', NULL, 0, "do not enter daemon mode", GRP+1}, ++ {"no-daemonize", 'D', NULL, 0, "Synonym for -n", GRP+1}, + {"no-forward", OPT_NO_FORWARD, NULL, 0, "do not forward any messages " + "(overrides --hop)", GRP+1}, + #ifdef PATH_KLOG +@@ -372,7 +374,7 @@ static struct argp_option argp_options[] + {"rcfile", 'f', "FILE", 0, "override configuration file (default: " + PATH_LOGCONF ")", + GRP+1}, +- {"rcdir", 'D', "DIR", 0, "override configuration directory (default: " ++ {"rcdir", OPT_RCDIR, "DIR", 0, "override configuration directory (default: " + PATH_LOGCONFD ")", GRP+1}, + {"socket", 'p', "FILE", 0, "override default unix domain socket " PATH_LOG, + GRP+1}, +@@ -443,6 +445,7 @@ parse_opt (int key, char *arg, struct ar + break; + + case 'n': ++ case 'D': + NoDetach = 1; + break; + +@@ -466,7 +469,7 @@ parse_opt (int key, char *arg, struct ar + ConfFile = arg; + break; + +- case 'D': ++ case OPT_RCDIR: + ConfDir = arg; + break; + +@@ -1119,7 +1122,11 @@ printsys (const char *msg) + char *lp, *q, line[MAXLINE + 1]; + const char *p; + ++#ifdef __CYGWIN__ ++ strcpy (line, "kernel: "); ++#else + strcpy (line, "vmunix: "); ++#endif + lp = line + strlen (line); + for (p = msg; *p != '\0';) + { +--- origsrc/inetutils-2.4/src/uucpd.c 2022-07-08 19:57:28.000000000 +0900 ++++ src/inetutils-2.4/src/uucpd.c 2022-10-28 05:02:21.765021600 +0900 +@@ -88,6 +88,12 @@ + #include + #include + ++#ifdef __CYGWIN__ ++#include ++#include ++#define is_winnt (GetVersion() < 0x80000000) ++#endif ++ + void dologin (struct passwd *pw, struct sockaddr *sap, socklen_t salen); + void dologout (void); + void doit (struct sockaddr *sap, socklen_t salen); +@@ -182,6 +188,8 @@ readline (register char *p, register int + if (c == '\n' || c == '\r') + { + *p = '\0'; ++ if (c == '\r') ++ continue; + return (0); + } + *p++ = c; +@@ -231,12 +239,29 @@ doit (struct sockaddr *sap, socklen_t sa + fprintf (stderr, "passwd read\n"); + return; + } ++#ifdef __CYGWIN__ ++ if (!is_winnt) ++ { ++#endif + xpasswd = crypt (passwd, pw->pw_passwd); + if (strcmp (xpasswd, pw->pw_passwd)) + { + fprintf (stderr, "Login incorrect."); + return; + } ++#ifdef __CYGWIN__ ++ } ++ else ++ { ++ HANDLE hToken = cygwin_logon_user (pw, passwd); ++ if (hToken == INVALID_HANDLE_VALUE) ++ { ++ fprintf (stderr, "Login incorrect."); ++ return; ++ } ++ cygwin_set_impersonation_token (hToken); ++ } ++#endif + } + + /* XXX: Compare only shell base name to "uucico"? +--- origsrc/inetutils-2.4/talk/Makefile.am 2022-06-19 03:34:05.000000000 +0900 ++++ src/inetutils-2.4/talk/Makefile.am 2022-10-28 05:02:21.767020000 +0900 +@@ -17,6 +17,7 @@ + # along with this program. If not, see `http://www.gnu.org/licenses/'. + + AM_CPPFLAGS = \ ++ -I$(top_srcdir)/headers \ + $(iu_INCLUDES) \ + $(NCURSES_INCLUDE) $(INCIDN) + +--- origsrc/inetutils-2.4/talk/ctl.c 2022-07-08 19:57:28.000000000 +0900 ++++ src/inetutils-2.4/talk/ctl.c 2022-10-28 05:02:21.770018500 +0900 +@@ -55,6 +55,7 @@ + + #include + #include ++#include + #include + #include + #include "talk.h" +@@ -85,7 +86,7 @@ open_sockt (void) + #ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN + my_addr.sin_len = sizeof (my_addr); + #endif +- my_addr.sin_addr = my_machine_addr; ++ my_addr.sin_addr.s_addr = INADDR_ANY; + my_addr.sin_port = 0; + sockt = socket (AF_INET, SOCK_STREAM, 0); + if (sockt <= 0) +@@ -95,6 +96,7 @@ open_sockt (void) + length = sizeof (my_addr); + if (getsockname (sockt, (struct sockaddr *) &my_addr, &length) == -1) + p_error ("Bad address for socket"); ++ my_addr.sin_addr = my_machine_addr; + + return 0; + } +@@ -110,7 +112,7 @@ open_ctl (void) + ctl_addr.sin_len = sizeof (ctl_addr); + #endif + ctl_addr.sin_port = 0; +- ctl_addr.sin_addr = my_machine_addr; ++ ctl_addr.sin_addr.s_addr = INADDR_ANY; + ctl_sockt = socket (AF_INET, SOCK_DGRAM, 0); + if (ctl_sockt <= 0) + p_error ("Bad socket"); +@@ -119,6 +121,7 @@ open_ctl (void) + length = sizeof (ctl_addr); + if (getsockname (ctl_sockt, (struct sockaddr *) &ctl_addr, &length) == -1) + p_error ("Bad address for ctl socket"); ++ ctl_addr.sin_addr = my_machine_addr; + + return 0; + } +--- origsrc/inetutils-2.4/talk/ctl_transact.c 2022-07-08 19:56:39.000000000 +0900 ++++ src/inetutils-2.4/talk/ctl_transact.c 2022-10-28 05:02:21.773016400 +0900 +@@ -53,6 +53,7 @@ + #include + #include + #include ++#include + #include + #include + #include "talk_ctl.h" +@@ -88,11 +89,11 @@ ctl_transact (struct in_addr target, CTL + */ + do + { +- wait.tv_sec = CTL_WAIT; +- wait.tv_usec = 0; + /* resend message until a response is obtained */ + do + { ++ wait.tv_sec = CTL_WAIT; ++ wait.tv_usec = 0; + cc = sendto (ctl_sockt, (char *) &msg, sizeof (msg), 0, + (struct sockaddr *) &daemon_addr, + sizeof (daemon_addr)); +--- origsrc/inetutils-2.4/talk/get_addrs.c 2022-07-08 19:57:28.000000000 +0900 ++++ src/inetutils-2.4/talk/get_addrs.c 2022-10-28 05:02:21.777028100 +0900 +@@ -53,6 +53,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -71,7 +72,11 @@ get_addrs (char *my_machine_name, char * + #if HAVE_DECL_GETADDRINFO || defined HAVE_IDN || defined HAVE_IDN2 + int err; + #endif ++#ifdef HAVE_IDN + char *lhost, *rhost; ++#else ++ char *rhost; ++#endif + #if HAVE_DECL_GETADDRINFO + struct addrinfo hints, *res, *ai; + #else /* !HAVE_DECL_GETADDRINFO */ +@@ -96,7 +101,6 @@ get_addrs (char *my_machine_name, char * + exit (-1); + } + #else /* !HAVE_IDN && !HAVE_IDN2 */ +- lhost = my_machine_name; + rhost = his_machine_name; + #endif + +@@ -114,16 +118,14 @@ get_addrs (char *my_machine_name, char * + hints.ai_flags |= AI_IDN; + # endif + +- err = getaddrinfo (lhost, NULL, &hints, &res); ++ err = getaddrinfo (rhost, NULL, &hints, &res); + if (err) + { +- fprintf (stderr, "talk: %s: %s\n", lhost, gai_strerror (err)); ++ fprintf (stderr, "talk: %s: %s\n", rhost, gai_strerror (err)); + exit (-1); + } + +- /* Perform all sanity checks available. +- * Reduction of tests? +- */ ++ /* Perform all sanity checks available. */ + for (ai = res; ai; ai = ai->ai_next) + { + int f; +@@ -135,98 +137,33 @@ get_addrs (char *my_machine_name, char * + if (f < 0) + continue; + +- /* Attempt binding to this local address. */ +- if (bind (f, ai->ai_addr, ai->ai_addrlen)) +- { +- close (f); +- f = -1; +- continue; +- } +- +- /* We have a usable address. */ ++ /* We have a usable address family! */ + close (f); + break; + } + + if (ai) +- memcpy (&my_machine_addr, ++ memcpy (&his_machine_addr, + &((struct sockaddr_in *) ai->ai_addr)->sin_addr, +- sizeof (my_machine_addr)); ++ sizeof (his_machine_addr)); + + freeaddrinfo (res); + if (!ai) + { +- fprintf (stderr, "talk: %s: %s\n", lhost, "address not found"); ++ fprintf (stderr, "talk: %s: %s\n", rhost, "address not found"); + exit (-1); + } + + #else /* !HAVE_DECL_GETADDRINFO */ +- hp = gethostbyname (lhost); ++ hp = gethostbyname (rhost); + if (hp == NULL) + { +- fprintf (stderr, "talk: %s(%s): ", lhost, my_machine_name); ++ fprintf (stderr, "talk: %s(%s): ", rhost, his_machine_name); + herror ((char *) NULL); + exit (-1); + } +- memmove (&my_machine_addr, hp->h_addr, hp->h_length); +-#endif /* !HAVE_DECL_GETADDRINFO */ +- +- /* +- * If the callee is on-machine, just copy the +- * network address, otherwise do a lookup... +- */ +- if (strcmp (rhost, lhost)) +- { +-#if HAVE_DECL_GETADDRINFO +- err = getaddrinfo (rhost, NULL, &hints, &res); +- if (err) +- { +- fprintf (stderr, "talk: %s: %s\n", rhost, gai_strerror (err)); +- exit (-1); +- } +- +- /* Perform all sanity checks available. */ +- for (ai = res; ai; ai = ai->ai_next) +- { +- int f; +- +- if (ai->ai_family != AF_INET) +- continue; +- +- f = socket (ai->ai_family, ai->ai_socktype, ai->ai_protocol); +- if (f < 0) +- continue; +- +- /* We have a usable address family! */ +- close (f); +- break; +- } +- +- if (ai) +- memcpy (&his_machine_addr, +- &((struct sockaddr_in *) ai->ai_addr)->sin_addr, +- sizeof (his_machine_addr)); +- +- freeaddrinfo (res); +- if (!ai) +- { +- fprintf (stderr, "talk: %s: %s\n", rhost, "address not found"); +- exit (-1); +- } +- +-#else /* !HAVE_DECL_GETADDRINFO */ +- hp = gethostbyname (rhost); +- if (hp == NULL) +- { +- fprintf (stderr, "talk: %s(%s): ", rhost, his_machine_name); +- herror ((char *) NULL); +- exit (-1); +- } +- memmove (&his_machine_addr, hp->h_addr, hp->h_length); ++ memmove (&his_machine_addr, hp->h_addr, hp->h_length); + #endif /* !HAVE_DECL_GETADDRINFO */ +- } +- else +- his_machine_addr = my_machine_addr; + + /* Find the server's port. */ + sp = getservbyname ("ntalk", "udp"); +@@ -238,6 +175,41 @@ get_addrs (char *my_machine_name, char * + } + daemon_port = ntohs (sp->s_port); + ++ /* look up the address of the local host ++ which can communicate with remote host */ ++ { ++ int f; ++ struct sockaddr_in addr; ++ socklen_t length; ++ ++ f = socket (AF_INET, SOCK_DGRAM, 0); ++ if (f < 0) ++ { ++ fprintf (stderr, "talk: Bad socket: "); ++ herror ((char *) NULL); ++ exit (-1); ++ } ++ memset (&addr, 0, sizeof(addr)); ++ addr.sin_family = AF_INET; ++ addr.sin_port = htons (daemon_port); ++ addr.sin_addr = his_machine_addr; ++ if (connect (f, (struct sockaddr *)&addr, sizeof(addr)) < 0) ++ { ++ fprintf (stderr, "talk: Coundn't connect to control socket: "); ++ herror ((char *) NULL); ++ exit (-1); ++ } ++ length = sizeof (addr); ++ if (getsockname (f, (struct sockaddr *)&addr, &length) < 0) ++ { ++ fprintf (stderr, "talk: Bad address for ctl socket: "); ++ herror ((char *) NULL); ++ exit (-1); ++ } ++ close (f); ++ my_machine_addr = addr.sin_addr; ++ } ++ + #if defined HAVE_IDN || defined HAVE_IDN2 + free (lhost); + free (rhost); +--- origsrc/inetutils-2.4/talk/get_names.c 2022-07-08 19:56:39.000000000 +0900 ++++ src/inetutils-2.4/talk/get_names.c 2022-10-28 05:02:21.779012700 +0900 +@@ -54,6 +54,7 @@ + #include + #include + #include ++#include + #include + #include + #include +--- origsrc/inetutils-2.4/talk/invite.c 2022-07-08 19:56:39.000000000 +0900 ++++ src/inetutils-2.4/talk/invite.c 2022-10-28 05:02:21.781011900 +0900 +@@ -55,6 +55,7 @@ + #include + #include + #include ++#include + #include + #include + #include +--- origsrc/inetutils-2.4/talk/io.c 2022-07-08 19:57:28.000000000 +0900 ++++ src/inetutils-2.4/talk/io.c 2022-10-28 05:02:21.784010000 +0900 +@@ -67,6 +67,8 @@ + #include + #include "talk.h" + ++#include ++ + #define A_LONG_TIME 10000000 + + /* +--- origsrc/inetutils-2.4/talk/look_up.c 2022-07-08 19:57:28.000000000 +0900 ++++ src/inetutils-2.4/talk/look_up.c 2022-10-28 05:02:21.786008500 +0900 +@@ -52,6 +52,7 @@ + #include + #include + #include ++#include + #include + #include + #include +--- origsrc/inetutils-2.4/talkd/Makefile.am 2022-06-19 03:34:05.000000000 +0900 ++++ src/inetutils-2.4/talkd/Makefile.am 2022-10-28 05:02:21.789019600 +0900 +@@ -19,6 +19,7 @@ + @PATHDEFS_MAKE@ + + AM_CPPFLAGS = \ ++ -I$(top_srcdir)/headers \ + $(iu_INCLUDES) \ + $(PATHDEF_DEV) \ + $(PATHDEF_TTY_PFX) $(PATHDEF_UTMP) $(PATHDEF_UTMPX) +--- origsrc/inetutils-2.4/talkd/intalkd.h 2022-07-08 19:56:39.000000000 +0900 ++++ src/inetutils-2.4/talkd/intalkd.h 2022-10-28 05:02:21.791005700 +0900 +@@ -21,6 +21,7 @@ + #include + #include + #include ++#include + #include + #include + #include diff --git a/inetutils/inetutils.install b/inetutils/inetutils.install deleted file mode 100644 index 997d661e..00000000 --- a/inetutils/inetutils.install +++ /dev/null @@ -1,13 +0,0 @@ -post_install() { - setcap cap_net_bind_service=+ep usr/bin/rcp 2>/dev/null || chmod +s usr/bin/rcp - setcap cap_net_bind_service=+ep usr/bin/rlogin 2>/dev/null || chmod +s usr/bin/rlogin - setcap cap_net_bind_service=+ep usr/bin/rsh 2>/dev/null || chmod +s usr/bin/rsh -} - -post_upgrade() { - post_install $1 -} - -pre_remove() { - return 0 -} diff --git a/inetutils/talkd.h b/inetutils/talkd.h index 0aa9e673..0a61764d 100644 --- a/inetutils/talkd.h +++ b/inetutils/talkd.h @@ -69,10 +69,10 @@ typedef struct { u_char type; /* request type, see below */ u_char answer; /* not used */ u_char pad; - u_long id_num; /* message id */ + u_int32_t id_num; /* message id */ struct osockaddr addr; /* old (4.3) style */ struct osockaddr ctl_addr; /* old (4.3) style */ - long pid; /* caller's process id */ + int32_t pid; /* caller's process id */ #define NAME_SIZE 12 char l_name[NAME_SIZE];/* caller's name */ char r_name[NAME_SIZE];/* callee's name */ @@ -88,7 +88,7 @@ typedef struct { u_char type; /* type of request message, see below */ u_char answer; /* respose to request message, see below */ u_char pad; - u_long id_num; /* message id */ + u_int32_t id_num; /* message id */ struct osockaddr addr; /* address for establishing conversation */ } CTL_RESPONSE; diff --git a/inetutils/tftp.h b/inetutils/tftp.h deleted file mode 100644 index ec6fbc78..00000000 --- a/inetutils/tftp.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 1983, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)tftp.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _TFTP_H_ -#define _TFTP_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Trivial File Transfer Protocol (IEN-133) - */ -#define SEGSIZE 512 /* data segment size */ - -/* - * Packet types. - */ -#define RRQ 01 /* read request */ -#define WRQ 02 /* write request */ -#define DATA 03 /* data packet */ -#define ACK 04 /* acknowledgement */ -#define ERROR 05 /* error code */ - -struct tftphdr { - short th_opcode; /* packet type */ - union { - short tu_block; /* block # */ - short tu_code; /* error code */ - char tu_stuff[1]; /* request packet stuff */ - } th_u; - char th_data[1]; /* data or error string */ -}; - -#define th_block th_u.tu_block -#define th_code th_u.tu_code -#define th_stuff th_u.tu_stuff -#define th_msg th_data - -/* - * Error codes. - */ -#define EUNDEF 0 /* not defined */ -#define ENOTFOUND 1 /* file not found */ -#define EACCESS 2 /* access violation */ -#define ENOSPACE 3 /* disk full or allocation exceeded */ -#define EBADOP 4 /* illegal TFTP operation */ -#define EBADID 5 /* unknown transfer ID */ -#define EEXISTS 6 /* file already exists */ -#define ENOUSER 7 /* no such user */ - -#ifdef __cplusplus -} -#endif - -#endif /* !_TFTP_H_ */